Building an Application with ArcGIS Server and the Web ADF

Hi All,

Welcome to the first of many posts on building, using, consuming, and deploying ArcGIS Server services.  Today I want to touch on building a simple web application in the Web ADF for the Microsoft .NET Framework with cached data and a couple of Geoprocessing Tasks. 

Have you ever developed a really nice TIN dataset?  TINs are nice in that they can be built quickly, contain a lot of detail, and can be used to perform traditional GIS analysis.  Let’s take the TIN dataset to the next step.  Say we want to publish an application that uses a TIN in the new Web ADF but we want it to perform lightening fast AND be able to do analysis on it? 

I have a TIN that I created with tagged vector contour data that I downloaded from the GIS Clearinghouse for the State of Kansas. 

 

This TIN took about 20 seconds to draw to the screen from ArcMap.  That is too slow to be useful for web mapping applications.  Fortunately we can take advantage of ArcGIS Server 9.2 caching capabilities.  The steps to publish data to server are as follows:

  1. Set up map document in ArcMap with featured dataset(s) rendered appropriately,
  2. Publish MXD to Server,
  3. Build fused map cache.

The map cache option in ArcGIS Server 9.2 is a really powerful feature.  This allows you to create high performance web applications.  Look for many more posts in the future about designing, building, deploying, and using map caches.  It is a fascinating subject.

Back to work.  The map cache that I created contains the following specifications:

  • Tile size 256×256 pixels
  • Image type PNG
  • Fused map cache
  • Cached at the following scales: 100k, 75k, 50k, 24k, 12k, 6k 

 

Now that the service is ready we can build the web mapping application to consume it.  The team has really done a lot here to help the developer AND the non-developer build web applications.  The web application can be completely built and deployed remotely from the ArcGIS Server Manager.  If the default application does not meet your needs you can customize the application in MS Visual Studio 2005. 

 
 

It is really as easy as that.  Try it out here

 

Now while we get the performance of the cached TIN elevation data in the map service, we don’t want to lose the analytical capabilities of the original data.   This is where Geoprocessing (GP) Services come into play.  With GP services we can build models that run off of the original data using model builder and then publish those models to ArcGIS Server which can then be used in our web applications.  In this example I want to build a line of sight GP service.  This will take in as input the original TIN dataset along with a feature set input (allowing the user to draw points, lines, & polygons as input to the model).  Here is the model:

 

 

Once we deploy the model to the server, we can then access the GP service directly from the web mapping application.  Again just like map caching, GP services are very powerful yet require careful consideration.  When you publish a GP toolbox to the server everything has to be set up to allow the web user to give input, execute, and visualize.  The process must do everything for the user.  That includes assigning layer files to the output of the model for rendering.  We will be revisiting this in detail in future posts. 

I want to add one more model to the application that allows users to draw linear features on the map, extract the vertices from the points of the line, and then add elevation values from the original TIN to the point data set.  Check out the model here:
 

The real test is in the deployment of the application.  Give it a try here.

So, what do you think?  

Jeremy 

 

This entry was posted in Services and tagged , , , . Bookmark the permalink.

Leave a Reply

10 Comments

  1. Mapor says:

    Excellent idea, really to access so easy the Server Manager is promising and gives desire to prove and to acces to new possibilities for our users. Let us hope that this Blog grow up, Greetings from Argentina

  2. jlacombe says:

    This is good stuff. I’ve got a question on the map cache option… I can create one, and it’ll preview, I can see it in the overview map and the magnifier control, however, it will not display in the map control itself…Any Thoughts?

  3. Jeremy says:

    Dylan–
    Which version of Firefox and which version of the Mac are you on?

    Jilacombe–
    Check your virtual cache directory on the server. Make sure that is open and available to the web. Look in your page source in your web application to see what the url is for the tiles that your viewing.

    Jeremy

  4. Jeremy says:

    Casey,

    Thanks for your comment. We have identified this as a Firefox specific issue. You will not see this problem on IE 6 and IE 7. We are working on a fix to address this issue in Firefox browsers.

    Jeremy

  5. Jeremy says:

    Dylan,

    What are you seeing with the application? Did you try both applications above? Does the map draw, but the tasks don’t work or does the map not draw at all.

    Thanks,
    Jeremy

  6. Jeremy says:

    Kevin, sorry, no, I can’t give you an exact time frame. Given the feedback we have heard on this, we are working to get a fix ready for one of the 9.2 Service Packs.

    Thanks,
    Jeremy

  7. Jeremy says:

    Thanks John,

    The speed difference has to do with how we are initializing dynamic resources on top of basemaps built with cached services. Service pack 1 has quite a few optimizations for this workflow. Look for sp1 soon.

    Jeremy

  8. Varun123 says:

    Hi Jeremy,

    Excellent article, I want to develop the line of sight functionality in ArcGIS Server 9.3 and Dot NET 2005 can you asists me or can you give me the code for this.

  9. rastrauch says:

    Brenda, FWIW – although this is a bit outdated now, http://forums.esri.com/Thread.asp?c=158&f=1697&t=231529&mc=7
    (pre 9.3.x), some of the items may still be relevant. Once 9.3 came out I had to choose between Java and .Net since security became a bit more complicated with both versions on one machine. We went with .Net (due to other dept users). The nice thing is, I believe you can use any of the web API’s (Javascript, Flex, Silverlight, etc) with services from either the .NET or Java versions.

    The out of the box web ADF “wizards” are nice, and I think easier to secure, but the API’s seem to be more flexible and at least for me, easier to program/customize with many excellent live samples with the code included. For us, it seems like the ADF are easier to corrupt (if you are not a true JAVA or .NET programmer) and harder to fix if you do. The API’s are a lot more forgiving and easier to bug (in my opinion only – I’m sure others could argue the opposite). So, a lot of it depends on how familiar you are with any of the languages.
    -Rebecca (Becky)

  10. sanwar1969 says:

    do we need to install any other component along with WebADF runtime in a distributed environment (with GIS Server, DB+SDE server, and Application server+ADF on a separate machine)??