shrug-l: Reprojecting Geodatabase Annotation.

Griffin, Jason jgriffin at co.pinellas.fl.us
Fri Jan 20 13:42:13 EST 2012


I love creating dynamically placed labels, and Maplex to this day is one of my favorite things to work with in ArcMap.  Unfortunately, not everyone likes or has the patience to orchestrate and fine tune an ecosystem of beautifully placed labels so we are stuck maintaining geodatabase annotation.

If any of you have ever needed to reproject an annotation feature class you may have noticed that if you use the project tool your newly created annotations be poorly aligned/improperly transformed etc.  When you are going from "NAD27 Florida West US Feet," to "NAD83 HARN US Feet" the shift is both apparent and embarrassing.  So what do you do when the tools fail you?  You find some other tools and bend them to your mercy...

I found an old document on the web outlining roughly how to do these steps manually:

http://support.esri.com/en/knowledgebase/techarticles/detail/27857  (It says that the current project tool fixes this issue, but I don't believe it does).

...but I've got a whole bunch of annotation datasets that I need to regularly consume and no time to babysit them so we have the result below:

[cid:image005.jpg at 01CCD76A.CA0C7120]

The Iterate Feature Classes tool allows you to specify a workspace and recursively search for specific data types.  In this case I'm looking for annotation feature types.  The output of the iterator is a name variable that gives the dataset's name.  Since I'm in SDE I have a prefix in my Name variable that I want to strip out.  With the parse path tool I chose the option file extension because I want everything to the right of the period in my name.  So for instance Name = 'EGIS.data' but Data Name will = 'data' only.  Not everyone is going to need to go this far to pass the correct name variable to the output location so you will need to adjust accordingly.

Now, since there isn't a geoprocessing tool to create an empty annotation feature class (That I know of) I'm using the Feature Class to Feature Class tool with a selection query:  OBJECTID is null, to create an empty annotation feature class in the data source's NAD27 Florida West US Feet projection.  I had originally tried the Make Feature Layer tool, however the Project step afterwards would actually project the entire dataset first, then honor my definition query of OBJECTID is null to produce the empty dataset so the Feature Class to Feature Class tool was more advantageous.  Next, the Project tool takes my empty dataset and creates a new copy of the data in the desired output location in NAD83 HARN Florida West US feet projection I also set the transformation here since I can reuse the variables in the Append Annotation tool (Attached as environmental Variables).  I had also tested moving the data over and just using the Define Projection tool to overwrite the settings, but the results were a bit flakey, and I actually received a ST_SRID geometry error at one point, but this could have been a database related issue.  ...There are always options :)

After the data dataset get's created where we want it, and has the correct projection I delete my temporary feature class, and run the Append Annotation tool.  I am using the Select Data Model Builder only tool as an intermediate step to pass data from the source to the Append Annotation Feature Classes tool because this particular tool does not like to be connected directly to the iterator (It just won't validate).  In the final step I'm using the Model's workspace environment (Set in the Model Properties dialog box), and variable substitution to supply the correct output dataset:  "Database Connections\some_db.sde\schema.%Data Name%"

Some of this may be a bit confusing but if you read through the manual steps it should help.  As a special note, you MUST set the environment variables on the Append Annotation Feature Classes tool or it will NOT work as intended.  I don't think it's any documentation explicitly or implied so you have been warned...

Small dashes are preconditions, long dashes are the environment variable connectors, and the double dash from Name is a connection and precondition.

Have fun, and I hope this helps anyone beleaguered with annotation!

Jason Griffin
GIS Developer
Pinellas County Business Technology Services
400 S Fort Harrison Ave, Clearwater FL  33756
Phone (727) 453-3613
Cell (727) 600-6634
jgriffin at pinellascounty.org<mailto:jgriffin at pinellascounty.org>

Follow Pinellas County:
[cid:image001.gif at 01CCD693.D258E700]<http://twitter.com/pinellasconews>[cid:image002.gif at 01CCD693.D258E700]<http://www.facebook.com/PinellasCountyNews>[cid:image003.gif at 01CCD693.D258E700]<http://www.youtube.com/pcctv1>[cid:image004.gif at 01CCD693.D258E700]<http://www.pinellascounty.org/social-networking.htm>
www.pinellascounty.org<http://www.pinellascounty.org/>
Subscribe to county updates and news<http://www.pinellascounty.org/news_subscription.htm>

All government correspondence is subject to the public records law.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.dep.state.fl.us/pipermail/shrug-l/attachments/20120120/ed4220df/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 1186 bytes
Desc: image001.gif
Url : http://lists.dep.state.fl.us/pipermail/shrug-l/attachments/20120120/ed4220df/image001-0001.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1105 bytes
Desc: image002.gif
Url : http://lists.dep.state.fl.us/pipermail/shrug-l/attachments/20120120/ed4220df/image002-0001.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.gif
Type: image/gif
Size: 1175 bytes
Desc: image003.gif
Url : http://lists.dep.state.fl.us/pipermail/shrug-l/attachments/20120120/ed4220df/image003-0001.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.gif
Type: image/gif
Size: 805 bytes
Desc: image004.gif
Url : http://lists.dep.state.fl.us/pipermail/shrug-l/attachments/20120120/ed4220df/image004-0001.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.jpg
Type: image/jpeg
Size: 244484 bytes
Desc: image005.jpg
Url : http://lists.dep.state.fl.us/pipermail/shrug-l/attachments/20120120/ed4220df/image005-0001.jpg


More information about the SHRUG-L mailing list