There are quite a few devs working with OpenStreetMap data in 3d and
judging from screenshots, they've been able to do some pretty awesome
stuff so far. I'm trying to do something similar and wanted some
feedback, specifically for rendering area data, that is, anything that
falls under the 'area' primitive in terms of OpenStreetMap data --
buildings, borders, etc. I'm particularly interested in how to convert
area/relation information from *.osm xml data into polygons that can
be rendered (decomposed into triangles).
Starting from the osm area primitive info [1], it's possible to get
contours (ie node lists) for outer geometry and holes within the area.
This data can then be fed into something like poly2tri [2], which is a
lib that will triangulate simple polygons (holes can be specified
too). The triangulated data is a mesh that can be fed into any
renderer, like OpenGL. However, we can't assume all area data are
simple polys; [4] shows some building geometry that's not strictly
simple. So my main problem/question to devs that are rendering
buildings/area geometry in 3d is:
* How do you build the 3d geometry for areas that are potentially
complex polygons?
[1] http://wiki.openstreetmap.org/wiki/Relation:multipolygon#Usage
[2] http://code.google.com/p/poly2tri/
[3] http://i.stack.imgur.com/W8Uym.png
Regards,
Preet
_______________________________________________
dev mailing list
d...@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev
I don't know about the 3d aspect and the triangulation, but I suggest you start
from something that already exists for assembling nodes, ways, and relations
into multipolygons. Several people have already implemented that part,
including partially fixing broken multipolygons etc. Then you can build your
stuff on top of that. I am aware of three implementations, one in osm2pgsql,
one in imposm, one in Osmium. (Info on all three in the wiki.) There might be
others. If you are ok with C++ and/or Javascript, Osmium is probably the
easiest to use, because unlike osm2pgsql and imposm, Osmium is a library thats
specifically built for including in other programs.
Jochen
--
Jochen Topf joc...@remote.org http://www.remote.org/jochen/ +49-721-388298
at the 2nd 3D Workshop in Garching we agreed all to use the forum for 3D
related discussions. So I guess this will be a better place with the
right audience. Just login with your OSM credentials
http://forum.openstreetmap.org/viewforum.php?id=42
bye
Matthias
(user:!i!)