mbloch / mapshaper

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

Add attribute data to merged layer #530

Open imranamikhan opened 2 years ago

imranamikhan commented 2 years ago

Hi everyone,

I am quite new to editing shape files so apologies for the ignorance here.

Context:

As a result of a recent merge of local districts in England, I have merged a few layers (districts) into one layer to reflect this change. I have achieved this by following the guidance linked below:

https://help.flourish.studio/article/187-how-to-merge-regions-with-mapshaper#:~:text=To%20do%20this%2C%20open%20the,polygons%20by%20erasing%20shared%20boundaries.&text=Go%20back%20to%20the%20main,one%20region%20in%20your%20map.

Issue:

However, mapshaper warns me that the attribute data for the merged layer is lost. This makes sense because I merged multiple layers with different attribute values into one layer.

Could anyone advise how I could add attribute data into this merged layer? Would I require a separate program for example?

Thanks, AmiK

chris3522 commented 2 years ago

Maybe this issue could help you: https://github.com/mbloch/mapshaper/issues/353

imranamikhan commented 2 years ago

Thanks @chris3522.

The attribute values from the layers which have been merged is not needed. What I want to do is create attribute values for the new merged layer. The attribute metadata should be the same as the other layers on the map. However, I am not sure if mapshaper is the correct application to use to do this?

Below is an example of the attribute structure from all layers in the map.

OBJECTID | 54 LAD21CD | E06000057 LAD21NM | Northumberland BNG_E | 395322 BNG_N | 600699 LONG | -2.07522988319397 LAT | 55.30036926269531 SHAPE_Leng | 557431.416649587 SHAPE_Area | 5078321480.209943

And I want to create attribute metadata for the new merged layer based on this structure.

I hope this makes sense?