New Caching Tools to Keep In Mind When Using ArcGIS Server 10

March 26, 2012
Jeremy Monn

Jeremy Monn

At least half of my work week involves working with ArcGIS Server. So when my organization upgraded to ArcGIS Server 10 I was naturally curious what improvements were made to the software for map service caching purposes.  The most well-known and highly publicized caching-related improvement for ArcGIS Server 10 is the compact cache, which groups individual tiles into bundle files instead of storing each tile separately.  This modification not only helps shorten caching time, but it also shortens the time required to copy a cache from one location to another.

While the introduction of the compact cache option is important to know about, there are two lesser-known improvements that caught my eye which could be useful to those who regularly create or work with cached map services.

Mixed Tile Format
When configuring a map cache one needs to decide what image format to use for the cache tiles and what one decides will determine whether or not portions of a tile can be transparent.  If one selects JPEG then none of the tiles, even those along the cache periphery that have large areas that should be transparent, will have transparency.  This is an issue when one wants to overlay two cached images on top of one another.  In ArcGIS Server 10 one can work around this by using the mixed tile format, which provides the needed transparency in periphery tiles by storing them as PNG32 and storing all other tiles as JPEG.

Export / Import Map Server Cache Tools
Two tools available in ArcToolbox in ArcGIS 10 that could be very useful to those creating or modifying cached map services are the Export Map Server Cache and Import Map Server Cache tools.  The name of each tool clearly identifies each tool’s function.  However, what might not be so clear is the usefulness of these tools in the caching process.  Using these tools together provides the ability to collaboratively build a cache.  For example, one user could export a specific portion of a map service’s cache that they updated and share the update with others who can then incorporate the update in their own versions of the same map cache by using the Import Map Cache tool.  Additionally, the Export Map Cache tool can be used to export the cache to a folder that ArcGIS Desktop users can access. The ArcGIS Desktop users can pull in the cache as a raster dataset, thus eliminating the need to be connected to the ArcGIS Server that hosts the cache’s parent map service.

For more information on all improvements associated with ArcGIS Server 10, refer to ESRI’s What’s new in ArcGIS Server 10 page.


ArcGIS Server 10 Migration and WFS Services

December 20, 2011
Jeremy

Jeremy Monn

As readers of Ashley Buzzeo’s latest blog post already know, Towson University’s Center for GIS (CGIS) has migrated its hosted ArcGIS Servers from ArcGIS Server 9.3 to ArcGIS Server 10.  As the migration took place all GIS services were reviewed to make sure they were functioning properly.  While most services were converted without issue a handful would not start post-migration.  After several hours of troubleshooting, the problem was identified as being related to a unique subset of WFS-enabled map services.

What was interesting about this problem was that several WFS-enabled map services worked properly after the migration while a few did not.  Knowing this, I knew that the problem’s solution existed in understanding how the functioning and malfunctioning WFS-enabled map services differed.   By comparing the information contained in the REST endpoints for a functioning and malfunctioning WFS-enabled map service I noticed one difference: the functioning WFS-enabled map service had unique field aliases while the malfunctioning WFS-enabled map service had two fields that had the same alias.  Making the malfunctioning map service’s field aliases unique solved the problem as I was able to start the service and confirm it worked properly.   All the other malfunctioning WFS-enabled map services were also explained by duplicate field aliases.

While this blog touched on only one issue related to ArcGIS Server 10 migration, there are many other issues that one may experience.  Visit ESRI’s Migration to ArcGIS Server 10 page as a starting point for answers to other migration-related questions you may have.


Lessons Learned III: Creating a KML-Enabled ArcGIS Server Map Service

September 6, 2011
Jeremy

Jeremy Monn

Apparently my favorite topic to blog about is creating a KML-enabled ArcGIS Server (AGS) map service, because I find myself writing about the same topic even though I have written about this topic in two previous blog posts.  The impetus for writing about this topic a third (and hopefully final) time is that I found myself troubleshooting a KML-related issue that I am sure other GIS practitioners have or will come across.   Provided below is a description of each issue and its solution.

ISSUE ONE

When panning to a new location in Google Earth, the data that the KML-enabled AGS map service references disappears.

Explanation

The problem here likely stems from how the KML file was configured when it was created from an AGS map service.   There are specific configuration settings that deal with when or how a refresh of the KML file occurs.  In this case, one should configure the KML file so that it refreshes once the user stops panning.

Solution

Open the KML file with a text editor and search for the <viewRefreshMode> tag.  Make sure the value inside this tag is set to “onStop”.  Additionally, if any <refreshMode> and <refreshInterval> tags exist remove them if you want the refresh to be solely triggered by a user panning.

ISSUE TWO

The KML-enabled AGS map service used returns a URL when a feature is identified in Google Earth, but the URL does not work.

Explanation

An obvious reason why this might occur is because the URL provided in the dataset’s attribute  table was entered incorrectly.  Another less obvious reason is that special characters in the URL are being replaced by other characters.  For example, the “&” character may be replaced by the “&amp” string.

Solution

Obviously if the data was entered incorrectly in the source data’s attribute table then one has to correct the mistake.  However, when one has an issue where the “&” character is being replaced    by the “&amp” string then one should find out what MXD is being used for the AGS service,      save it as a MSD file, and re-point the AGS service to the newly created MSD file.  Once the AGS service is refreshed, the URLs should be correct in the service’s KML file.


Starting and Stopping AGS Services Using a Python Script

July 7, 2011
Jeremy

Jeremy Monn

Updating datasets used by an ArcGIS Server (AGS) service can be tedious and time consuming. The major reason for this is that a dataset stored in a file geodatabase or SDE that is used by an AGS service is locked.  This means that it you want to replace the dataset with an updated dataset you first have to stop any AGS service using the dataset.  The time consumed increases if multiple AGS services use the same dataset or if there are several copies of a single AGS service using the dataset.  The tediousness of the task is apparent when one must navigate throughout ArcCatalog to 1) rename and import the updated dataset into the appropriate file geodatabase or SDE instance and 2) to start and stop the AGS service(s) using the dataset.  This blog entry focuses on a Python script I wrote that addresses the later by reducing the need to navigate throughout ArcCatalog to start, stop, and restart services that need updated.

My search for a solution began by perusing the ESRI ArcScripts page for a script that starts and stops services on an AGS server.  Luckily I came across the AGSSOM script, which not only allows one to start and stop services on one or more AGS instances, but it also allows one to restart and publish services.  If one wants to run the executable from Windows command line, the README documentation provides clear instructions.  However, my goal was to call the AGSSOM.exe from a model I built using Model Builder.  In order to do this, I wrote a Python script that stops, starts, or restarts a user-specified service on two AGS instances and incorporated the script into a model that the user runs from ArcToolbox.  The script is provided below with descriptive comments italicized.

# Import system modules

import sys, string, os, arcgisscripting, re

# Create the Geoprocessor object. 

gp = arcgisscripting.create()

# User of Geoprocessing Tool specifies the name of the service being updated (ServiceName) and whether the service is to be started, stopped, or restarted (OperationGUI)

ServiceName = gp.GetParameterAsText(0)

OperationGUI = gp.GetParameterAsText(1)

#The user’s choice for starting, stopping, or restarting the service is translated to the appropriate string used as an argument to run the AGSSOM.exe 

if OperationGUI == ‘Start’:

Operation = ‘-s ‘

if OperationGUI == ‘Stop’:

Operation = ‘-x ‘

if OperationGUI == ‘Restart’:

Operation = ‘-r ‘

# Execute the AGSSOM.exe in order to start, stop, or restart the user-specified service on two AGS instances (StagingAGS and PreReleaseAGS)

os.system(r”D:\AGS\AGSSOM.exe StagingAGS ” +Operation+MDiMapServiceName)

os.system(r”D: \AGS\AGSSOM.exe PreReleaseAGS ” +Operation+MDiMapServiceName)

It is important to note that the script above will only work properly if the user has administrative rights to the specified AGS instance(s).  Additionally, one must note that only the AGS instance names (StagingAGS and PreReleaseAGS) are specified above.  This means that the script will only work properly if the AGSSOM.exe is stored on a computer than is on the same network as the AGS instances.  Therefore, the script above must be tailored to the specific environment in which it is used.

Excluded from this blog post is a description of a second model I created that simplifies the renaming and importation of newly updated datasets used by an AGS service.  This model, employed with the model that utilizes the Python script described above, significantly reduces the time and tediousness of updating datasets used by an AGS service.  A description of the second model will be provided in a future blog post.


Lessons Learned II: Creating a KML-Enabled and WFS-Enabled ArcGIS Server Map Service

May 26, 2011
Jeremy

Jeremy Monn

A couple weeks ago I found myself trying to remember how to create a KML-enabled ArcGIS map service through ArcGIS Server Manager.  Luckily for me I wrote a blog on this topic about a year and a half ago.  Reading the blog helped me with the task at hand, but I felt an update would be valuable. Therefore, this month’s blog post focuses on returning attribute data from KML-enabled ArcGIS map services as well as things to watch out for when WFS-enabling ArcGIS map services.

Why doesn’t my KML-enabled map service display tabular data???
In my previous post, I described the steps involved in creating the map service’s KMZ file on an ArcGIS server.  However, I didn’t relay how one goes about ensuring that the tabular data tied to the features in that service will be returned when a user clicks on the feature in Google Earth.  In order to do this, one must enable the feature layer’s HTML Popup tool within the map service’s MXD.  For detailed instructions on how to complete this task, refer to the “How to set HTML properties for feature layers” section.

I can’t WFS-enable my ArcGIS Server map service, why???
If one is interested in providing users of their dynamic ArcGIS Server map service with the ability to use the data within the service in geospatial analysis scenarios, then one solution is to WFS enable the service.  Just like KML enabling, the process of actually WFS enabling the ArcGIS map service is quite simple.  However, there are two very important things to keep in mind when WFS enabling an ArcGIS map service.

1) If one’s ArcGIS map service is published using a MSD, as opposed to a MXD, then the map      service cannot be WFS enabled.  The solution is publishing the service from the service’s MXD.

2) If one’s ArcGIS map service consists of at least two layers that reference the same feature class then the map service cannot be WFS enabled.  A solution is to create a copy of the feature class and reference one of the layers to the copy.  NOTE: This solution can be painful from a  data management perspective, especially if one is working with large datasets that are   frequently updated.

Hopefully now that I have written these tasks in a blog I will not forget them.  However, it is nice to know that if I do I can always refer back to my blog for guidance.  I guess blogging can sometimes be viewed as a unique type of documentation.


Questions and Concerns: How do I get my ESRI Certification?

March 30, 2011
Jeremy

Jeremy

A discussion at MSGIC’s recent quarterly meeting held at UMBC provided me with this month’s blog material.  While presenting what was new in ArcGIS 10, ESRI representatives wrapped up their presentation by touching on ESRI’s new certification program.  This set off a slew of questions and comments by attendees, some of which I’ll touch on below.

ESRI certification – What is it?
If you are ESRI certified, this basically means that you know a given set of ESRI software products extremely well.  There are several types of certification, each tailored to a person’s experience with a set of ESRI software products.  For example, there is a certification targeted specifically for individuals experienced in developing ArcGIS web applications (ESRI Certified Web Application Developer Associate).  In the future, every certification will have an associate and professional level, with the professional level certification signifying more experience and a broader knowledge of what the software can do.  Currently, only the ArcGIS Desktop certification has both the associate and professional levels available.

For more information on all of the possible ESRI certifications, click here.

So, how do I get ESRI certified?
In order to get certified, you must take a 90-95 multiple choice question examination at a certified Pearson VUE testing center.  According to the ESRI representatives at the MSGIC quarterly meeting, approximately 80% of the questions cover GIS theory and best practices, while the remaining 20% test knowledge of where to go within a given ESRI software product in order to complete a task.

Each examination attempt costs $225 and the exam is given in English only.  Upon completion of the exam, the exam taker will be informed in approximately 5 business days whether they passed or failed.  However, the exam taker will not be notified of which and how many questions were answered incorrectly.

For more information regarding taking an ESRI certification examination, click here.

Attendee’s Concerns
Along with the questions regarding how one gets ESRI certified, several attendees provided valid concerns that I believe are worth mentioning.

CO$T – An obvious concern is the fact that one needs to spend $225 per examination attempt.  Additionally, if this certification program takes off and RFP reviewers see the certification as a must then organizations that do GIS work are in a bit of a bind from a training standpoint:  do they foot the bill to get all GIS professionals certified or only a few?  This is something I never considered until the topic was brought up.

Lack of Transparency – Many attendees expressed their frustration that exam takers only receive a pass / fail notification and no indication of how many questions were answered wrong and which ones were answered wrong.

Confusing Qualification Language – If one views the Overview tab of the ArcGIS Desktop Associate certification description, the language mentions that the certification is focused towards ArcGIS 10 Desktop users.  However, if one views the Qualifications tab on that same page, one will notice that a qualified candidate for the certification will likely have two years experience with ArcGIS software.  This left some attendees asking “If this certification is geared towards ArcGIS 10 users, how can anyone be qualified to take the exam if ArcGIS 10 has not been out for two years?”  While I believe the qualification description is focusing on the GIS theory portion of the exam, I think it’s a valid question considering 20% of the questions that make up the exam focus on knowing where to go within the software (presumably ArcGIS 10) in order to complete a given task.

ESRI Review of Certification – Attendees were informed that ESRI may periodically review ESRI certifications.  In other words, there is a chance that a person who has an ESRI certification may have to become re-certified in the future if ESRI feels the certification needs to be updated.

More Questions? Feedback?

User feedback is always important.  For questions or comments regarding ESRI’s certification process, contact ESRI at certification@esri.com.

If you have more questions, visit the ESRI certification page’s FAQ section.


Map Service Caching Issues: There’s Always More Than One Way to Fix a Problem

December 10, 2010
Jeremy

Jeremy

A couple weeks ago I was asked to troubleshoot the odd behavior of a cached map service in a FLEX web mapping application.  The application provides users with the ability to view the map at 11 different scales ranging from approximately 1:2300000 to approximately 1:2250.  The FLEX web mapping application uses several cached map services, but one disappeared when a user zoomed into the largest scale possible (1:2250).  This behavior was very odd because the cached tiles existed for the map service at the largest scale (1:2550).  So what was causing the odd behavior?

After comparing the cached services used in the application, I noticed that the cache level scales were all EXACTLY the same except for the largest scale.  (Up to this point I have referred to the largest scale as “approximately 1:2500”.  The true value for the largest scale is actually 1:2254.4677625.)  The cached map service that did not display correctly at the largest scale had its largest scale set to 1:2254.467763 not 1:2254.4677625.  In order for the service to display correctly in the application at the largest scale, I had to replace the cache tiles tied to the incorrect scale (1:2254.467763) with cache tiles created at the correct scale (1:2254.4677625).  So how did I do this?

Most GIS Specialists familiar with creating AGS map service caches would automatically think the solution is to simply delete the old cache level using ArcCatalog and add the new one.  Unfortunately this doesn’t always work.  When I tried this method, I noticed that even though I entered the correct scale (1:2254.4677625), the scale was rounded off to the wrong scale (1:2254.467763) once I applied the changes.  The workaround I used to solve the problem involved editing the service’s configuration file using Notepad ++.  The steps I used are provided below:

1) Open Windows Explorer

2) Navigate to the location of the map service’s cache folder

3) Locate the map service’s cache XML configuration file

4) Open the configuration file with a text editor (e.g. Notepad ++)

5) Manually correct the appropriate scale and save the configuration file

6) Open ArcCatalog, refresh the map service, and re-create the cache tiles for the corrected scale

Hopefully you found this helpful, I also published a blog post a while back on Lessons Learned: Creating a KML-Enabled ArcGIS Server Map Service that might be of use!


CGIS launches an exciting new way to view shallow water habitat data

January 5, 2010
Steven

Steve

The Khaled Bin Sultan Living Oceans Foundation is a private organization dedicated to conserving and protecting coral reefs. In 2006, CGIS began working with the Foundation to develop a Web mapping application intended to disseminate data resulting from the Foundation’s research of the United States Virgin Islands. We utilized a template built from ESRI’s ArcIMS to develop the viewer. In 2009 the Foundation asked CGIS to provide a similar service to host research data for the Seychelles Islands, an Island nation off the coast of eastern Africa. We were eager to develop a new viewer using ArcGIS Server—ESRI’s latest Web mapping technology—and one of the new programming APIs (application programming interface) for Adobe Flex. The viewer recently went into production and is now publicly available. The Foundation is so pleased with the final product that we have been asked to update the United States Virgin Islands viewer with the new technology. The update will be publicly available soon.

Our video presents a brief introduction to the Living Oceans Foundation and a demo of the viewer’s capabilities.


Lessons Learned: Creating a KML-Enabled ArcGIS Server Map Service

September 8, 2009

Many GIS Specialists who create ArcGIS Server (AGS) map services know that you have the ability to enable KML capabilities when publishing an AGS map service from an MXD or MSD.  A KML-enabled map service can be viewed in Google Earth.

So, when I was assigned a straightforward task: prove that an AGS map service and any attribute information associated with the map service’s features can be viewed in Google Earth, I immediately thought it would be a cinch.  I already had a KML- enabled map service, so I assumed all I had to do was:

  1. klm2find the map service’s KML URL in the service’s capabilities tab under service properties using ArcCatalog
  2. add this KML URL to Google Earth as a network link.

Unfortunately, following this process provided me with a blank map service in Google Earth.  I knew I must be missing a step in creating a KML map service using AGS.  After doing plenty of research, I discovered that when enabling the KML capability when publishing the map service the map service’s KMZ file is not automatically created on the ArcGIS server where the map service is located—-

klm1Aha Moment, This is why I didn’t see a map when I added the map service’s KML URL in Google Earth as a network link.  In order to actually create the necessary map service KMZ file and its associated URL (called a KML Network Link), one must log into the ArcGIS server where the map service resides using ArcGIS Server Manager and follow the steps outlined under the “How to create a new KML network link from a map service.” After following these steps, one can copy the map service’s newly generated KML URL and add it as a network link in Google Earth.

Now, I was able to view a dynamic AGS map service and any attribute information associated with the map service’s features in Google Earth.  However, it’s important to note that I was working with a dynamic AGS map service, not a cached AGS map service.  Cached KML AGS map services may display and function differently than dynamic KML AGS map services in Google Earth.  I have not had a chance to investigate the advantages / limitations / capabilities of a cached KML AGS map service in Google Earth, but perhaps this will be my next blog topic.   In the mean time check out how the Center for GIS is using these technologies to create solutions for our clients!


Follow

Get every new post delivered to your Inbox.