Customize ArcWeb Explorer & Pay For It

12 06 2006

When I previously posted about the ArcWeb Explorer (AWX) JavaScript API, there was no credit cost for embeding AWX in a custom webpage. This seemed like quite a deal, since you could hook up almost all of the ArcWeb Services. I wondered how long this free-ride would last. Well the answer is "Not long". You must now register your webpage with ArcWeb Services and recieve a AWX API key for custom implementations. There is nothing explicitly dealing with Public Services users on the AWX QuickStart Page or on the AWX registration page. So I don't know what level of access Public Service users get.




WriteTo function in .NET MemoryStream NOT properly documented

2 06 2006

What the WriteTo function should say 

I've spent 12 hrs trying to upload address as a formatted XML file to MelissaData for address verification, correction, and geocoding. I just figured out the problem! The WriteTo function writes from the CURRENT cursor position to the end of the stream. Well, thats not what the documentation says. It says it writes the WHOLE stream. I've spent hours writing & rewriting code and porting code back and forth between C# & VB.NET. The sample code was in C# but I already had some data handling functions for my data in VB so I stayed with that. But it didn't work, so I thought maybe I'm missing a small step and I combined my intial data handling and thier WebRequest/Response code together in C#. I couldn't use thier code exactly but it was very close, only instead of writing the XML to a binary array, I was either writing it to a file or directly to the memory stream. I even thought, well maybe I'm just not properly tranforming the tags to the EXACT right stuff. So I tried ALL of the XML serialization methods presented here. Still no results from the web service. I had been writing the XML to both a file & the memory stream & then checking the file to make sure all tags were closed & formated correctly, etc.. I finnally decided to use the WriteTo function to write to a MessageBox rather that the RequestStream. What comes up in the box? NOTHING, because it is at EOS. Seek the cursor back to the begining and viola a valid response is finnaly recieved!! That was about 10hrs in front of a computer and several more thinking about the problem I could have avoided, if MS would have put those few more words in the documentation for the WriteTo function. Oh well, I now am very good at creating XML documents, querying them, and modifying them in a vareity of methods and I'm much more confindent in my C# writing abilities, so I'll chalk it all up to a learning experience.




Latecomer to Google Earth as GES Bandwagon

1 06 2006

I always thought GE was super cool, but after the intial WOW factor wore off, I had pretty much just thought of it as an interesting toy. As a very experinced ArcGIS user, it seemed to me that whatever I could do in GE that was applicable to my job and our area of interest, I could do better in ArcGIS. After all, I had better imagery & topography (GE should really let you use your own topographic data source since they don't have it available for most areas).

Then I was tasked with creating a browse-able map for our sister law firm. They wanted to see the location of client properties in the Edwards Aquifer region, and determine, based on a variety of factors, if they would be a good canditate for conservation easment funding that is being provided to protect our water source. I could have done a traditional GIS analysis, but thier critera were rather fuzzy and changed across the region. They really wanted to see the properties and make thier own decisions. Well, I sure didn't want to install ArcReader, port the map over, & then train them to use ArcReader. So Google Earth seemed like the logical choice.

Our services coordinator was already creating a kml file with all our clients properties to aid in getting directions & determining travel times (which BTW GE is NOT really good at it rural areas). I used the KML_Home extension and exported the Edwards Aquifer Zones and all the counties in Texas with labels. Then I just combined the 3 items into a single folder in GE and emailed it to the attorneys. They were off and running with nearly zero training from me. They made thier decisions and had ownership & confidence in them. In fact one of the attorneys who is weeks away for having a baby, gave this gem of a quote:
Oh my God, Google Earth is so exciting I hope I don't go into labor after using this map.

If your interested here is the kmz of the Edwards Aquifer Regions and the Counties of Texas.