Posts in Category: OpenStreetMap

Thesis Updates

Its been a while since my last update on the progress of my thesis, but I suppose it is time for one as the day of my defense draws nigh.  Speaking of which. December 19th, 2011 is the big date and it seems like days are getting shorter is the day comes closer.  That could also be the effects of the sun setting earlier but I’ll save you all form my thoughts on that. (I love the winter)

So, progress.  Where am I?  Well interestingly enough – and I suspect this was clear to some from the start – the project has slowly deviated from being a study on the visualization of the data to an ongoing conversation about the openness of the data that drives such visualization.  For the aesthetically hungry, yes there is still a technical aspect. (And yes, I’m extremely excited about the 3D OpenStreetMap meetup in Germany, March of 2012!).

What I’ve found as I’ve been working with the data is that what we perceive to be “released” into the open is, in fact, not actually “open” as someone thinking in terms of open source would define it.  This poses two major problems (in addition to many smaller ones).

  • Integration – There can be little or none.  With data released under restrictive licenses we’re teased with high-quality data but are legally bound not to do anything of consequence with it.  It dooms the geo-savvy developer to perpetually bolt a viewer onto the data rather than to bring anything new to the table.
  • Quality Assurance – Its left up to the governing bodies.  Public input is taken via HTML contact forms.  Are corrections ever made?
The problem is a spider-web and it entangles just about everything that it touches, or gets even remotely near.  I won’t write my entire thesis here, but I’ll leave you with a thought that’s been sitting with me for a few weeks now, ‘Are we really supposed to wait for “official” data producers to catch up to us?’

Another Iteration of OpenStreetMap Visualization in 3D

I’ve made some great strides since my last update a day and a half ago.  It turns out that having someone around to re-frame your problem can make the solutions to problems more readily apparent.  I suspect this is how psychiatrists stay in business, I’m just glad it carries over into the world of mathematics :)

Rather than going through conforming Delaunay triangulations or by attempting to cut up triangles and create keystones, I’ve gotten another way to do it.  Given a center-line, quads can be created by thinking of the left and right sides as ‘tracing’ along the path of the center, but offset by some distance on either side.  In the case of turns, subtle and sharp angles can be handled in the same way.  By getting the azimuth between the prior point and the next point (we can think of them as i-1 and i+1), a constant distance from i can be maintained by simply getting the positive and negative perpendicular vectors with respect to the azimuth from i-1 to i+1.  It turned out to be a pretty good solution as you can see in the video below.

More on OpenStreetMap Data in jME

So since my deliciously glitched programmer art meets geodata post yesterday I’ve done a fair bit of work on my Thesis project.  After some frustration with Delaunay Triangulations and Conforming Delaunay Triangulations I’ve resigned myself to using GL_LINES as a temporary stopgap measure.  I’ve alotted myself a total of 1 week for the integration of any data coming out of OpenStreetMap into the project and I’m less than 48 hours in.  Hopefully I get the time to come back to this and do the triangulation properly.  Some advice from the make of Mythruna, Paul Speed, on chat tonight looks to be promising and a significantly simpler solution than I had anticipated (aren’t those the best kind?).

I’ve also added the rendering of railroad tracks this and have begun to build a color schema for the display of data.  Grey is roads and brown is railway.  Public transportation is also linked to blue lines, but New York evidently doesn’t have it annotated as such in the map.

OpenStreetMap data in jMonkeyEngine

I’m working on the integration of different GIS-related services into a single unified application for my masters thesis and have been picking up where I left off on Betaville and its OSM capabilities. (It loads the data, makes some pretty scruffy looking geometry out of it, and can then render it in real-time as well as export it to COLLADA or OBJ)

Below are a few short videos of me letting off some creative steam while playing with the data.

Triangulation is done courtesy of Java Topology Suite (JTS), which may be the coolest library ever written… with the exception of jME ;)

New OSMGenerator Branch

If you’re following me on GitHub you might have seen that I’ve been pretty busy over the last few days.  After the short discussion on the original iteration of OSMGenerator, I began work on a branch that uses separate tables linked by foreign keys to nodes/ways/relations for the storage of keys.  The idea behind this is quicker lookups based on tag searches, which is just about the only way to get data that users will find interesting out of the database.  My thanks to Frederik Ramm for bringing up the disparity in schemas between OSMGenerator and osmosis.

The branch is located here and I’m currently doing speed comparisons between it and the original 0.1 release.

 

 

SlippyJ – Slippery Maps in Java

If you’ve used Google Maps, OpenStreetMap, or nearly any other online mapping tool, you’ve likely run into the very polished interfaces they present. Double-clicking the map to zoom, dragging the map to get around, its all so smooth!

I decided this morning to have an attempt at building something similar to this in Java, with the ability of being able to plug-in most, if not all, of the GUI toolkits floating around. As of the time of writing I’ve created two implementations, one in Swing and another in FengGUI.

Here is a quick demonstration of how it works using Swing (full source):

JFrame frame = new JFrame("SlippyJ Swing Test");
SwingTileContainer stc = new SwingTileContainer();
frame.setSize(1000, 1000);
stc.setSize(1000, 1000);
frame.add(stc);
frame.setVisible(true);
Coordinate center = new Coordinate(41, -74);
Palette palette = new Palette(center, 12, stc, new SwingTileFactory(Palette.OSMSlippyServer));

Check out the repositories below:
SlippyJ-Core
SlippyJ-Swing
SlippyJ-FengGUI

OSMGenerator Available on GitHub

For a few weeks now I’ve been working on an application that will import OpenStreetMap data into a MySQL database. Osmosis is already a mature piece of software with a number of features, but it presents itself as centered around PostgreSQL. Given the popularity of Postgres around the OpenStreetMap community, this pg-centricity makes good sense. Unfortunately, it doesn’t satisfy everyone’s needs and, as such, getting up and going with Osmosis and MySQL proved to be a task that just wasn’t panning out for me.

So I wrote my own. Its extremely simple, just a few files, and doesn’t even use a standard SAX parser to read the XML data (utilizes straight-up java.lang.String functions) as its deflated. Of course, this means that bugs are ripe for the picking but relatively easy to get to the bottom of. At this point, most of the glaring bugs seem to have been taken care of, so I’ve decided to put it up on GitHub for everyone to have a look at. The license, for those interested in reading past the words “Free and Open Source” is GPLv3.

Check it out!

I’m still hammering away at the details and if you follow me on Twitter, you’ll have seen that I’ve been having some serious fun with MySQL bulk inserts using LOAD DATA in the past few hours. The performance numbers are impressive (Osmosis imports take closer to a week, but also import a more comprehensive view of the data. Some columns are currently omitted from OSMGenerator), but I’m still not satisfied!