<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' version='2.0'><channel><atom:id>http://www.blogger.com/feeds/21845286/posts/full</atom:id><lastBuildDate>Sun, 01 Apr 2007 08:59:25 +0000</lastBuildDate><title>The Eicher GIS Blog</title><description></description><link>http://www.eicher-gis.com/Blog/blog.html</link><managingEditor>Cory Eicher</managingEditor><generator>Blogger</generator><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>15</openSearch:itemsPerPage><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/116816888094886268</guid><pubDate>Sun, 07 Jan 2007 11:13:00 +0000</pubDate><atom:updated>2007-03-21T17:08:20.690+01:00</atom:updated><title>Assessing the GIS job market for someone just entering the market</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span class="q"&gt;&lt;span style="font-family:Arial;"&gt;I received an email before Christmas from someone just entering the GIS job market. He had a few brief questions for me. I thought I'd post my reply here as well.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="q"&gt;--------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="q"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:14;"  &gt;Q - First, coming from an environmentally based school that's all I hear about in terms of GIS jobs, is that the only market for it or are there other uses?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="q"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:13;"  &gt;  &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;"&gt;A - Short answer no (but you probably already knew this).&lt;br /&gt;&lt;br /&gt;I'll give my long answer by giving you my view of GIS careers:&lt;br /&gt;&lt;br /&gt;First, &lt;b&gt;most jobs involve working with commercial GIS software&lt;/b&gt; &lt;b&gt;to solve problems. &lt;/b&gt;ESRI, Intergraph, MapInfo software, AutoDesk, and even Microsoft are players in then GIS software business. This work may involve making maps, building/editing geographic data etc. Some jobs are less technical (using GIS software, managing people that use GIS software), others are more technical (developing software applications that make GIS software do something special).&lt;br /&gt;&lt;br /&gt;Yes there are other jobs out there, e.g. you could work at ESRI on the software development team that builds the commercial software. This is what I used to do, but this is more software development and less GIS.&lt;br /&gt;&lt;br /&gt;So, some &lt;b&gt;common GIS career positions &lt;/b&gt;-- after all you're looking for a career, not just a job, right.... great interview answer by the way ; )&lt;br /&gt;&lt;br /&gt;1) GIS Technician - low end on pay and required education. perform routine technical tasks using GIS software.&lt;br /&gt;&lt;br /&gt;2) GIS Analyst - technical, but higher pay and higher required education. most GIS jobs out there fall into this category... but no two analysts do the same thing, have same skills, make same money. quite a wide range out there.&lt;br /&gt;&lt;br /&gt;3) GIS Manager - you manage people that do jobs 1, 2, and 4. To get such a position, you probably did job 1, 2, or 4 previously, or you have experience managing people in some other technical field. You make more money simply because you are a manager. You won't enter into this position right out of school most likely.&lt;br /&gt;&lt;br /&gt;4) GIS Developer  - like 2) but more technical.  You develop in C# or &lt;a href="http://vb.net/" target="_blank"&gt;&lt;span style="color:#000000;"&gt;VB.NET&lt;/span&gt;&lt;/a&gt; or Java for example. You have a background or skill in computer software development. You make more money generally because there are fewer of  you out there (people that know both GIS and software development). You develop custom or homegrown applications that make GIS do something specific. As an example, a county government uses GIS to manage tax parcels. They have a custom GIS application that does this. Some GIS developers build and maintain this for them. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;Application fields&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Arial;"&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-family:Arial;"&gt;GIS careers are not limited to the envionmental field at all. All of the positions I described above exist in scores of different fields. As a GIS career professional, (hey that has a nice ring to it)!, you or your company/department may specialize in one field, or you may work for a GIS consulting firm that does work in a number of fields.&lt;br /&gt;&lt;br /&gt;Some fields off the top of my head:&lt;br /&gt;   -Environmental&lt;br /&gt;   -Oil and natural gas exploration - Right now, in some cities (e.g. &lt;st1:city st="on"&gt;Houston&lt;/st1:city&gt;, &lt;st1:city st="on"&gt;Denver&lt;/st1:city&gt;, &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;Calgary&lt;/st1:place&gt;&lt;/st1:city&gt;) there are tons and tons of jobs in oil and gas GIS, and, as you know, these companies have money (business goes up and down with oil price) .&lt;br /&gt;   -Mineral exploration - another field where there is a lot of money and things go up and down a lot.&lt;br /&gt;   -Public utilities including electrical, gas, water - GIS is used to manage systems and sometimes design new parts of systems.&lt;br /&gt;   -Demographics/marketing - some overlap with advertising, also tons of GIS jobs working for US Census&lt;br /&gt;   -Defense - thousands of jobs in &lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;Washington&lt;/st1:city&gt; &lt;st1:state st="on"&gt;DC&lt;/st1:state&gt;&lt;/st1:place&gt; and elsewhere working for government and defense contractors.&lt;br /&gt;   -Transportation - e.g. state department of transportation&lt;br /&gt;   -Emergency 911&lt;br /&gt;   -Cadastral (tax and property) mapping&lt;br /&gt;   -Advertising&lt;br /&gt;   -Facilities management&lt;br /&gt;   -IT - information technology. This is a broader field than GIS, but sometimes GIS is integrated with other business systems.&lt;br /&gt;   -Engineering - some overlap with CAD in this field, GIS is used to both design new infastructure and manage existing infastructure. Think also what is happening in &lt;st1:country-region st="on"&gt;&lt;st1:place st="on"&gt;Iraq&lt;/st1:place&gt;&lt;/st1:country-region&gt;.&lt;br /&gt;   -Health - epidemiology, pretty interesting field with lots of geographic data.&lt;br /&gt;   -Aviation and navigation - charts for planes and boat&lt;br /&gt;   -Agriculture and precision farming&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Related technologies/careers&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Some related technologies/fields where a GIS background may be useful include GPS and navigation systems. These are used on construction sites, in cars, in airplanes, in golf bags on the course to geolocate your position! Also, any skill/experience/education with computer software, hardware, web stuff can certainly be combined with GIS. Lots of GIS is "online" now.&lt;br /&gt;&lt;br /&gt;Especially in the environmental and engineering fields, your GIS career may overlap quite a bit with a civil/environmental engineering career.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Where to search for jobs&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;"GIS" turns up a ton of jobs on &lt;a href="http://monster.com/" target="_blank"&gt;&lt;span style="color:#000000;"&gt;Monster.com &lt;/span&gt;&lt;/a&gt;, and &lt;a href="http://www.gjc.org/" target="_blank"&gt;&lt;span style="color:#000000;"&gt;http://www.gjc.org/&lt;/span&gt;&lt;/a&gt; is a great site with only GIS jobs. There may be others out there, It's been a few years since I've looked.&lt;b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="q"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:14;"  &gt;Q - And if you have any advice from your experiences as to how I should go about getting into the business, is there something that employers look for as far as skill base or qualifications?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="q"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;  &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;"&gt;A - I think I covered a lot of this already. I would advise getting real-world experience. Employers value real-world experience. It can be hard to get, but I would try and get your foot in the door wherever you can. Take an internship-type or even trial position if someone gives it to you.&lt;br /&gt;&lt;br /&gt;Get technical experience. If you find software programming interesting, get more experience with .NET language (for desktop or web development) or Java (for web development).&lt;br /&gt;&lt;br /&gt;Network. Definitely work through your university contacts, professors, fellow students, alums.&lt;br /&gt;&lt;br /&gt;Keep up to date. There are some great GIS blogs out there.  Read every day and you'll know what's going on.&lt;br /&gt;&lt;br /&gt;Do some research on salaries. GIS is a young field. There is such a range of salaries. In general, GIS people still don't get paid equivalent to others in IT. I think that this will change, but like anything you have to prove you deserve it. Some fields (oil, gas) pay more than others (environmental).&lt;br /&gt;&lt;br /&gt;If you are interested, think about taking a position that may involve field work, such as collecting data in the summertime via GPS. You may get to live in somewhere like &lt;st1:place st="on"&gt;Yellowstone&lt;/st1:place&gt; for the summer, running around in the bushes, living in a cabin for 3 months... You won't get paid much of anything, but you'll have great fun and it is good experience for the resume.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;Good luck with your job hunt!&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2007/01/assessing-gis-job-market-for-someone.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/116816832926957411</guid><pubDate>Sun, 07 Jan 2007 10:55:00 +0000</pubDate><atom:updated>2007-01-07T12:23:55.036+01:00</atom:updated><title>Cartographic Data Modeling</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;It's been awhile since my last post.&lt;br /&gt;&lt;br /&gt;I have been working on some interesting stuff including building data models for cartographic data at scales 1:300,000 and 1:25,000. This is for a project we are working on with the       &lt;a href="http://www.swisstopo.ch"&gt;Federal Office of Topography (swisstopo)&lt;/a&gt;. For this work I've been using Visio and the ESRI CASE Tools.&lt;br /&gt;&lt;br /&gt;We are using ArcGIS 9.2 and taking advantage of the new cartographic representations, so on top of these data models we are also producing representation models for topographic maps (additinoal representation models could conceivably be added on top of the general data models).&lt;br /&gt;&lt;br /&gt;It has been interesting to figure out how best to translate swisstopo's object data model and symbol signature into a geodatabase schema, making decisions about feature classes, subtypes, attributes, representations, representation rules, and override fields. A particular challenge has been finding a way to do the representation modeling, since reps (and also annotation) are not supported in the CASE tools. Currently I'm using some C# code to read the "representation schema" from an XML file.&lt;br /&gt;&lt;br /&gt;-Cory&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2007/01/cartographic-data-modeling.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/115356690838168236</guid><pubDate>Sat, 22 Jul 2006 11:06:00 +0000</pubDate><atom:updated>2006-07-22T13:15:08.383+02:00</atom:updated><title>New Time Zone</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Greetings from a new time zone, CET or Central European Time.&lt;br /&gt;&lt;br /&gt;I've settled in to my new position with ESRI Switzerland. I'm working with their professional services group in Zurich. Business is good and the company has expanded to two small offices in Zurich.&lt;br /&gt;&lt;br /&gt;Many things are different/new of course, but I find that the 'hand of Dangermond' reaches far afield, even to our little office here in Zurich. I actually saw a guy (nobody that I knew) jumping off a train last weekend who was wearing an ESRI t-shirt.&lt;br /&gt;&lt;br /&gt;I'm currently working on a pretty exciting ArcGIS Desktop/ArcSDE implementation for the swiss national civilian mapping agency. Don't expect too many ArcObjects postings in the near future : ( (perhaps you will be happy for this?)  as we are still in the system analysis phase for the project. But later, we'll be doing a lot of cool stuff with ArcGIS 9.2 including customizing the new cartographic representations functionality.&lt;br /&gt;&lt;br /&gt;In the past month I've learned a bit about ESRI's PLTS Data Reviewer which is more or less completely revamped for 9.2. This is a very promising product component for centralizing data quality reviewing.  Something interesting to look forward to in the final 9.2 release (or shortly thereafter as the PLTS release cycle typically trails ArcGIS by a little bit).&lt;br /&gt;&lt;br /&gt;Talk to you soon,&lt;br /&gt;&lt;br /&gt;-Cory&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/07/new-time-zone.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/114986430394783378</guid><pubDate>Fri, 09 Jun 2006 13:59:00 +0000</pubDate><atom:updated>2006-06-09T16:45:22.626+02:00</atom:updated><title>How to scale a dataset</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;strong&gt;Problem&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;A colleague of mine recently asked me how to scale a dataset. He had the requirement to make an entire line or polygon dataset a factor larger or smaller. e.g. scale the dataset by a factor of 5.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Mathematical Solution&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I knew that matrix algebra might help us here. I did some web research and confirmed that you can scale a 2d point by taking a matrix that looks like this (x and y are the scale factors in the x and y dimensions)...&lt;br /&gt;&lt;br /&gt;x 0 0&lt;br /&gt;0 y 0&lt;br /&gt;0 0 1&lt;br /&gt;&lt;br /&gt;...and multiplying by your point, which looks like this...&lt;br /&gt;&lt;br /&gt;x1&lt;br /&gt;y1&lt;br /&gt;1&lt;br /&gt;&lt;br /&gt;Here are some good links on matrix algebra:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://easyweb.easynet.co.uk/~mrmeanie/matrix/matrices.htm"&gt;http://easyweb.easynet.co.uk/~mrmeanie/matrix/matrices.htm&lt;/a&gt; (background)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.engineering.usu.edu/cee/faculty/gurro/Classes/Classes_Spring2002/VBGradClass/VBGradClass.htm"&gt;http://www.engineering.usu.edu/cee/faculty/gurro/Classes/Classes_Spring2002/VBGradClass/VBGradClass.htm&lt;/a&gt; (includes vb code sample to multiply two matrices)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Coding a Solution&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;I coded a solution in VBA to do this scaling on a shapefile. My goal was to mimic the 'dataset scaling' function described above, and that I'm also told that Manifold GIS provides. I didn't end up using the vb code mentioned above to multiply two matrices, but I did use matrix algebra indirectly.&lt;br /&gt;&lt;br /&gt;A few important observations:&lt;br /&gt;&lt;br /&gt;1) I found it necessary to first introduce a false origin at the lower left of the original dataset before performing the scaling. Easy way to do this, determine lower left coordinates and subtract from all point coordinates.&lt;br /&gt;&lt;br /&gt;2) Scaling was straightforward. Just multiple all x coords by x scale factor and all y coords by y scale factor. In my case, the x and y scale factors were equal.&lt;br /&gt;&lt;br /&gt;3) Now my dataset is larger, but where is it? Well, it's anchored to the lower left of the orginal dataset. The Manifold functionality centers the new dataset on the old. So, based on the x and y extents of the orig and scaled dataset, I calculated the distance that I needed to move my scaled dataset "down and to the left" (to use the a technical term ; ), then I achieved this using simple subraction on my x and y coordinates.&lt;br /&gt;&lt;br /&gt;4) Finally, don't forget to "undo" the false origin set in step 1). Do this by adding back in the dataset lower left x and y coordinates that were subtracted in step 1).&lt;br /&gt;&lt;br /&gt;There you have it, how to scale a dataset and recenter it on the original dataset.&lt;br /&gt;&lt;br /&gt;VBA code is &lt;a href="http://www.eicher-gis.com/ArcObjects/DatasetScaling_Example.htm"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;News&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I also have some professional news. I've accepted a position to work for ESRI Switzerland in Zurich. I'll be working on projects there mostly related to cartography and ArcGIS. I'm very excited about the position and the move. This means that I'll be getting out of the full-time independent consultant business, but I hope to continue with this blog from my new "position", pun intended.&lt;br /&gt;&lt;br /&gt;Talk to you soon,&lt;br /&gt;&lt;br /&gt;-Cory&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/06/how-to-scale-dataset.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/114875324825625073</guid><pubDate>Sat, 27 May 2006 17:30:00 +0000</pubDate><atom:updated>2006-05-27T20:07:28.273+02:00</atom:updated><title>Lessons learned from building an SDE data loader</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;It's been awhile since my last post. What can I say, I've been busy. Had some time today though, so I dug 'Pet Sounds' out of my cd collection and decided to write a post.&lt;br /&gt;&lt;br /&gt;I do actually have some useful content (at least I think so), so another good reason for posting.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Lessons Learned - architecting a system&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I recently wrapped up a project where I helped a client build an ArcSDE data loader. The basic goal was to take as input some 'feature data' (geometry and attributes). This data is stored in a database in a non-ESRI format. There was already code in place to take the data out of the database and put it into a proprietary dataset format. My code was to read data from this dataset, translate the geometry into ArcGIS geometry, handle coordinate reprojection and datum transformations, and load the data into ArcSDE feature classes.&lt;br /&gt;&lt;br /&gt;At a high level, the solution I architected for this was: an SDE loader object to do the actual data loading, a coordine transformer object to handle projection/datum transformations, and a geometry converter object.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conclusions:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The coordinate transformer object involved the most work. Part of the job of this object was to interpret coordinate information for the incoming data (call this the 'from coordinate system'). This was defined in a non-ESRI format. I needed it in an ESRI format to use ArcObjects to reproject coordinates from the 'from coord. system' to the 'to coord system desired for the output SDE feature classes. This was a lot of work.&lt;/li&gt;&lt;li&gt;The SDE loading logic wasn't to difficult. The trickiest thing here was to decide on the 'optimum' method to do things like: load data efficiently to a feature class, and delete data efficiently from a feature class. AO provides multiple ways to do things. See my previous post for more discussion about this part of the architecture.&lt;/li&gt;&lt;li&gt;The geometry translator object's job was simply to translate geometry from the non-esri format to the ESRI format. This was many many times more straightforward than the handling coordinate transformation. This makes sense I suppose. Even accounting for multipart geometries, polygons with holes, etc., the domain of what you need to handle for 2d geometry is just so much smaller than all of the potential projected coordinate systems, non-projected coordinate systems (aka geographic coordinate systems), and all of 'junk' beneath the gcs level. Also, anyone that's dug into coordinate system 'stuff' in AO knows that there are many ways to skin a cat there, and also to skin yourself! In the end, things in that part of the AO system are very logically put together, but still, as I said, because of the topic, that still makes things, well, 'non trivial' as a univ. professor of mine used to like to say.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Lessons Learned - exception handling&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I understand exception/error handling, and I've employed various strategies over the years to employ it in my code... but, I had always been a bit frustrated/confused about how best to go about it. Should every sub handle errors? What should it do with an error? Message box? Bubble the error up to the calling sub? Some of you might be laughing a bit about this, but I think that people coming from the 'GIS programmer' mold might find this interesting and useful.&lt;/p&gt;&lt;p&gt;In the above project I was introduced to an exception handling design pattern that I really liked. It's logical, consistent, and does exactly what I want it to do. I was working in C#, but it could work just as easily in other languages.&lt;/p&gt;&lt;p&gt;There are two parts to this: 1) how a sub handles exceptions, and 2) how you call that sub.&lt;/p&gt;&lt;p&gt;It's pretty simple, and I ended up following this pattern with all of my methods.&lt;/p&gt;&lt;p&gt;First, &lt;strong&gt;how a sub handles exceptions&lt;/strong&gt;:&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;bool mySub (out string statusMessage, out ILayer myOutLayer, int InParam1, string InParam2)&lt;br /&gt;  {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;    bool bStatus = true;    // return&lt;br /&gt;    statusMessage = "";   // out&lt;br /&gt;    myOutLayer = null;  // out &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;    try&lt;br /&gt;    {&lt;br /&gt;      // do stuff&lt;br /&gt;      // set out param&lt;br /&gt;    }&lt;br /&gt;    catch (Exception E)&lt;br /&gt;    {&lt;br /&gt;      statusMessage = E.ToString();&lt;br /&gt;      bStatus  = false;&lt;br /&gt;    }&lt;br /&gt;    finally&lt;br /&gt;    {&lt;br /&gt;      // clean up&lt;br /&gt;    }&lt;br /&gt;    return bStatus;&lt;br /&gt;  }&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Second, &lt;strong&gt;how to call a method&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;if (! mySub(out statusMessage, out myOutLayer, 1, "brian wilson"))&lt;br /&gt;  throw new ApplicationException(statusMessage)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;So, by following this pattern, every sub returns true if it runs succesfully, or fail if not. If it fails, the statusMessage tells us what the error is. We throw a new exception, which is caught by the current sub's exception handler, and the process continues. The end result is that the calling sub always gets a useful error message, and call stack if there's an error.&lt;/p&gt;&lt;p&gt;The statusMessage can also be used to return information about successes. For me, only my 'top level' subs returned non-empty successful string statusMessages. If you want to 'bubble up' successful statusMessages from lower level subs, you'll probably want to modify the above pattern, e.g. not automatically initializing statusMessage to "" at the beginning of every sub.&lt;/p&gt;&lt;p&gt;Talk to you soon,&lt;/p&gt;&lt;p&gt;-Cory&lt;/p&gt;&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/05/lessons-learned-from-building-sde-data.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/114536970157850082</guid><pubDate>Tue, 18 Apr 2006 13:38:00 +0000</pubDate><atom:updated>2006-05-27T19:29:53.066+02:00</atom:updated><title>Tips for Importing Data into the Geodatabase</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;I spent some time recently writing some C# ArcObjects code to convert geographic data from a another system into the geodatabase. It's been an interesting project because I've had to handle the translation of a different geometry structure into ArcObjects geometry. Okay, it's still points/lines/polys, so it's not that different, but you know what I mean. I've also gotten 'way deep' into coordinate systems as part of this process, and learned a bit about best practices when loading/deleting geodatabase features.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Geometry&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Ok, so I started with points and I still have lines and polys on my todo list. What this means is that I' m the type of person that likes to build from small successes...&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Coordinate Systems&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I was pretty familiar with how ArcObjects treats projections and coordinate systems. Every feature class has, or should have, a SpatialReference, which is in turn comprised of (at least this is how I think about it), a coordinate system with an XYZ domain. The coordinate system may be a &lt;a href="http://edndoc.esri.com/arcobjects/9.1/default.asp?URL=/arcobjects/9.1/ComponentHelp/esriGeometry/ProjectedCoordinateSystem.htm"&gt;ProjectedCoordinateSystem &lt;/a&gt;(e.g. Albers Equal Area, State Plane, UTM), or it may be a &lt;a href="http://edndoc.esri.com/arcobjects/9.1/default.asp?URL=/arcobjects/9.1/ComponentHelp/esriGeometry/GeographicCoordinateSystem.htm"&gt;GeographicCoordinateSystem &lt;/a&gt;(e.g. WGS 84, or NAD 27).&lt;br /&gt;&lt;br /&gt;Also, if a SpatialReference is a ProjectedCoordinateSystem, then the PCS has a GeographicCoordinateSystem (acces thru &lt;a href="http://edndoc.esri.com/arcobjects/9.1/default.asp?URL=/arcobjects/9.1/ComponentHelp/esriGeometry/IProjectedCoordinateSystem_GeographicCoordinateSystem.htm"&gt;IProjectedCoordinateSystem::GeographicCoordinateSystem&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;You can build up coordinate systems from scratch, but this can be, quite frankly, a pain in the azimuth (sorry).&lt;br /&gt;&lt;br /&gt;It's much easier if you know the name of the PCS or GCS that you want to create, to use &lt;a href="http://edndoc.esri.com/arcobjects/9.1/default.asp?URL=/arcobjects/9.1/ComponentHelp/esriGeometry/ISpatialReferenceFactory_CreateProjectedCoordinateSystem.htm"&gt;ISpatialReferenceFactory::CreateProjectedCoordinateSystem&lt;/a&gt; or &lt;a href="http://edndoc.esri.com/arcobjects/9.1/default.asp?URL=/arcobjects/9.1/ComponentHelp/esriGeometry/ISpatialReferenceFactory_CreateGeographicCoordinateSystem.htm"&gt;ISpatialReferenceFactory::CreateGeographicCoordinateSystem&lt;/a&gt;. These methods take a long parameter that represents the factory code for the coordinate system. You can look up factory codes based on coordinate system names in the ArcObjects documentation.&lt;br /&gt;&lt;br /&gt;For a GCS see the enums &lt;a href="http://edndoc.esri.com/arcobjects/9.1/default.asp?URL=/arcobjects/9.1/ComponentHelp/esriGeometry/esriSRGeoCSType.htm"&gt;esriSRGeoCSType&lt;/a&gt;, &lt;a href="http://edndoc.esri.com/arcobjects/9.1/default.asp?url=/arcobjects/9.1/ComponentHelp/esriGeometry/esriSRGeoCS2Type.htm"&gt;esriSRGeoCS2Type&lt;/a&gt;, and &lt;a href="http://edndoc.esri.com/arcobjects/9.1/default.asp?url=/arcobjects/9.1/ComponentHelp/esriGeometry/esriSRGeoCS3Type.htm"&gt;esriSRGeoCS3Type &lt;/a&gt;&lt;br /&gt;For a PCS see the enums &lt;a href="http://edndoc.esri.com/arcobjects/9.1/default.asp?url=/arcobjects/9.1/ComponentHelp/esriGeometry/esriSRProjCSType.htm"&gt;esriSRProjCSType&lt;/a&gt;, &lt;a href="http://edndoc.esri.com/arcobjects/9.1/default.asp?url=/arcobjects/9.1/ComponentHelp/esriGeometry/esriSRProjCS2Type.htm"&gt;esriSRProjCS2Type&lt;/a&gt;, and &lt;a href="http://edndoc.esri.com/arcobjects/9.1/default.asp?url=/arcobjects/9.1/ComponentHelp/esriGeometry/esriSRProjCS3Type.htm"&gt;esriSRProjCS3Type &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;MOST convenient for me however, because I was being handed a factory code that could be either a GCS or a PCS, was to use &lt;a href="http://edndoc.esri.com/arcobjects/9.1/default.asp?URL=/arcobjects/9.1/ComponentHelp/esriGeometry/ISpatialReferenceFactory2_CreateSpatialReference.htm"&gt;ISpatialReferenceFactory2::CreateSpatialReference&lt;/a&gt;. This method lets creates either a GCS or a PCS depending on what factory code you give it.&lt;br /&gt;&lt;br /&gt;You can read more about coordinate systems in the ArcObjects Geometry Library Overview.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Deleting Geodatabase Features&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;I needed to implement some functionality to delete features from an SDE geodatabase feature class. I looked through the online doc, and found, well, man ways to do this. But, I wanted to know the best way to do this, so I asked my colleague MC. at ESRI.&lt;br /&gt;&lt;br /&gt;The conversation went something like this.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Cory&lt;/strong&gt; - "Hey, can I delete features from a non-versioned feature class, or do I need to version it?"&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;MC&lt;/strong&gt; - "You don't need to version your data"&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C&lt;/strong&gt; - "Coolness" (or something like that) "I'm doing my delete in the context of a workspace edit session, like this:&lt;br /&gt;&lt;br /&gt;workspaceEdit = (IWorkspaceEdit) mySdeWs;&lt;br /&gt;workspaceEdit.StartEditing (false);&lt;br /&gt;workspaceEdit.StartEditOperation();&lt;br /&gt;&lt;br /&gt;// do my delete&lt;br /&gt;&lt;br /&gt;workspaceEdit.StopEditOperation();&lt;br /&gt;workspaceEdit.StopEditing(true);&lt;br /&gt;&lt;br /&gt;Do I need the workspace edit stuff? If so, why?"&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;MC&lt;/strong&gt; - "I always put in the edit session code. That way, if the data does become versioned, my code will still work."&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C&lt;/strong&gt; - "Ok, thanks. Now, there appear to be seventy nine ways to delete a feature.&lt;br /&gt;&lt;br /&gt;IFeature.Delete&lt;br /&gt;IFeatureCursor.DeleteFeature&lt;br /&gt;ITable.DeleteSearchedRows&lt;br /&gt;IRowEdit.DeleteSet&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Which should I use, given that: my features are simple, don't&lt;br /&gt;participate in relationships, and they're not versioned. Also, I don't&lt;br /&gt;need any 'rollback', and I may be deleting a lot of features?"&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;MC&lt;/strong&gt; - "I would recommend using ITable.DeleteSearchedRows since this is the "simplest" call and should do the fastest thing. My second choice would be IFeatureCursor.DeleteFeature called on an update cursor because if you use buffering it can batch up features to delete to minimize database queries. IFeature.Delete is generally the slowest since it happens for each feature."&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: - After trying to implement MC's suggestion to use buffering in combination with IFeatureCursor.DeleteFeature, I had to ask him a follow up question: How exactly do you do this? I couldn't see a way to do this through the API. Well, it turns out that this is done behind the scenes for you. When you use IFeatureCursor.DeleteFeature, the cursor is flushed every 100 features or so...&lt;br /&gt;-Cory (5/26/06)&lt;br /&gt;&lt;strong&gt;C&lt;/strong&gt; - "Great, thanks."&lt;br /&gt;&lt;br /&gt;Talk to you soon,&lt;br /&gt;&lt;br /&gt;-Cory&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/04/tips-for-importing-data-into.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/114381336444158533</guid><pubDate>Fri, 31 Mar 2006 13:10:00 +0000</pubDate><atom:updated>2006-04-03T17:13:04.320+02:00</atom:updated><title>Comparing the Cartography of Google Maps and Ask.com Maps Part 2</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;It's been awhile since I've posted. What can I say, after the ESRI dev summit I took a bit of a vacation, managing to squeeze in 3 days of surfing while in Southern California. If anyone's wondering, yes the water was cold... Last week I was busy with work, so here I am, what, two weeks since my last post?&lt;br /&gt;&lt;br /&gt;Today I'll return to my comparison of Google Maps and Ask.com maps.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Ramp-age&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Some of you are probably already guessing that I'm about to 'go-off' on cased line road symbology. More specifically, I'll examine the traditionally tricky challenge of symbolizing freeways and freeway ramps at multi-level interchanges.&lt;br /&gt;&lt;br /&gt;Look at these screen captures of the interchange of I-25 and US-6 in Denver. &lt;a href="http://www.eicher-gis.com/Images/Blog/gm_interchange.PNG"&gt;Google Maps&lt;/a&gt; flat out does a better job with the representation of this intersection than &lt;a href="http://www.eicher-gis.com/Images/Blog/am_interchange.PNG"&gt;Ask.com Maps&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Accurate Levels&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;Looking at the satellite imagery for the interersection, the Google map very accurately depicts how the ramps and main routes intersect, or don't. Google is accurate right down to whether or not a ramp/route passes over or under another ramp/route. Seriously, compare the sat with the map, they've done a really good job! The Ask map, well, if you were to believe their representation of the interchange, you'd have cars, lunch trucks, and vespa scooters crashing into each other at each intersection. There's no "level" at all in the Ask maps.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2. Smooth Connections &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Another win for Google. The I-25/US-6 interchange is a good example of how you also need to know how to 'blend' symbology when different types of roads intersect, and these roads have different cased symbology. In this case, we have ramps thin, light-colored ramps, intersecting with thicker, darker-colored routes. The Google map does a quite fantastic job, breaks between colors are always a clean edge of a route/ramp, and routes always take preference over ramps. We don't see any 'round ends' of one color poking into another color. The Ask map is quite messy in comparison. Look at this &lt;a href="http://www.eicher-gis.com/Images/Blog/am_zuni_st.PNG"&gt;screen capture&lt;/a&gt; of the I-25 Zuni St. on/off ramps from Ask for an example of these 'round ends'. Granted, a lot of the messiness in the Ask map derives from their mis-management of levels. Fix this problem, and Ask could be on par with Google for how this aspect of their cartography.&lt;/p&gt;&lt;p&gt;As an aside, one gripe that some cartographers might have with both maps is how dead-end roads are symbolized. Both maps use round end caps, whereas squared-off caps may be preferred. Here's an example from &lt;a href="http://www.eicher-gis.com/Images/Blog/gm_round_end_caps.PNG"&gt;Google&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;3. Directional Arrows&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One thing that Google has that Ask doesn't are the tiny blue arrows indicating the direction of ramps and route lanes (you'll also see this for one-way streets). To me this is a clear representation, and also 'clearly' useful for following Google's directions, or making your own way on a detailed view of a Google map.&lt;/p&gt;&lt;p&gt;Talk to you soon,&lt;/p&gt;&lt;p&gt;-Cory&lt;/p&gt;&lt;p&gt;P.S - What I'm listening to: &lt;a href="http://www.kexp.org"&gt;www.kexp.org&lt;/a&gt; (not to steal &lt;a href="http://www.spatialdatalogic.com/cs/blogs/brian_flood/default.aspx"&gt;someone else&lt;/a&gt;'s byline)&lt;/p&gt;&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/03/comparing-cartography-of-google-maps_31.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/114278802567316332</guid><pubDate>Sun, 19 Mar 2006 16:04:00 +0000</pubDate><atom:updated>2006-03-19T18:07:18.576+01:00</atom:updated><title>Quick Hits From the ESRI Dev Summit Day 2</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;My NCAA tournament picks score has fallen into the D-range on Yahoo, 66th percentile, but I'm not sure that score is current, and things look promising for my score to rise in the later rounds.&lt;br /&gt;&lt;br /&gt;The inaugural ESRI Dev Summit is over and done. I was able to interface with a lot of people and I learned a lot about ESRI technology, so it was a successful trip for me. The conference was was very well organized and, I'd say, things went surprisingly smooth considering that this was the first time around. Yes, some rooms were overflowing, but for the most part, the most popular sessions were given in the largest rooms, so there wasn't much more ESRI could have done on the planning end to alleviate this.&lt;br /&gt;&lt;br /&gt;Some thoughts from yesterday, day two:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;AM Plenary&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Two different speaking styles were exhibited by the two guest keynote speakers from IBM and Microsoft. I have to say, I quickly tuned out from the IBM talk. I wasn't drawn into the speaker's speaking style, and the content to me was very high-level, business-y, and treated GIS/location based services as an add-on to a pre-canned presentation. Understandable, but not very compelling to me.&lt;/li&gt;&lt;li&gt;The Microsoft representative was a far more polished professional speaker and a true MS evangelist. I was very drawn in and much of the content for me was new, so I stayed tuned in. I have the same criticism of this talk though, GIS wasn't well integrated in the message. There always seems to be a very simple view of what GIS is when talked about in broader contexts.&lt;/li&gt;&lt;li&gt;I talked to someone that expected presentations of real world case collaborations between ESRI-IBM and ESRI-MS... Perhaps that was shown in the more focused afternoon technical sessions. I didn't attend these.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;.NET Web Applications Tech Session&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Truly standing room only in this one. You had to get to all the .NET sessions early or you were stuck standing or sitting on the floor.&lt;/li&gt;&lt;li&gt;One thing I always see a lot in web demos of ESRI technology... bad maps. Okay, I'm a cartographer, but in this session I saw fusing of multiple services on same map... Map was unprojected/geographic, and in Canada, rivers were shown, but the other layers were missing. When I was at ESRI we were careful to create attractive maps for demos (okay, were were demoing carto fucntionality) , but we were also careful to be inclusive of non-US audiences. I'm wondering how many cartographers or even geographers work on the web dev team at ESRI.&lt;/li&gt;&lt;li&gt;I have to be honest, I've heard about AJAX, but I never knew what it stood for: Asynchronous JavaScript And XML.&lt;/li&gt;&lt;li&gt;I was pretty impressed but the 'Site Builder' tools that ESRI is providing at 9.2. For someone like me that's new to web development, I'll be starting with these tools.&lt;/li&gt;&lt;li&gt;The 'Site Builder' and .NET web ADF seem very unifying at least w.r.t. ESRI services. Its simple to create sites based on all the ArcGIS services (AGS, IMS) and there's also support for OGC style services.... I did however hear a conversation at lunch, two gentlemen relatively new to ESRI technology, wonderiing what the difference is between AGS and IMS... So _that_ question is still around...&lt;/li&gt;&lt;li&gt;API yai yai.... I saw so many new APIs yesterday and the day before. I guess it's just the price of doing business as they say, but there's a Mobile ADF API, an ArcGIS Explorer API, and a .NET ADF API. I'd say that its a true challenge to develop and app that deploys in more than one of these environments.&lt;/li&gt;&lt;li&gt;Even within web development, there are multiple APIS that developers can work with. ESRI introduced a new general API that can be used, for example, to fuse multiple services and provide feature selection functionality across all services and then to draw the selection in a graphics layer above all of the fused service. It seemed like an interesting thing to demo, but it's also clear that selection/selection drawing is already implemented on the individual service types through their API (e.g. AGS). &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;ArcGIS Explorer Lunch Session&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;I'm not sure what this even was, because it wasn't on the conference schedule. I have to thank &lt;a href="http://www.newellcompany.com/"&gt;Richard Howell&lt;/a&gt; for telling me about it at lunch. A lot of other people didn't hear about it either because there were only 30-40 people filling the seats of a room that I think would've been out-the-door with people were this a first order session.&lt;/li&gt;&lt;li&gt;Learned that explorer will support 2D maps in addition to 3D globes.&lt;/li&gt;&lt;li&gt;You can customize explorer. Having worked a lot with Google Earth I was glad to hear this. It supports skins, some GUI/application components are configurable on startup, and you can also customize the app and provide custom tools by writing custom tasks.&lt;/li&gt;&lt;li&gt;Explorer supports adding local data: raster, KML, shp, file geodatbase. It doesn't support personal GDB or SDE.&lt;/li&gt;&lt;li&gt;With Explorer you get standard imagery for free from ESRI, same concept as Google Earth. We were told in the session that the free stuff would be 2-3m resolution for the USA. I'm not sure how that matches up to Google.&lt;/li&gt;&lt;li&gt;Explorer has a local cache that allows you to work offline, similar to GE.&lt;/li&gt;&lt;li&gt;I was curious about support for billboarding of text and other symbols for 3d symbology... I didn't ask, but I think this is supported in Explorer by consuming an ArcGlobe service that was authored with this symbology.&lt;/li&gt;&lt;li&gt;ESRI provides a bunch of default tasks including reverse geocode (click on map/globe and get address) and routing. That's pretty cool...&lt;/li&gt;&lt;li&gt;You can save Explorer 'maps' as NMF files with are basically XML.&lt;/li&gt;&lt;li&gt;Euan demo'd the basics of writing a custom task, but he didn't get into very much detail at all. As I understand it, developers just write some .NET components: a Task and a TaskUI. There's also a TaskContext (?) object that allows them to talk to each other. There's nothing fancy here, your objects consume the explorer API (yet another API to learn!), you tell explorer where you .dll is through some other file, and then you put the dll at that URL...&lt;/li&gt;&lt;li&gt;...explorer takes care of deployment of your task, downloading the dll from the server location to the client machine and registering it wih the .NET interop. What I took from all this is, that as a desktop/engine developer writing these custom tasks isn't going to be a big jump for me into having to know all sorts of stuff about web application development... we'll see.&lt;/li&gt;&lt;li&gt;I'm excited about the possibility of writing custom tasks not just to provide 'tool/command' like fucntionality, but to customize the explorer application (layer ordering/on-off, TOC simplification, etc.). This is hard to do in Google Earth.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Common Operating Picture Tech Session&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Skipped out of the .NET track to see a session on pretty cool data integration application bringing in real-time from multiple location sources and viewing it. The app was an ESRI employee tracker, and it searched for last known locationn of employee based on flight info in the esri travel database, badge id swipe on esri campus, even vpn authentication activity linked to IP address. Cool stuff, but technical details from the ESRI Impl. Services presenter went way over my head.&lt;/li&gt;&lt;li&gt;Learned about a new ArcToolbox tool coming in 9.2 called 'Generate Map Server Cache'... Tool creates tiled raster maps from an .mxd, you choose tiling resolution and number of scale ranges. These get served up by ArcGIS Server. Pretty powerful, but I wondered about dynamic labeling, specifically duplicate labels and 'edge' effects. I talked with &lt;a href="http://www.spatialdatalogic.com/CS/blogs/brian_flood/default.aspx"&gt;Brian&lt;/a&gt; about this and he wondered the same thing. I guess that there'll always be this challenge.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Cartograpy Objects Technical Session&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Mike and Craig (former colleagues of mine) presented a really informative overview of the cartographic subsystems in ArcGIS. As Craig said, there's a lot in this area because cartography in ArcObjects-speak is inclusive of everything from layers, rendering, symbols, elements, maps, and pages, to displays and display transformations, to export and printing.&lt;/li&gt;&lt;li&gt;Michael pointed out that it helps to know about about Windows GDI if you're going to get deep into displays and drawing with ArcObjects.&lt;/li&gt;&lt;li&gt;I was happy to see the &lt;a href="http://edndoc.esri.com/arcobjects/9.0/default.asp?url=/arcobjects/9.0/Samples/Cartography/Renderers/Multivariate_Renderer/MultivariateRenderer.htm"&gt;Multivariate Renderer sample&lt;/a&gt; that I wrote is still a useful learning tool for ArcObjects developers. I'd still like to see something like this be core ArcGIS functionality. Something to look forward to on the horizon I guess.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Talk to you soon,&lt;/p&gt;&lt;p&gt;-Cory&lt;/p&gt;&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/03/quick-hits-from-esri-dev-summit-day-2.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/114269524332298909</guid><pubDate>Sat, 18 Mar 2006 14:40:00 +0000</pubDate><atom:updated>2006-03-18T16:20:43.336+01:00</atom:updated><title>Quick Hits from the ESRI Dev Summit</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;It's early on day two of the ESRI Dev Summit in Palm Springs. First off, are your NCAA brackets looking? I'm sitting right at the 80th percentile in Yahoo, a solid B-...&lt;br /&gt;&lt;br /&gt;A few quick notes from yesterday:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;AM Keynote&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Not an overwhelming success, but not a dud either. The start was a bit awkward, as if because it's the first year for this, ESRI themselves didn't know how to kick things off. I'm glad that they basically jumped right in.&lt;/li&gt;&lt;li&gt;Scott Morehouse talked about how ArcGIS is architected. He focused a lot on frameworks. I focused on the fact that as a former ESRI employee I used to get paid to hear Scott talk, but now as a conference attendee, I'm the one paying.&lt;/li&gt;&lt;li&gt;About a 1/2 hour into the session, I took a look around the room and thought to myself that there were a lot of people there. I don't know, 600-700 people perhaps?&lt;/li&gt;&lt;li&gt;ESRI announced that 9.2 will support a type of non-versioned, short transaction geodatabase editing model. This to meet the needs of a lot of users that can't embrace long transactions and versioning for a variety of reasons.&lt;/li&gt;&lt;li&gt;ESRI is the geodatabase. Really, this is the first fucntional area that Scott dove into detail on yesterday, and I've also noticed that it's the one area of the software that has something substantially new each release of ArcGIS.&lt;/li&gt;&lt;li&gt;About 1 hour into the session I took a look around the room and thought to myself that there were a lot of us males in the audience. &lt;/li&gt;&lt;li&gt;I noticed some new faces on the stage, and some new roles. Clint Brown talked about the geodatabase, and ESRI are now calling their product specialists 'product engineers'.&lt;/li&gt;&lt;li&gt;ESRI was definitely pushing geoprocessing. It was used as example of how to reuse components from different types of ArcGIS deployments (desktop, engine, server).&lt;/li&gt;&lt;li&gt;ESRI demo'd a lot of what's coming in 9.2. I noticed that the audience wasn't really applauding at all after the demos, up until when Ishmael demo'd ArcGIS Explorer. I think ESRI saved the best for last with this. I thought that his demos were pretty interesting, and with the crowd applauding, I think that they agreed with me.&lt;/li&gt;&lt;li&gt;I came away from the session wondering how many people 'get' all of the various deployment possibilities with ArcGIS. I know that I'm a little bit dizzied by all the options. I was also excited to see the PM session where they'd be demoing the new Flash stuff.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Technical Sessions&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;I attended Al LaFramboise's session on developing components that work in different ArcGIS products (desktop/engine/server). Things started kind of slowly for my taste, but as he got rolling, I think he did a really good job showing by example how you might develop components once and reused them across different types of ArcGIS deployments. As he said, even if you're only developing for desktop now, your app may move to the web at some point in the future, so you might want to accomodate for this in your architecture now.&lt;/li&gt;&lt;li&gt;At the lunchtime .NET SIG meeting, ESRI showed off their .NET IDE integration tools. These are built for VS 2005 and will be released at the same time as ArcGIS 9.2 (at least this is how I understand it). The tools looked pretty powerful. I'm running the express version of VS 2005 currently, and I might think about upgrading just to be able to run the ESRI integration tools... There was at least one comment from the back of the room wondering why ESRI can't officially support VS 2005 now, instead of waiting for ArcGIS 9.2 to do this...&lt;/li&gt;&lt;li&gt;Next, I saw Andrea and Mansour talked about ArcWeb Services. I came in not knowing much about this product, and really I was there to see the Flash/SVG support that ESRI is adding. I came away really interested the AWS product actually. It offers an easy way to build applications that use data and services (like routing, spatial selection, location) hosted by ESRI. Clients pay for it based on the number of hits they take. Mansour demo'd the new Flash (support?). I definitely gave him a A for enthusiasm and he was able to show some really cool stuff. I saw online Flash map apps writing using Java Script hitting AWS. he was even able to mash in content from other online sources. ......Very cool. I don't know that much about this technology, but I do know that Flash can be used to create maps and interactive web apps with very 'clean' looks. I find it compelling to be able to more easily create flash content out of a GIS database.&lt;/li&gt;&lt;li&gt;Lastly, I saw Mike Shaw, Fred Aubry, and Milosz give a really informative and entertaining presentatioon of the new .NET Mobile ADF. This is part of the ArcGIS Server product (thus also available to developers with an EDN subscription). Basically, they built a library that helps you build apps that work on smart clients like tablet pcs, pdas, and mobile phones that are only intermittently connected to a network. I got a lot out of this talk, and later in the evening I talked to E-911 application developer that was really interested in using this as part of his new product.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So, on to Day 2. Don't worry, I'll get back to my carto critique of Google and Ask.Com maps after the dev summit buzz settles a bit.&lt;/p&gt;&lt;p&gt;Talk to you soon,&lt;/p&gt;-Cory&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/03/quick-hits-from-esri-dev-summit.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/114222346452834865</guid><pubDate>Mon, 13 Mar 2006 04:11:00 +0000</pubDate><atom:updated>2006-03-13T05:24:20.723+01:00</atom:updated><title>Comparing the Cartography of Google Maps and Ask.com Maps</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;strong&gt;Dude, Where's my Freeway?&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Go ahead, fire up &lt;a href="http://maps.google.com/"&gt;Google Maps&lt;/a&gt; and type in Denver, CO.&lt;br /&gt;&lt;br /&gt;Something that jumps right out is that you can't quickly find Interstate 25, the major north-south highway/freeway/expressway in Denver. You see this obviously major route, snaking along the S. Plate, curling around downtown... but it's labeled as US Route 87. It takes some inside knowledge to infer that this is I-25. This is a pretty bad cartographic blunder in my opinion.&lt;br /&gt;&lt;br /&gt;So, what's the cause of this problem? Well, the data come from NAVTEQ and many road&lt;br /&gt;segments have multiple names. In this case, some roads are both I-25 and US 87. My opinion is that it's the job of the cartographer or the person that builds the mapping app to label this road as I-25. I'm not saying its easy to do this, but it should be this way.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://maps.ask.com/"&gt;Ask.com&lt;/a&gt; doesn't make this particular mistake. They label the interstate as both I-25 and US 87. In my opinion, this is more correct.&lt;br /&gt;&lt;br /&gt;Interesting side note:&lt;br /&gt;&lt;br /&gt;I've also thought there was something 'kinda cool' about how freeways in some cities have names. You'll hear these names on local traffic reports, and you may even see green sign along the start of a freeway stretch. But, you usually don't see these names on maps. Perhaps I find this interesting because there's more history in a freeway name than a number. Some examples: 'The Santa Monica Freeway' and 'The Pomona Freeway' in Los Angeles, and the 'Keeler St. Expressway' in Rochester, NY. I also think that named freeways are a weapon for locals to keep newcomers at bay.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Enough Already &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Something you notice when looking at the Google and Ask.com maps of Denver is a lot of unecessary label repetition. What I mean is that the I-70 highway shield might appear 3, 4, or 5 times in a given map view. US 6 is another example.&lt;br /&gt;&lt;br /&gt;The cause of this... data. Both online map apps use NAVTEQ data, and for smaller scale maps (maps covering larger geographic areas) routes are comprised of many short line features. It looks to me like the NAVTEQ data are just getting thrown straight into some automated labeling software...&lt;br /&gt;&lt;br /&gt;...in my opinion, too many are being labeled. What should be done is to label the minimum number of times necessary to make it clear which road is which. So, basically, for these main routes, labeling once between major intersections is what you shoot for.&lt;br /&gt;&lt;br /&gt;This is another tough thing (really tough) to nail in an automated system. Sometimes you can help yourself by pre-processing your data, dissolving roads by route number for example, before sending data to your automated labeling processes.&lt;br /&gt;&lt;br /&gt;So, we've learned today that high quality labeling can be very difficult in an automated mapping system.&lt;br /&gt;&lt;br /&gt;In my next post, I'll continue this cartographic critique of Google Maps and Ask.com Maps...&lt;br /&gt;&lt;br /&gt;Talk to you soon,&lt;br /&gt;&lt;br /&gt;-Cory&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/03/comparing-cartography-of-google-maps.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/114133854795423992</guid><pubDate>Thu, 02 Mar 2006 22:25:00 +0000</pubDate><atom:updated>2006-03-02T23:34:14.303+01:00</atom:updated><title>Oprah does GIS?</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;strong&gt;Spacing Out&lt;br /&gt;&lt;/strong&gt;I came across an interesting ESRI support document today: &lt;a href="http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&amp;amp;d=27429"&gt;HowTo: Salvage a corrupt shapefile&lt;/a&gt;. The title cracks me up. It sounds like something you might see on an Oprah episode... Today's show: salvaging a corrupt shapefile, taming you unruly teenager, er, bloated personal geodatabase, and getting the most out of your relationship...classes...&lt;br /&gt;&lt;br /&gt;I'm one that appreciates a bit of irony, and even this technical support document delivers. The document gives you about 15 things to try to fix a dusted shapefile, but it contains this disclaimer: "If the steps in this document do not salvage the shapefile, revert to the back up". Well, if nothing else, this document has inspired me to backup my laptop.&lt;br /&gt;&lt;br /&gt;I was actually searching for an answer to this question: "Can a shapefile name contain spaces?". My research is inconclusive. Lots of people/places say that it should not, but ArcCatalog certainly lets you create a shapefile with a space in the name. Seems to me that it'd be bad practice.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Off on a Tangent&lt;br /&gt;&lt;/strong&gt;Something else, unrelated, that I came across recently. .NET has two &lt;a href="http://www.opensky.ca/~jdhildeb/arctan/"&gt;Arctan&lt;/a&gt; functions. From the Microsoft doc:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemMathClassAtanTopic.asp"&gt;Atan&lt;/a&gt; - Returns the angle whose tangent is the specified number.&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemMathClassAtan2Topic.asp"&gt;Atan2&lt;/a&gt; - Returns the angle whose tangent is the quotient of two specified numbers.&lt;br /&gt;&lt;br /&gt;An interesting difference between the two, is that the return val for Atan is θ in radians where -π/2 ≤ θ ≤π/2 (-90 to +90 degrees). If you're working (like I was) with angles that represent directions in 360 degrees, and you use Atan, you'll probably need to do some extra work with the return val to get what you want... Whereas, with Atan2 the return val is θ in radians where -π ≤ θ ≤ π (-180 to 180 degrees). As far as I see it, this covers you for a full circle. Pass in your cartestian y and x (+ or - values possible) and with Atan2 you'll get the math angle you're looking for, at least I did...&lt;br /&gt;&lt;br /&gt;Talk to you soon,&lt;br /&gt;&lt;br /&gt;-Cory&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/03/oprah-does-gis.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/114101038990710707</guid><pubDate>Mon, 27 Feb 2006 03:05:00 +0000</pubDate><atom:updated>2006-02-27T05:10:49.440+01:00</atom:updated><title>Cartography in GIS: It's not just assigning symbols to geometry</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;I saw that James just posted about &lt;a href="http://www.spatiallyadjusted.com/2006/02/23/cartography-and-arcmap/"&gt;Cartography and ArcMap &lt;/a&gt;... actually, before I even saw it, a few colleagues emailed me to tell me that they saw it. Helpful people that they are, they knew that I'm looking for ideas for my blog. So, for this entry, I'll piggy-back a bit on James' post.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Color Brewer&lt;br /&gt;&lt;/strong&gt;First, a great online resource for cartography that everyone should know about is Color Brewer (&lt;a href="http://www.colorbrewer.org"&gt;www.colorbrewer.org&lt;/a&gt;). This site was created by Dr. Cindy Brewer and Dr. Mark Harrower both cartographers, and this is the place to go online if you're not sure about what colors to use on your maps... and believe me, you're not sure about what colors to use on your maps! The site can basically be used as a "map colorer", telling you which colors/schemes to use for different types of maps and data.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Evolution of cartographic facilities in GIS Software &lt;/strong&gt;&lt;br /&gt;Yes, there's some exciting new functionality coming in 9.2 for cartography. Admittedly I'm a bit biased since I knew this stuff from inside ESRI, but perhaps I'll do some more convincing for your here.&lt;br /&gt;&lt;br /&gt;9.2 cartographic representations allow you to edit feature symbology on a feature by feature basis. Pretty powerful as you can imagine for cartographers, but also as ESRI's Paul Hardy likes to say, for people that "just want a better map". Oh, and please don't forget the database! Symbology edits are stored in the geodatabase together with the feature data. Have you been waiting for ESRI to store .lyr/.mxd information in a database? Well, this is the first step...&lt;br /&gt;&lt;br /&gt;Is 9.2 the beginning of better cartography from a GIS software package...? Of course not. Sticking with ESRI products, I'd say that a lot started with the ArcView 1x/2x/3x packages. In my opinion, GUI-based software can, and I emphasize _can_, produce better maps. Sure, people got by with ArcPlot, but GUI-based software a) makes "trial and error" easier (although I wouldn't recommend trial and error printing to large format printers when you're footing the paper/ink bill...), and b) GUI-sofware tends to be more WYSIWYG than say, creating maps from a command line app. 9.2 cartographic representations (call 'em reps for short) extend WYSIWYG capabilities in ArcMap by providing the ability to edit symbology.&lt;br /&gt;&lt;br /&gt;9.2 cartographic representations aren't just editable symbology, they also employ better "automated routines"... (think better symbols). With reps, your maps can have better dashed lines, you'll have more control over the placement of symbols along lines, etc... Cartographers will eat this up, probably starting at the "top". What I mean by this is, organizations that have really strict cartographic requirements will be the first set of users attracted to this functionality. But, the usefullness of reps will have their use trickle down to many, many users...&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;A New Editing Paradigm?&lt;/strong&gt;&lt;br /&gt;Ah yes, &lt;em&gt;paradigm&lt;/em&gt;, the word that I, the engineer, heard but wasn't quite sure how to spell during the first weeks of my graduate education in geography. 9.2 also provides new representation editings tools. Simplifying things greatly, these tools are "illustrator-like" allowing you do do things that just aren't very easy using the standard arcmap edit tools... such as modifying multiple features at once. Cartographers need to do this all the time (think offsetting several road line segments from a creek or river) and they don't want to think about topology when they do it, at least not in the sense that this is necessary in the pre 9.2 ArcMap editing experience.&lt;br /&gt;&lt;br /&gt;Depending on how 9.2 reps are received by the public, in my opinion, their usability could spell big changes for the data-editing experience in ArcGIS... There are rumors of a huge change to the look/feel/architecture of arcgis at the next major release (10.0?). A big change to editing could be part of this.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Understanding Cartographic Representations&lt;/strong&gt;&lt;br /&gt;Are cartographic representations hard to understand? My answer is, yes, er.. possibly. &lt;a href="http://www.spatiallyadjusted.com/2005/07/25/cartography-in-arcgis-9/"&gt;James' UC blog post&lt;/a&gt; suggested that reps might be hard to "get", and I know that even big ESRI customers that use ArcGIS for cartography want more detailed information about how they can best use this new technology.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The Devil is in the Data&lt;/strong&gt;&lt;br /&gt;Like a lot of other things, when you need to do a lot of something with GIS, and do it often (such as produce a lot of maps, and produce frequent updates to these maps), it helps: a) to have your data in a database -- hopefully the ESRI geodatabase ; ), b) to have well modeled data, and c) to have well defined processes for creating and updating your data.&lt;br /&gt;&lt;br /&gt;My experience with dealing with organizations that produce a lot of maps from GIS is that, well, most of their work isn't in the cartography, it's in dealing with the data... I'd postulate that this is pretty universal, whether you're producing maps, or performing watershed analyses, it helps to have a), b), and c) in pretty good order.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Design is Important&lt;/strong&gt;&lt;br /&gt;Design will always be important in cartography. It's no secret that most cartographers would like to see better maps than what we're currently seeing. Some of us (not me certainly) are like film critics: we'll tell you what we like and what we don't like, but we probably won't be able to (or won't want to?) tell you how to get there from the start.&lt;br /&gt;&lt;br /&gt;The evolution of tools for cartography in ArcMap offers the promise for "better maps", but everybody knows that the ArcGIS 9.x Geoprocessing tools/environment didn't immediately start producing better glaciation models or better site selection analyses... I'd say that the same goes for new 9.2 cartography tools. There's potential for better maps, but resources (online, as James mentioned) and I'd add software documention and even software defaults, are needed to help end users benefit the most from new functionality...&lt;br /&gt;&lt;br /&gt;... after all, anyone that's worked with the ArcView 3x technology has problably seen the, well, hideous jagged lines that appear by default in ArcView legends. Not to pick on anyone, but here's an &lt;a href="http://users.mhc.edu/facultystaff/spearson/safc/pub_lnds.gif"&gt;example&lt;/a&gt;. The problem is that that this "toppled Z" symbol is the default legend pattern in the software, and not than many people change software defaults. One consequence of this is that you can still peg an ArcView 3x map simply by the appearance of lines in the legend.&lt;br /&gt;&lt;br /&gt;Talk to you soon,&lt;br /&gt;&lt;br /&gt;-Cory&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/02/cartography-in-gis-its-not-just.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/114062598938737861</guid><pubDate>Wed, 22 Feb 2006 16:28:00 +0000</pubDate><atom:updated>2006-02-22T17:35:30.670+01:00</atom:updated><title>1 if ByRef, 2 if ByVal...</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;strong&gt;ArcGIS Explorer&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;ul&gt;&lt;li&gt;ESRI has posted an FAQ here: &lt;a href="http://www.esri.com/software/arcgis/explorer/about/faqs.html"&gt;ArcGIS Explorer FAQ&lt;/a&gt;&lt;/li&gt;&lt;li&gt;If you have ArcGIS 9.2 beta (I don't), then you have ArcGIS Explorer. If not, you need to wait for the public beta (March?).&lt;/li&gt;&lt;li&gt;Are you registered to attend the upcoming AAG meeting in Chicago? If you are, be sure to see ESRI's David Maguire talk about ArcGIS Explorer (Thurs March 9th): &lt;a href="http://communicate.aag.org/eseries/aag_org/program/AbstractDetail.cfm?AbstractID=8279"&gt;David Maguire AAG Presentation Abstract&lt;/a&gt;&lt;/li&gt;&lt;li&gt;If you aren't registered for the conference, but you're in the area, you could always attire yourself as a starving graduate student, pop in around 2:45, and sit near the back of the room to hear what David has to say.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Copy/Paste Code Reuse&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;p&gt;&lt;br /&gt;Ah yes, who hasn't copy pasted code to get a head start. Really there's no problem with this normally, but here's something that happened to me last week, pasting some of my own code no less..&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I wrote a few subroutines in ArcMap VBA just to get going. After a bit I brought this code over to VB.NET.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I had a problem bringing one of my subs over, and I didn't figure out what was wrong for a long while. Can you guess what I did?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Well, the top of my sub looked something like this:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;Private Sub CalcLineStartEndID(InLayer As IGeoFeatureLayer, &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;_&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;ByVal LineID As String, _&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;StartID As Integer, _&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;EndID As Integer)&lt;/span&gt;&lt;br /&gt;And then, towards the end of my sub I did something like this:&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;StartID = iMinSta&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;EndID = iMaxSta&lt;/span&gt;&lt;/p&gt;&lt;p&gt;So, StartID and EndID are ByRef parameters that I calculate during the sub. Okay, an OO purest would slap me on the wrist, but this is what I felt like doing that day..&lt;/p&gt;&lt;p&gt;Anyway...the problem is, (when you paste this blindly into VB.NET before having your morning cup of coffee or green tea), you get this:&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;Private CalcLineStartEndID(ByVal InLayer As IGeoFeatureLayer, _&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;ByVal LineID As String, _&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;ByVal StartID As Integer, _&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;ByVal EndID As Integer)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;That's right, by default, in VB.NET params are ByVal...so, StartID and EndID become ByVal params, but everything 'pastes in' fine, compiles fine, etc... Just, when you run/test your code, well, things don't work quite the same... Lesson learned.&lt;/p&gt;&lt;p&gt;Talk to you soon,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;-Cory&lt;/p&gt;&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/02/1-if-byref-2-if-byval.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/113995962050257189</guid><pubDate>Tue, 14 Feb 2006 23:14:00 +0000</pubDate><atom:updated>2006-02-15T00:29:44.036+01:00</atom:updated><title>How to write a layer context menu command in C#</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Another technical post today, but I promise that my next post will be lighter-fare...&lt;br /&gt;&lt;br /&gt;So, yesterday I was researching how to do something with ArcObjects, and since I'm forcing myself to eat the healthy cereal that is C#, as opposed the sugary VB.NET that I'm used to, I did everything in C#.&lt;br /&gt;&lt;br /&gt;I was trying to figure out how to add a custom command to a standard ArcMap layer context menu (doing all of this with code of course). In other words, I wanted my command to appear when a user right clicks on a layer in the ArcMap table of contents..&lt;br /&gt;&lt;br /&gt;This is easy to do from VBA. If you've already compiled/registered your custom C# command, you can just write a little sub like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Sub AddCommandToLayerContextMenus()&lt;br /&gt;&lt;br /&gt;' custom command&lt;br /&gt;Dim pCommandUID As New UID&lt;br /&gt;pCommandUID.Value = "MyNamespace.MyCustomCommand"&lt;br /&gt;' or use GUID&lt;br /&gt;'pCommandUID.Value = "{F9B2E774-29A0-4eaa-B8E2-D26DA1F21CB2}"&lt;br /&gt;&lt;br /&gt;' add to feature layer context menu&lt;br /&gt;Dim pCmdBar As ICommandBar&lt;br /&gt;Set pCmdBar = ThisDocument.CommandBars.Find _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;(arcid.FeatureLayerContext_Menu)&lt;br /&gt;pCmdBar.Add pCommandUID&lt;br /&gt;&lt;br /&gt;' add to group layer context menu&lt;br /&gt;Set pCmdBar = ThisDocument.CommandBars.Find _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;(arcid.GroupLayer_ContextMenu)&lt;br /&gt;pCmdBar.Add pCommandUID&lt;br /&gt;&lt;br /&gt;' add to raster layer context menu&lt;br /&gt;Set pCmdBar = ThisDocument.CommandBars.Find _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;(arcid.RasterLayer_ContextMenu)&lt;br /&gt;pCmdBar.Add pCommandUID&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But, I wanted to manage all of this from my C# code. So, I wrote a custom extension that automatically adds my command to several ArcMap layer context menus on start up.&lt;br /&gt;&lt;br /&gt;I've documented this here: &lt;a href="http://www.eicher-gis.com/ArcObjects/LayerContextCommand_Example.htm"&gt;How to Add a Custom ArcObjects C# Command to a Standard ArcMap Layer Context Menu&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Talk to you soon,&lt;br /&gt;&lt;br /&gt;-Cory&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.eicher-gis.com"&gt;www.eicher-gis.com&lt;/a&gt;&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/02/how-to-write-layer-context-menu.html</link><author>Cory Eicher</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/21845286/posts/full/113968412934294246</guid><pubDate>Sat, 11 Feb 2006 18:47:00 +0000</pubDate><atom:updated>2006-02-11T20:07:27.080+01:00</atom:updated><title>Diving into C#</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;Outside, it's been a chilly few days here in Denver, which has given me the opportunity to ramp up some of my skills. I'm a VB guy, but recently I dove into building some ArcObjects components in C#. The experience reminded me of a long-ago, early-morning, Adirondack scout camp, "polar bear" swim. Standing before the icy black, I shivered at the thought of jumping in... but the experience was surprisingly painless, and it was over and done before I knew it.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;I started by working through the ESRI C# Walkthrough: &lt;a href="http://edndoc.esri.com/arcobjects/9.1/ArcGISDevHelp/DevelopmentEnvs/DotNet/Walkthrough1CS.htm"&gt;Creating a simple command for ArcMap&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Since I'm using Visual Studio 2005 (.NET 2.0) and I'm also using the Visual C# Express Edition, I found a few differences from the ESRI documented steps. I figured I'd note those differences here:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Create a new class library&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Steps worked fine&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Reference the ESRI object libraries&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I found it useful to also reference to ESRI.ArcGIS.Utility. I used this later for component category registration.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Create a zoom-in command&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Steps worked fine&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Add a using directive&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;To define my class, I modified the default .cls. By default, you'll get these directives:&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;using System;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;using System.Collections.Generic;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;using System.Text;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;I found that I only need the first, and I also added this directive:&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;using ESRI.ArcGIS.Utility.CATIDs;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:courier new;"&gt;&lt;p&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;Implement the ICommand interface&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;ESRI Step 4 states "Right-click the ICommand interface, click Add, and then click Implement Interface"...I couldn't find this functionality. Perhaps its because I'm using the Express version...&lt;br /&gt;So, I manually stubbed out my class...actually, I copy/pasted from another ESRI dev sample. &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Adding code to the members of ICommand&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;IntPntr is defined in System, so you'll either need a directive (see above), or you'll have to fully qualify:&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;private System.IntPtr m_hBitmap;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Returning the ICommand::Bitmap property&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Steps worked fine&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Expose the ZoomIn class to COM&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;To reg. for COM interop, Goto Project &gt; Properties &gt; Build &gt; Register for COM interop. Also, maybe this is obvious, but I had to add GuidGen.exe as an External Tool (again, I'm using the Express Version of Visual Studio). Location for me was: "C:\Program Files\Microsoft Visual Studio 8\Common7\Tools"&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Adding COM category registration functions&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I did this differently. Since we're using ESRI.ArcGIS.Utility.CATIDs, you can do this instead:&lt;/p&gt;&lt;p&gt;#region "Component Category Registration"&lt;/p&gt;&lt;p&gt;[ComRegisterFunction()] &lt;/p&gt;&lt;p&gt;static void Reg(string regKey) &lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;MxCommands.Register(regKey);&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;[ComUnregisterFunction()]&lt;/p&gt;&lt;p&gt;static void Unreg(string regKey) &lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;MxCommands.Unregister(regKey);&lt;/p&gt;&lt;p&gt;} &lt;/p&gt;&lt;p&gt;#endregion&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Compiling the project, Use the command in ArcMap&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;In order to get a .tlb, I had to go to Project &gt; Properties &gt; Application &gt; Assembly Info &gt; and check 'Make Assembly COM-visible'&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Stepping through the command with the debugger&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I found that I wasn't able to do this with the Express Version of VS... but I was hungry for lunch and I didn't try to hard...&lt;/p&gt;&lt;p&gt;Talk to you soon,&lt;/p&gt;&lt;p&gt;-Cory&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.eicher-gis.com"&gt;www.eicher-gis.com&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><link>http://www.eicher-gis.com/Blog/2006/02/diving-into-c.html</link><author>Cory Eicher</author></item></channel></rss>