mbloch / mapshaper

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

Clip multiple layers (?) #620

Open Dekkerb opened 5 months ago

Dekkerb commented 5 months ago

image I have multiple layers of the Natural Earth data-set opened in Mapshaper. I would like to clip each layer to the same rectangle, that I created earlier with the shift-drag tool. When I use the command "clip source=rectangle target=*" I get the error message: "[clip] This command does not support targetting layers from different datasets" So, either I'm doing something wrong (usually the case) or the Clip-command doesn't support my request. If the latter, could that be implemented? Or is there a simple workaround, something with "-each", probably. Of course I can repeat the clipping-action several times, but I want to make a copy&paste script with no manual input necessary.

Dekkerb

Dekkerb commented 5 months ago

...It seems I have found a use for the "merge-layers" command!

mbloch commented 4 months ago

Hi! There are some limitations on what you can do that I should work on removing. Thanks for bringing this to my attention.