mbloch / mapshaper

Tools for editing Shapefile, GeoJSON, TopoJSON and CSV files
http://mapshaper.org
Other
3.78k stars 535 forks source link

SVG export not including full relations #563

Closed booonen closed 1 year ago

booonen commented 2 years ago

Trying to export .geojson multipolygons (polygon features) into SVG through Mapshaper - previously (some amount of months ago) this worked flawlessly, but trying this now results in several shapes being lost.

See below a screenshot from mapshaper, with one of the multipolygon relations selected: image As you can see, this relation is divided into two large parts. Previously, these relations would be exported into SVG as a grouped object, with the name being "relation/[id]" - upon exporting to SVG now, this is the result:

image

The top half of the relation disappeared; and does no longer exist in the SVG. Consistently in my export, each relation with multiple areas - whether it be islands or exclaves, has one of these areas exported, and the rest ignored. The exception turns out to be areas consisting of only one line which are (seperately) exported no matter what.

Though I'm uncertain whether or not the new approach to exporting these relations into SVG (as seperate objects instead of grouped) is intended behaviour (it would add a little extra manual work to my use-case if so, but not the end of the world), I doubt the non-exportation of these split relations is intentional.

Can provide example file if needed.

mbloch commented 1 year ago

Hi @booonen ... sorry for the slow follow-up... can you give me an example file, to help me reproduce this? Thanks :)

mbloch commented 1 year ago

I wasn't able to reproduce this problem in my own tests. There may be something particular to this one dataset that is triggering the problem. If I can find a sample file that exhibits this behavior, then I'll reopen this issue.