Add Vertex – Script for Adobe Illustrator

Download Add Vertex (6k)

Update: Avenza MAPublisher 9.2.2 now offers functionality (Path Utilities/Add Detail) similar to Add Vertex that maintains attribute data when applied.

Add Vertex is a free script for Adobe Illustrator that adds vertices (anchor points) to lines and area polygons based on a maximum distance spacing that the user defines. It was written by Bojan Savric, Oregon State University, Cartography and Visualization Group. To create it, Savric modified the Divide (length) script by Sato Hiroyuki. The intended users of Add Vertex are mapmakers working with GIS data in Adobe Illustrator, coupled with the MAPublisher plug-in.

Additional vertices are necessary for converting lines drawn with Bézier curves in Adobe Illustrator (see A in the illustration below) to a form useable by GIS programs, which incorrectly interpret these sinuous curves as straight-line segments between the vertices (B).

 
illustration4

Add Vertex solves this problem. The example below shows a Bézier line with handles in Adobe Illustrator before (A) and after (B) applying the Add Vertex script, and with the Bézier curves removed (C). The more vertices placed on a line, the more closely it will approximate the original Bézier curve (A).

illustration1

Add Vertex is useful for densifiying lines with variably spaced vertices (see A below). After you specify the maximum allowed distance between vertices, the script adds vertices only where needed (B), in this case on the right side. It has ignored the tightly bunched vertices on the left.

If this line were the east-west trending US/Canada border, the extra vertices would allow it to bend southward as it should when mapped in a conic projection.

illustration2

The next example shows how Add Vertex places identical verticeson contiguous polygon borders. It treats coincident lines similarly.

illustration3

Installation and Use

To install Add Vertexin Adobe Illustrator CS5 or CS6, on Mac or Windows, do the following:

1) Download and un-Zip the Add Vertex script.

2) Go to the Applications folder (Mac) or Programs folder (Windows) and locate your version of Adobe Illustrator. Place "Add_Vertex.js" in the Presets/en_US/Scripts folder. (The "en_US" subfolder presumably will have a different name if your are not from the US.)

3) Restart Adobe Illustrator.

 

Using the Add Vertex script is easy:

1) Openyour Illustrator map and select the lines andpolygons that you wish to modify. You can also use the Direct Selection Tool to apply the script to partially selected lines and polygons.

2) Go to the File/Scripts drop menu. Select Add_Vertex.

3) In the dialog (see below) specify a distance in millimeters. The spacing between addedvertices will vary depending on the size of your map document. Experiment to determine the appropriate spacing of vertices.

 
  dialog  

Notes

• The Add Vertex script works slowly on large files with over 1,000 points, requiring patience.

With GIS data imported into Illustrator with MAPublisher, applying Add Vertex removes data attributes. The georeferencing remains intact, however.

• To remove Bézier curves in Adobe Illustrator, use the native Simplify feature in Illustrator. Go to Object/Path/Simplify, select the Straight Lines option, and leave the Angle set to 0 degrees, which is the default.

 

Beyond Adobe Illustrator – Sharing your data

Most cartographers working in Adobe Illustrator and who use the MAPublisher plug-in exclusively import GIS data. The data flow has been one-way. Now, by combining MAPublisher and Add Vertex, users of Adobe Illustrator can easily create map data and share it with the wider GIS and web mapping communities.

From the MAPublisher Map Views panel, map layers are exportable to many geospatial data formats, including ESRI shapefile, Google KML and KMZ, and AutoCAD DXF. And, as we have seen, the Add Vertex script, provides these exported data with the needed vertices to function properly in a GIS or online.

You can now use the excellent drawing tools in Illustrator to quickly and accurately digitize maps—and share your data with everyone.

 

This web page was created and designed by Tom Patterson.


Corvallis, November 2012