OpenStreetMap Data + Randomized Colors == Trippy

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.



Here is what we get:



http://www.youtube.com/watch?v=RvvSXXjaVDI



http://www.youtube.com/watch?v=Sl9FSC6vQnQ



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

3 Likes

Heh, that looks awesome, don’t change that code ^^

very nice.

wicked! :slight_smile:

I love map data. I don’t know why, exactly. Your videos scream for some kind of trippy music, though. :slight_smile: Pretty cool, anyway.



Do you have a plan for the Z-fighting or is this already everything that it’s supposed to be? (there are some simple things in jme3 that can maybe get rid of 90% of it depending on available meta-data)

@pspeed said:
I love map data. I don't know why, exactly.


Same boat. So strangely organic but clearly man-made :)

@pspeed said:
Do you have a plan for the Z-fighting or is this already everything that it's supposed to be? (there are some simple things in jme3 that can maybe get rid of 90% of it depending on available meta-data)


I have a few possibilities for mitigating this (one of which I'm writing now). The geometry in the videos is created by throwing a batch of coordinates at JTS and just letting it sort the mess out (due to the order of the vertices, when I originally wrote the code for Betaville I was doing the triangulation on my own, so the order of the vertices zig-zagged back and forth to create triangles). I rewrote that code to form linear rings which should triangulate into clean meshes. The big blotches you're seeing are curved roads which, as linear rings, would keep their shape properly.

This should solve the z-fighting as well for 99% of the areas only leaving issues where roads overlap. Unfortunately, geological data does nothing for these areas as lat/lon 40/-73 is always going to have the same height (and same z-plane subsequently). There is limited data available in limited localities for crossings basically amounting to "this road goes over this one". Its not the greatest in the world, but I should then be able to approximate the amount of clearance depending on the legal restrictions on the road (a non-commercial parkway might only have a clearance of 13ft over the roadbed while an interstate carrying tractor-trailers will have significantly more).
1 Like

Since everything is flat, you could just turn off Z test completely and just let render order sort it out. In your case, that should be fine once the roads are roads and not big patches. I was going to suggest essentially doing that and sorting by surface area before I understood that those large polys were a mistake. :slight_smile:



…I thought they were areas or something.

A bit more work happening. @pspeed suggested an interesting approach to triangulation that I’m going to try implementing either late tonight or tomorrow :slight_smile:



http://www.youtube.com/watch?v=lR7QQZ3Xvb4



I’ve allotted myself 5 more days for OSM related work… Let’s see what comes out!

1 Like

Nice work. Is that NY?

Aye, Battery Park in Manhattan and downtown Brooklyn. It’s my local haunt :wink:

1 Like

I didn’t get to work on this much yesterday, and then lost what little progress I did make by deleting the wrong Git commit this morning. :roll:



Anyway, I’ve gotten to the point where geometries are now, for the most part, triangulated correctly. Thanks again to @pspeed for reframing the way I thought about the problem… It made it much simpler to solve :smiley:



http://www.youtube.com/watch?v=NauLvEu6KF4



More to come of course…

1 Like

Looks cool! I still think you should turn off z-test, though. :slight_smile:

1 Like
@pspeed said:
Looks cool! I still think you should turn off z-test, though. :)


Thanks!

Disabling z-test will happen on Saturday night when I've exhausted all of my options for levels and will be forcing myself to move on to the next data source ;)

I've actually made some progress on that front though. Subways and automotive tunnels are properly marked as such, so i'm able to drop them below by some amount. There's also the layer tag that I mentioned earlier in the thread that I'll be working with. "Layer" is a bit of a last resort though, as the data is pretty generic.

BTW, I also have varying road widths now depending on one way, number of lanes, etc :)