Introduction


One of the desirable features for COD-AB (and COD-EM) datasets is a line shapefile with an 'admLevel' attribute field designating the administrative level of each line segment i.e., '0' representing international borders (but '99' representing coastlines); '1' representing lines between distinct administrative level 1 units, etc.; and integers between 10 and 90 reserved for special-status boundaries.  These files are necessary for the best cartographic symbology.  The alternative is to symbolize and sequence all polygon boundaries so that higher level boundaries have dominant symbols, revealing lower level boundaries in between.  (Even if these are carefully disguised by symbol size and order, shorelines cannot be symbolized properly.)  ITOS makes these line shapefiles when they process COD-AB and COD-EM datasets but if a country is not yet ITOS processed the coded line file can also be made with the following instructions.

The process may be unnecessary for island or landlocked countries containing only administrative level 0 polygons.

Polygon symbolization example 

Colombia ("Colombia - Subnational Administrative Boundaries" COD-AB available on HDX here)

The Colombia COD-AB features administrative levels 0, 1, and 2.  These levels will be symbolized with successively wider and darker lines, with the administrative level 0 (international / shoreline) boundary widest and boldest.


Colombia administrative level 0 (international / shoreline) polygon symbolization


Colombia administrative level 1 (department / capital district) polygon symbolization


Colombia administrative level 2 (municipality) polygon symbolization


Colombia, crude administrative level 0, 1, and 2 polygon symbolization


Preferred symbology example

Colombia, administrative level 0, 1, 2, and shoreline lines symbolization


The preferred symbolization applies distinct symbologies to specifically labelled line features.  No line feature relies on its symbol obscuring other layers, and special features like shorelines or disputed boundaries can be symbolized distinctly at the same level.

Methodology

STEP 1:  Create the polyline shapefile. 

The goal is to create a shapefile with individual line features between nodes and left and right polygon identifiers.  (Polygon shapefile exterior features have their left polygon identified as '-1'.)  This can be performed with ArcGIS 'Advanced' license or the registered version of ET GeoWizards.

Software environmentMethodology
ArcGIS ('Advanced' license)

Run the ArcGIS ‘Polygon to Polyline’ tool (Toolbox > Data Management Tools > Features > Polygon To Line) with:  "Input Features" = (input polygon shapefile); "Output Feature Class" = (as desired); "Identify and store polygon neighbouring information" selected; and all environment settings set as default.


Sample input parameters:


Output attribute fields:


Sample output (partial):


This process generates a lines shapefile with one line ('arc') along each border between nodes, and identifies the left and right polygon Feature Identifiers (FIDs) for each line feature.  By convention, the outer polygon boundary is always stored in a clockwise direction so while every line will have a polyon on its right, lines on the exeteror of the input shapefile will have no polygon on their left.  The attribute table indicates these cases with the left_FID = -1.

The left_FID and right_FID attributes enable the administrative level determination described in Step 4; but this is only after establishment of the left and right polygon administrative levels.

THIS ARTICLE WILL BE UPDATED AND COMPLETED SHORTLY.


ET GeoWizards registered version

Run the Polygons TO Polylines Advanced tool

Select the 'OBJECTID' field for the 'Link field'.  Do not select 'Export points'.  With newer versions of ET GeoWizards it may be necessary to make and select a new item, with values equal to 'FID' for this purpose.



The remaining processes are completed in ArcGIS, regardless of the software environment used above.

STEP 2:  PREPARE THE P-CODE FIELDS IN THE POLYLINE SHAPEFILE


Administrative levels in boundary polygon shapefile

Required new fields in boundary polyline shapefile

Administrative level 0'admLevel' (integer)
Administrative levels 0 and 1

'LEFT_A0', 'RIGHT_A0' (normally text)

'admLevell' (integer)

Administrative levels 0, 1, and 2

'LEFT_A1', 'LEFT_A0', 'RIGHT_A0', 'RIGHT_A1' (normally text)

'admLevel' (integer)

Administrative levels 0, 1, 2, and 3

'LEFT_A2', 'LEFT_A1', 'LEFT_A0', 'RIGHT_A0', 'RIGHT_A1', 'RIGHT_A2' (normally text)

'admLevel' (integer)

Note that in the unusual case of numeric P-codes, the new fields should also be numeric.  The LEFT and RIGHT fields can be removed after the process is complete, so their names do not have to be those shown.


STEP 3:  POPULATE THE POLYLINE P-CODE FIELDS


Administrative levels in boundary polygon shapefileRequired calculations
Administrative levels 0 and 1

polyline shapefile 'LEFT_A'0 = polygon shapefile 'ADM0_PCODE'

Administrative levels 0, 1, and 2

polyline shapefile 'LEFT_A0' = polygon shapefile 'ADM0_PCODE'

polyline shapefile 'LEFT_A1' = polygon shapefile 'ADM1_PCODE'

Administrative levels 0, 1, 2, and 3

polyline shapefile 'LEFT_A0' = polygon shapefile 'ADM0_PCODE'

polyline shapefile 'LEFT_A1' = polygon shapefile 'ADM1_PCODE'

polyline shapefile 'LEFT_A2' = polygon shapefile 'ADM2_PCODE'


Tip
Usually when the Field Calculator is re-opened during an editing session it maintains the previous calculation expression ("[tl_admbnda_adm3_who_ocha_C.adm2code]" in the above example.  Therefore is is usually only necessary to edit the administrative level number to prepare the next calculation.

STEP 4:  CALCULATE THE ADMINISTRATION LEVELS

ADMINISTRATIVE LEVEL 0

SHORELINE TREATMENT

TIP:  Displaying the input polygon shapefile can suggest the location of individual line shapefile segments, which makes them easier to select.
















TIP:  For complex cases, select and calculate the line segments in sections.  Establish line symbology that clearly distinguishes the calculated segments.



Check carefully for discontinuities

HIGHER ADMINISTRATIVE LEVELS

Administrative level 1

Set a definition query for LEFT_A0 = RIGHT_A0 and LEFT_A1 <> RIGHT_A1.  

Explanation:   Definition query "LEFT_A0 = RIGHT_A0 and LEFT_A1 <> RIGHT_A1" will select the line features that are not administrative level 0 borders (either shorelines or international borders) but are separating administrative level 1 units.

In this map the administrative level 1 polygons are shaded to show that the lines separate administrative level 1 units.

In this map the administrative level 1 polygons are colored to show that the lines are only inside the polygons


Explanation

International borders and shorelines



Administrative level 1 lines:



Administrative level 2 lines




Administrative level 3 lines




Related articles




Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.




Related issues








PREREQUISITE:

  • ArcGIS Desktop Advanced, OR