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

-merge-layers makes separate files when source layers have null geometries #662

Open
jkeefe opened this issue Oct 3, 2024 · 0 comments
Open

Comments

@jkeefe
Copy link

jkeefe commented Oct 3, 2024

I was trying to merge three files into one, but got three output files instead.

Very likely, this is because sometimes one or more of those files have null geometries.

Command I used:

mapshaper -i filea.json fileb.json filec.json combine-files \
		-merge-layers \
		-o format=geojson precision=0.001 merged.json

In my test case, each source file is essentially empty:

{"type":"FeatureCollection", "features": [
]}

Resulting in:

[o] Wrote data/merged1.json
[o] Wrote data/merged2.json
[o] Wrote data/merged3.json

Ideally, we'd end up with one merged.json file that contains this:

{"type":"GeometryCollection", "geometries": [
]}

Current workaround is to add the combine-layers to the -o command in lieu of using -merge-layers.

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

3 participants
@jkeefe and others