[x3d-public] Open Street Map to GeoJSON to X3D JSON

clement at igonet.fr clement at igonet.fr
Sat Dec 19 23:30:28 PST 2015


Well... So, I used to use default coordinate system with meter as unit and center of the scene at level 0 as origin.
Indeed, my conversion from default coordinate system to geo one can't work as is. I will provide again default system and fix my buggy and not tested geo X3D export.
I've just updated Open Earth View wiki page with TODO notes.

Thank you Andreas for having looked at such important details!

Clément.

Le 19 décembre 2015 19:36:10 UTC+01:00, Andreas Plesch <andreasplesch at gmail.com> a écrit :
>Date: Sat, 19 Dec 2015 02:55:17 +0100
>
>> From: Clement IGONET <clement at igonet.fr>
>>
>> For those who could be interested, I've coded a little converter
>> focused on Open Street Map buildings.
>> This converts OSM data to GeoJSON and then, to X3D JSON.
>> Source code here:
>> https://git.framasoft.org/pizaninja/OpenEarthView/tree/master/osm2x3d
>> also available as npm package: osm2x3d
>
>
>Hey, this looks great. I was wondering if it would be possible to use
>x3d
>GeoCoordinates in the x3d output but after looking into the code I
>realized
>that it is hard to use those with 2d geometries. So this leads to a
>more
>general x3d question:
>
>While there is a Coordinate SFNode for 3d geometries, there is not an
>equivalent 2DCoordinate SFNode for 2d geometries. Instead Polyline2D,
>Polypoint2D and TriangleSet2D use MFVec2f fields such as linesegments,
>point [should be plural?] and vertices to specify 2d coordinates.
>
>If instead a 2DCoordinate SFNode would used, there could also be an
>equivalent Geo2DCoordinate. The Y=0 equivalent would 0 elevation (eg.
>the
>third component would be zero).
>
>The cross-section of the Extrusion node is related. How do you deal
>with a
>building foot print given in geographic coordinates that you would like
>to
>extrude vertically ? This is the typical KML, GeoJSON, OSM setup.
>
>Currently one has to produce local coordinates for the cross-section
>(foot
>print) of the building first, then use Extrusion and GeoLocation.
>
>Is it necessary to have a GeoExtrusion node ?
>
>On the other hand it is not too hard to programmatically construct a
>IndexedFaceSet with the necessary connectivity between the vertices to
>produce an extrusion.
>
>And instead of the 2D geometries one could use the 3d equivalents:
>LineSet,
>PointSet and TriangleSet.
>
>So I guess it comes to down to a question of design and convenience.
>
>-Andreas
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>x3d-public mailing list
>x3d-public at web3d.org
>http://web3d.org/mailman/listinfo/x3d-public_web3d.org

clement at igonet.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151220/40c062eb/attachment.html>


More information about the x3d-public mailing list