This might seem like an odd question, but the end-result will be a GPX file that is to be used in delineating areas in a Mapathon, in which the editor only uses GPX files.

My question is:

Does anyone know how to convert my annotation layer representing grid names inside polygons to a feature class, representing the text as lines? Meaning; the text has to be "written" with lines that contains actual spatial information. My hope is to create a feature class that contains the lines representing the text, as it would look in my annotation layer, but made of lines with coordinates. The image below only shows the annotations within my gridcells.

enter image description here

I am using ArcMAP, but Qgis and other potential softwares could be included. Please feel free to ask, if you want me to elaborate the problem statement any further.

  • Just thinking out aloud,you would need to somehow draw your words with polylines at a suitable scale.
    – Hornbydd
    Commented Nov 3, 2015 at 13:51
  • Yep, you could put it that way. I need at method that can do the drawing part, and I obviously do not want to draw the lines and letters myself... One thing that I have been trying, is to convert the annotation to DWG a CAD format. That didn't go well because it create points from the annotation layer. But my hope is that I can perform some kind of conversions.
    – aneh
    Commented Nov 3, 2015 at 14:02
  • Anno to Polygon then Polygon to Line help.arcgis.com/en/sdk/10.0/vba_desktop/conceptualhelp/…
    – Mapperz
    Commented Nov 3, 2015 at 15:57

3 Answers 3


Solution for advanced license only:

Annotations: enter image description here


enter image description here


enter image description here

Convert output polygons to polylines/points if necessary


Since i am a newbie when it comes to arcpy, i tried another workaround which, though its a bit ugly, led me to a reasonable solution. I went though these steps.

  1. Created the grid and displayed the labels at the proper scale i wanted. enter image description here

  2. Exported the map as an image, a good resolution tiff.

  3. Added the image to the map and georeferenced it according to the location of the grid already loaded in the TOC.
  4. After georeferencing i used the Con tool. In here I selected the georeferenced image as the Input conditional raster. As the expression i stated that Value = 0 should be selected and multiplied with constant value of 1. I selected the Value = 0 since this was the value of the black font. This meant that i now had an raster image only with the label writings. enter image description here
  5. Then i went ahead and used raster to line and then raster to polygon and then raster to line.
  6. Now that all of my labels and the grid cells were vectorized I went ahead and exported the layer to a GPX file. Voila.... enter image description here

I do not know of an out-of-box way to do this, however you could do it in python with the following steps:

  1. Convert feature class annotation to point feature class (fc)
  2. Using two nested cursors, use search cursor to iterate over each point fc and get the x/y coordinates, then nest insert cursor to create new points x distance to the east and west of first point until you reach whatever the max distance is to grid edge
  3. Define common ID for each set of points in step 2 and update a IDOrder field to define line direction (e.g. e->w or w->e). This could be using a update cursor. You could probably define the center point up front with the center IDOrder = 3 than the two points to the w could be 2 and 1 (going e to w) and the two points to the e of IDOrder 3 could be 4 and 5 (going w to e).
  4. Finally, on each grid point set use Points to Lines python method to connect the dots

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.