geotrellis / vectorpipe

Convert Vector data to VectorTiles with GeoTrellis.
https://geotrellis.github.io/vectorpipe/
Other
74 stars 20 forks source link

Output pathway for DataFrame to GeoJSON #88

Open jpolchlo opened 5 years ago

jpolchlo commented 5 years ago

After processing OSM or other inputs into a DataFrame of JTS geometry and added attributes, we may find it useful to produce line-delimited GeoJSON output. Some workflows will prefer this to vectortile output (or for those users who would prefer to use Tippecanoe for VT generation). We should explore how to create such an output pathway.

mojodna commented 5 years ago

This may be as simple as using df.toGeoJSON and writing 'value to a text file.

Sample row:

{"type": "Feature", "geometry": {"type":"Point","coordinates":[-83.1545467,42.2953661]}, "properties":{   "_type": "1",  "id": "18833581",  "tags": "Map(source -> PGS, created_by -> r_coastlines)",  "changeset": "73729",  "updated": "2007-05-30 10:34:26.0",  "validUntil": "null",  "visible": "true",  "version": "1",  "minorVersion": "0"}}
mojodna commented 5 years ago

Bummer that numbers / booleans are converted to strings; maybe that should be addressed on the GeoMesa side.

mojodna commented 5 years ago

Uhh, it also looks like it'll break on values with quotes: https://github.com/locationtech/geomesa/blob/master/geomesa-spark/geomesa-spark-jts/src/main/scala/org/locationtech/geomesa/spark/jts/util/GeoJSONUtils.scala#L42