Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on "properties":null where "properties":{} is expected #660

Open
sebastiaan6907 opened this issue Sep 15, 2024 · 2 comments
Open

Error on "properties":null where "properties":{} is expected #660

sebastiaan6907 opened this issue Sep 15, 2024 · 2 comments

Comments

@sebastiaan6907
Copy link

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.

@mbloch
Copy link
Owner

mbloch commented Sep 17, 2024

"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?

@sebastiaan6907
Copy link
Author

-o format brace or -o format curly brace, would be a clear description I would say. And thanks for the quick fix!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants