Skip to content

Automatic attribution with OpenJUMP

24. May 2013

Basic problem:

Working with a TopoJSON file, that has no attribute representing an identifier (ID) for each feature.

Solution:

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!)

  1. start OpenJUMP
  2. open the shapefile
  3. make it editable
  4. edit the shema…add a new field –> Name: ‘ID’, Type: ‘Integer’ –>click ‘OK’ when youre asked to save the changes on schema
  5. fill the new field with content –> Tools … Edit attributes … define attribute values automatically –> opens a new window
  6. select the layer and destinated field… click the checkbox for ‘automatic increasing’ … and … define the start value within the last text-field –> ‘OK’
  7. look into the attribute table…the ID should have automatic values

    OpenJUMP

    Define attributes automatically in OpenJUMP

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!

OpenJUMP2

Automatically defined ID-field

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: