You are here: Home > Maps > European Energy > Coast Lines
European Energy: Showing coast lines and boundaries on a thematic map
Rate this effect!
Default polygon outline symbology is often not appropriate for mapping.
Default polygon outline symbology is often not appropriate for mapping.
Same area properly symbolized.
Same area properly symbolized.

What: Coastlines are typically symbolized with a blue line that is the same hue as the water polygons, just darker. Boundaries are typically symbolized so they clearly show the boundary. Further, the boundary line symbol should not be confused with any other lines on the map. Why: The coast line symbol helps the map on the right by enhancing visual contrast of the land-water interface, while keeping the choropleth information in the background plane of the map. For more information about coast vignettes refer to the technical artical called: What are coastal vignettes and how can I create them.

How: In this map, we started with just country polygons and no coastline data. The country polygon data was geoprocessed and the result edited in order to create new data for coastlines and interior political boundaries. Here is how you can do the same:

  1. Select the countries that will be on the map with the interactive selection tool.
  2. Use the Copy Features tool to copy the selected countries to a new feature class called Coastlines.
  3. Use the Polygon to Line tool with the coastlines as input and a new line feature class called boundaries as output.
  4. Start Editing.
  5. Right click on the coastline layer in the table of contents, click on Selection, and choose Select All.
  6. From the Editor menu choose Merge. It does not matter which feature’s attributes you pick in the Merge dialog box.
  7. Use the Polygon to Line tool with the merged coastlines to create a new line feature class. This will be a temporary feature class that can be deleted after step 10.
  8. On the Tools toolbar click the Clear Selection command.
  9. New use the Select by Location tool to select all boundaries that share a line segment with the result of step 5. Delete these features.
  10. Save Edits and Stop Editing.
  11. Symbolize the boundaries
    1. Choose a cartographic line symbol.
    2. Set the line width to 0.4—notice in the figures above, the wider line line on the left is too large given the detailed geometry of the features and as a result draws poorly.
    3. Set the color using the HSV sliders to be have a 10-20% lower saturation and value than the darkest color in the choropleth color ramp.
  12. Symbolize the coastlines:
    1. Choose a cartographic line symbol.
    2. Set the line width to 0.2.
    3. Set the color using the HSV sliders to have a 15-30% lower saturation and value than the water fill symbol for the map.
Don't bother if you don't have ArcInfo posted by Jim Herberich on Jun 20 2007 1:06PM
Why do you need ArcInfo to do this workflow, specifically "Polygon to Line"? OK Mapping Team, tell me how to do this with ONLY ArcView!
Anything is possible with Python posted by Kim Ollivier on Aug 23 2007 7:06PM
I took up the challenge to do this with an ArcView licence only. It was easy enough if you are prepared to build a new tool.
1. Convert polygons to polylines using the Samples Toolbox (not added by default, but its there from 9.1+)
I edited the "Write features to Text File" Tool to write unique 2 point segments using a simple dictionary instead of polygon rings.
Then reload using "Create Features from Text File"
2. Dissolve out the original polygons to enable you to select the external v internal segments using select by location. Add a field and tag and dissolve (no multipart option crashes, do that as another step)
3. Symbolise using the tag.
All this could be pulled together into a single tool with temp layers.
Python edits:
# polytoline.py
# read all polys and output as two-point lines
# for better symbolisation
# drop duplicate segments by making a segment dictionary to test against
# leave dissolve after tagged with spatial select
# KimO 24 August 2007
# derived from WriteFeaturesFromTextFile (should be To!)
# should have noted upgraded to 9.2
# drop any Z and M values
'''----------------------------------------------------------------------------------
Tool Name: WriteFeaturesFromTextFile
Source Name: WriteFeaturesFromTextFile.py
Version: ArcGIS 9.1
Author: Environmental Systems Research Institute Inc.
Required Argumuments: An input feature class
An output text file
An input decimal separator character that indicates what character
should be used to separate the whole number from its decimal.
Description: Writes the features of a feature class out to a text file.
----------------------------------------------------------------------------------'''

import string, os, sys, locale, arcgisscripting
gp = arcgisscripting.create()
gp.overwriteoutput = 1

msgNotEnoughParams = "Incorrect number of input parameters."
msgUseValidDecimalPointSep = "Please use one of the valid decimal point separators."

try:

if len(sys.argv) < 4: raise Exception, msgNotEnoughParams
inputFC = sys.argv[1]
outFile = open(sys.argv[2], "w")

arg3poss = ['default python output', 'locale decimal point', 'comma', 'period', '$sep$']
if sys.argv[3].lower() not in arg3poss: raise Exception, msgUseValidDecimalPointSep

if sys.argv[3].lower() == arg3poss[1]:
locale.setlocale(locale.LC_ALL, '')
sepchar = locale.localeconv()['decimal_point']
elif sys.argv[3].lower() == arg3poss[2]: sepchar = ','
elif sys.argv[3].lower() == arg3poss[3]: sepchar = '.'
elif sys.argv[3].lower() == arg3poss[4]: sepchar = '$SEP$'
elif sys.argv[3].lower() == arg3poss[0]: sepchar = ""

inDesc = gp.describe(inputFC)

inRows = gp.searchcursor(inputFC)
inRow = inRows.next()
# begin file
outFile.write("Polyline\n")
# create a segment dictionary
dictSeg = {}
while inRow:
feat = inRow.GetValue(inDesc.ShapeFieldName)
partnum = 0
partcount = feat.partcount
while partnum < partcount:
header = str(inRow.GetValue(inDesc.OIDFieldName)) + " " + str(partnum) + "\n"
# don't write header yet
part = feat.getpart(partnum)
part.reset()
pnt = part.next()
pnt_count = 0
# remember the start vertex
firstLine = str(0) + " " + str(pnt.x) + " " + str(pnt.y) + " 1.#QNAN 1.#QNAN\n"
firstPt = [pnt.x,pnt.y]
pnt = part.next()
while pnt:

outLine = str(1) + " " + str(pnt.x) + " " + str(pnt.y) + " 1.#QNAN 1.#QNAN\n"
# check if mid point in dictionary
midPt = ((pnt.x + firstPt[0]) / 2.0,(pnt.y + firstPt[1])/2.0)
if not dictSeg.has_key(midPt) :
outFile.write(header)
if sepchar == "": outFile.write(firstLine)
else: outFile.write(firstLine.replace(".", sepchar))
if sepchar == "": outFile.write(outLine)
else: outFile.write(outLine.replace(".", sepchar))
dictSeg[midPt] = partnum
firstLine = str(0) + " " + str(pnt.x) + " " + str(pnt.y) + " 1.#QNAN 1.#QNAN\n"
pnt = part.next()
pnt_count += 1
# repeat xy for new segment but renumber vertex

if not pnt:
pnt = part.next()
if pnt:
# disable outFile.write("InteriorRing\n")
firstLine = str(0) + " " + str(pnt.x) + " " + str(pnt.y) + " 1.#QNAN 1.#QNAN\n"
firstPt = [pnt.x,pnt.y]
# skip to start of interior ring
partnum += 1
inRow = inRows.next()
outFile.write("END")
outFile.flush()
outFile.close()

except Exception, ErrorDesc:
gp.AddError(ErrorDesc[0])
if outFile: outFile.close()
gp.AddError(gp.getmessages(2))
Arcscripts posted by Lynn Gionette on Sep 6 2007 9:00AM
Check out the ESRI arcsripts downloads for any tools that can be used with the ArcView Licence. A number of tools that are for ArcInfo only can be found here, uploaded by a user. http://arcscripts.esri.com/
Re: Anything is possible with Python posted by Timothy Tresohlavy on Mar 16 2010 8:03PM
Learn from Google: SIMPLE IS BETTER. Why are we trying to write scripts to perform functions that once were included in ArcView 3.2, however are now only available if you buy an ArcInfo license? What happened to having a software program that was easy to use and intuitive, rather than burdened with 'levels' of compatibility, or filled with layers, and layers, and layers of otherwise hidden functionalities? Who uses three software packages to complete one task? And who has the time?
I like scripting! posted by Aileen Buckley on Mar 17 2010 10:09AM
As a old AML and ArcWorkstation user and a current Python user (I dabbled a bit in Avenue but prefer the scripting languages), I LIKE the scripting capabilities. While you suggest that these take time, over the long haul they can save time, and they also assure consistency and provide documentation. In addition, they can be shared amongst users. If you are trying to save time, try looking for scripts and models that users and developers have posted on the Geogrocessing Resource Center to share their work with others -- there are some fabulous downloads there: http://resources.esri.com/geoprocessing/index.cfm?fa=codeGallery. AND note that one of the most recent blog entries on Mapping Center provides a model template that you can use to start making your own model -- not from scratch.

One last comment -- Python is integrated into ArcGIS in such a way that it is easier to think of it NOT as a separate software package. And there are some VERY exciting capabilities for cartography that will be available soon with the next release of the software. So I sincerely hope that map makers will overcome their fear or reluctance to learn a bit of scripting to tackle some of their cartographic work -- it really is a wonderful way to save time and effort and achieve great results! PLUS share them with others!!!
Not available in ArcView. posted by Aileen Buckley on Mar 17 2010 10:15AM
One other thing, that functionality was not available in ArcView, and it was much harder to program it in Avenue.

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |