Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

One of the desirable features for COD-AB 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.  These files are necessary for the best cartographic symbology.  The alternative is to symbolize all polygon boundaries so that higher level boundaries have multiple symbols.  (Even if these are carefully disguised by symbol size and order, shorelines cannot be symbolized properly.)  ITOS makes these line shapefiles when they process your countries but if a country is  is not yet ITOS processed the coded line file can also be made with these instructions.

...

Software environmentRemarksMethodology
ArcGISRequires '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 neighboring information (optional)" selected; and all environment settings set as default.


Sample input parameters:


Sample output:

ET GeoWizard free versionLimited to 100 features

Run 'Polygon to Polyline' tool:  


Sample input parameters:  


Then run the 'Clean Polylines' tool:


Sample input parameters:  

ET GeoWizards paid versionNot yet evaluatedAnticipated to be the same as the 'ET GeoWizards' free version process described above
QGIS

Not suitable.  It appears that the QGIS plugin makes polylines around the whole, rather than distinct lines between nodes.  If any user has more information, please contact ocha-fis-data@un.org.

...

    • Click ‘OK’
  • Begin editing the polyline shapefile
  • Open the output polyline shapefile attribute table
  • Use the Field Calculator to calculate all the LEFT_Ax values (for the LEFT_Ax fileds files recently added to the polyline shapefile ) equal to the coresponding corresponding administrative levels of the polygon shapefile.

...

  • Close the attribute table, remove the join, and establish a new join basing on RIGHT_FID.  Anticipate all records matching.
  • This time there should be no need to make a definition query, as there should be no null values.
  • Open the output polyline shapefile attribute table.
  • Use the Field Calculator to calculate all the RIGHT_Ax values (for the RIGHT_Ax fileds files recently added to the polyline shapefile ) equal to the coresponding corresponding administrative levels of the polygon shapefile.
  • Create a definition query to select the line segments with different LEFT_A0 and RIGHT_A0 attributes.

...

Recall that shoreline features need to be coded specially especially as '99'.  If the country has a shoreline follow the SHORELINE TREATMENT steps.

...

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

...