export geojson

export geojson

Return to topic list

Thu Nov 16 03:14:25 2017   by   Alex Muro
How difficult would it be to modify this planet generator to export geojson (http://geojson.org) files that held say polygons of different levels of elevation. Has anyone tried anything similar? I'm thinking about giving it a shot and pointers would be appreciated.
 
Thu Nov 16 11:08:19 2017   by   Torben
The planet generator generates altitudes for individual points, so it would not be difficult to generate GeoJSON points.  The files would be huge, though.

Generating polygons is possible, but a bit more difficult.  The planet generator works by subdivision of irregular tetrahedra, so if you stop subdivision before you reach pixel-level detail, you can project the corners of the tetrahedron onto the spherical surface to get longitude/latitude for each point.  The four projected vertices would then form a polygon.  The corners of these polygons would be at different elevations and would form something akin to a triangulation of the surface.

If you want polygons of same altitude, it is probably easiest to generate a bitmap with contour lines and trace these to generate polygons.
 
Thu Nov 16 14:24:08 2017   by   Alex Muro
How difficult would it be to modify this planet generator to export geojson (http://geojson.org) files that held say polygons of different levels of elevation. Has anyone tried anything similar? I'm thinking about giving it a shot and pointers would be appreciated.
 
Thu Nov 16 14:27:29 2017   by   Alex Muro
Hey Torben,

  Thanks for the response. Yeah I was hoping for polygons of elevation contours. I have had some luck generating them from black and white contour files generated from images using qgis but that takes a v long time. I'm planning on taking a closer look at the code today to see if I can use the countours to create polygons.

Cheers,
Alex
 

Return to topic list



New message:
Topic:
Posted by:

Type the values of the dice shown below:

Return to topic list