Automatic attribution with OpenJUMP
Working with a TopoJSON file, that has no attribute representing an identifier (ID) for each feature.
Add the attribute to the original shapefile, which was used to make the TopoJSON.
How to do that:
I like working with OpenJUMP…so I use this free GIS!
How to do it in OpenJUMP:
(I am working with the german version…so I hope my translation is right!)
- start OpenJUMP
- open the shapefile
- make it editable
- edit the shema…add a new field –> Name: ‘ID’, Type: ‘Integer’ –>click ‘OK’ when youre asked to save the changes on schema
- fill the new field with content –> Tools … Edit attributes … define attribute values automatically –> opens a new window
- select the layer and destinated field… click the checkbox for ‘automatic increasing’ … and … define the start value within the last text-field –> ‘OK’
- look into the attribute table…the ID should have automatic values
Applied on my task:
I need that ID-attribute within a TopoJSON-file that contains german units of states, counties and municipalities.
That means I want to start the automatic ID for the states (0-15), go on for counties (16-417) and finally define the municipalities (418-12.043).
So I have to repeat the steps 2-6 for each shapefile. Step 6 start value:
- states: 0
- counties: 16
- municipalities: 418
Be aware of always re-selecting the correct layer and field in step 6!