Trying to make notes into GIS data

1138
5
07-22-2011 12:35 PM
PeterLindstrom
Occasional Contributor
I have users who've started generating spatial data by adding "notes" using ArcGIS Explorer Online and ArcGIS Explorer Desktop. I need to find ways (preferably with some automation) to pull this data into our corporate GIS.

Unless I'm missing something, getting notes out of ArcGIS Explorer Online is currently impossible. Here's what I've tried, and what the results have been:

1. Add Content - ArcGIS Online in ArcGIS Desktop (build 1700) brings up a map's basemap and bookmarks, but not the layers created within that map.
2. I can't find any web maps from the Add Data from ArcGIS Online tool in ArcMap (v10 SP2).
3. Open in ArcGIS Desktop 10 from a web map's page under My Content on ArcGIS.com results in a "could not open the specified file" error message in ArcMap.

Getting notes out of ArcGIS Explorer Desktop (build 1700), is possible, although not exactly easy.

Initially, I converted each notes "layer" in AGX to a layer package using the right-click-Share-Layer Package-File functionality. The Add Data button in ArcMap can't bring up Layer Packages, but thankfully there's a work-around - you can drag and drop from ArcCatalog. However, the data only has two attribute fields, Popup and Visible, and the Popup field starts with around 925 characters of HTML style tag. So I try to use Python to pull all of that out to leave only the data typed by the user - unfortunately, roughly half of the features generate mysterious "EOL" (end-of-line) errors. So I look at the notes in AGX and sure enough, the user had a carriage return at the end of those features. This isn't clear when the text is copy-pasted from ArcMap's attribute table into Notepad. I wasn't able to figure out a way to get around the error in Python.

So back to the drawing board. I spit out KMLs instead of Layer Packages, using the same right-click-Share functionality in AGX. KMLs can't be added by the Add Data button in ArcMap, either - you have to use the KML to layer tool (I plan to use ArcToolbox's batch option to make this a bit quicker). Thank heavens all this trouble is worth it, because the same Python tool that failed before now works and I have a field with only the user's text that I can then massage and import into my corporate data.

Are there easier ways to accomplish this with current software?
0 Kudos
5 Replies
PeterLindstrom
Occasional Contributor
Unfortunately, I'm discovering that the KML To Layer tool is a real pain to create scripts/models with. It appears to need to generate a separate file geodatabase and layer file for each KML and it doesn't seem to play well with ArcToolbox's batch function. Good times!
0 Kudos
DarrylDempsey
New Contributor
Hi Peter,
Not sure what your corporate GIS is. If it can ingest WKT geometry I have C# code which converts any AGX geometry to WKT. I use it every now and then to export 'real' layers with their attributes from AGX.
The problem with Notes is their lack of structure. Basically they're just text: maybe html, maybe data which the user carefully typed in.
If you know that the text in specific notes conforms to a certain structure you could write a specific Addin, say ExportMyNotes. This would read the note(s), create fields from the note text and the WKT geometry field ccould be filled by using the WKT utility code.

Probably a good idea is also to write an Addin say AddMyNotes, which aks for ceertain fields from your users and writes these in a certain way to a note. Guarantees a bit more structure, as long as they don't edit them after. Ah,  rreedom has its price ....


I'll post the WKT utility code if you think it's worth a shot ...
0 Kudos
PeterLindstrom
Occasional Contributor
Not sure what your corporate GIS is. If it can ingest WKT geometry I have C# code which converts any AGX geometry to WKT. I use it every now and then to export 'real' layers with their attributes from AGX.

Our corporate GIS is ArcSDE v10 geodatabases, but really all I'm looking for is a way to get AGX notes into any data type that I can manipulate within ArcGIS ModelBuilder.

The problem with Notes is their lack of structure. Basically they're just text: maybe html, maybe data which the user carefully typed in.
If you know that the text in specific notes conforms to a certain structure you could write a specific Addin, say ExportMyNotes. This would read the note(s), create fields from the note text and the WKT geometry field ccould be filled by using the WKT utility code.

Probably a good idea is also to write an Addin say AddMyNotes, which aks for ceertain fields from your users and writes these in a certain way to a note. Guarantees a bit more structure, as long as they don't edit them after. Ah,  rreedom has its price ....

I see where you're going with this, but we don't really need to make multiple attributes out of the user-entered text at this point. All I want is the spatial feature and a single field with the text the user typed (no formatting). So thanks for the offer of help, but I'm not up on WKT or C# and probably wouldn't be able to get your code working for us.
0 Kudos
JoeFlannery
Occasional Contributor III
Hey Peter, have you looked at the attribute fields options in the Feature Layer Properties in ArcMap?  In the attached graphic you will see that I created a line note and point note and grouped them in a folder.  Each note was given a name.  I exported the folder to LPK and brought the LPK into ArcMap using ArcCatalog.  In ArcMap, right-click each feature type and choose Layer Properties.  Go to the Fields tab and choose which attribute fields you would like to see.  Turn off the Popup field.  That's it.
0 Kudos
PeterLindstrom
Occasional Contributor
Thanks Joe, I didn't think to look for "hidden" attributes. Unfortunately, in my case, the information I need from each point was entered into the Popup, so I need to pull the information out of that field. I've got a script working to do that now, but it only works on exported KMLs, not the LPKs (because of the EOL issue I mentioned in my first post).
0 Kudos