Open jpolchlo opened 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"}}
Bummer that numbers / booleans are converted to strings; maybe that should be addressed on the GeoMesa side.
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
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.