Closed 2803media closed 1 year ago
The clip
command does not transfer attribute data from the clipping shapes to the target shapes (it sounds like this is what you want to do). You can try the -union
command, which takes two target layers and combines them into a single output layer, while retaining attributes from both layers. After running -union
, you would use -filter
to retain only those shapes that have attributes from both of the input layers. Try running -union target=PLU_0,communes
in the web UI console and inspect the result... that may put you on the right track.
@mbloch great thanks this is working as expected !
mapshaper -i communes.shp -i PLU_0.json \
-union target=PLU_0,communes \
-filter 'partition != null' \
-o PLU_0.shp
Hi I have two files:
communes.shp
And PLU_0.json
I want to clip communes with PLU_0 and export the result as a CSV file, so I use this command:
This works but the CSV file is made of the layer information from the first layer and after information from the second one:
How I can "flatten" the information per item in order to have "code,epci,partition" with the relation in the same feature
Thanks for your help