mbloch / mapshaper

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

Filter lines still create polygons #626

Closed atavoidturk closed 6 months ago

atavoidturk commented 7 months ago

after using -filter on a polyline layer, using -polygons still uses the filtered lines to create polygons

atavoidturk commented 7 months ago

this occurs if a layer with the same source is present, which makes it impossible to remove the light blue lines

mbloch commented 7 months ago

I see... yes... if another layer is still using the paths that show up as light blue lines, then -clean will not remove the lines, that is how mapshaper currently works. If you deleted the other layer and then ran -clean, the lines would disappear.

I added the blue lines a long time ago, as a way to see which paths are removed when filtering and dissolving. I've considered removing this feature, it's not essential. Maybe hiding the lines should be the default.

Meanwhile, there's another way to hide the blue lines. That is to add a style to the layer, for example, by running the command -style stroke=black. When you do this, mapshaper switches to a preview view, which shows the layer as it would appear in a map.

Screenshot: "clean" command doesn't remove blue lines when source layer is still present image

Screenshot 2: using the "style" command to suppress the blue lines. image

Screenshot 3: deleting the original layer and then running clean also removes the blue lines image

atavoidturk commented 7 months ago

-mosaic also creates polygons using filtered lines, and the creation of incorrect polygons persists after -style

mbloch commented 7 months ago

noted, thanks

mbloch commented 6 months ago

The issues with -polygon and -mosaic are fixed in v0.6.70