Last active
December 20, 2017 04:47
-
-
Save palmerj/07df8f09f389f01cb6b39dd66f93ef3d to your computer and use it in GitHub Desktop.
OGR Create JSON centroid for labelling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ogr2ogr -f GeoJSON labels.json WFS:"https://data.linz.govt.nz/services;key=$LDS_API_KEY/wfs/layer-51572" -dialect sqlite -sql 'SELECT id, lease_name AS name, ST_Centroid(geometry) from "data.linz.govt.nz:layer-51572"' -lco COORDINATE_PRECISION=4 -t_srs "EPSG:4326" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Even better way to remove GeoJSON schema with jq: