Error on "properties":null where "properties":{} is expected
sebastiaan6907 opened this issue · 3 comments
Hi Matthew,
I use the following command:
npx mapshaper-xl 24gb perceelgrenzen.geojson -simplify 51% -filter-islands remove-empty -drop fields=id -o precision=0.00001 geojson-type=FeatureCollection perceelgrenzen_simpel.geojson
By using the -drop fields=id I achieve to eliminate all properties for each feature in order to minimise the file size.
Mapshaper formats this situation with:
"properties":null
Where some services, like Mapbox, expect:
"properties":{}
Are you able to change mapshaper's notation when there are no properties?
Manually editing the simplified 3Gb file is a bit cumbersome.
Regards.
"properties": null
is valid GeoJSON, and mapshaper will continue to use this as the default for features with no data properties. I'm open to adding an option to the -o
command to use {}
instead of null
. We'll need a good name for that option, do you have any suggestions?
-o format brace or -o format curly brace, would be a clear description I would say. And thanks for the quick fix!!
The latest release has this option.. I named it -o no-null-props