Tag Archives: Rasters
There’s a wide variety of tools (some new with the build 1500 release) and properties available for you to adjust and enhance raster files and image services you use in ArcGIS Explorer Desktop. Here’s an overview of the tools and properties available, and how you might use them.
Local raster files
To add a local raster file click Add Data, then chose Raster Data as shown below:
ArcGIS Explorer supports the display of many different raster formats, including: IMG, BMP, JPEG, PNG,TIF, MrSID, and many more. You can find a full list of supported image formats in the help.
Once you’ve added a raster it will appear in your contents. This one we’ve chosen is an RGB file and has a black area of “no data” around it.
We can remove the unwanted black area by setting the RGB transparency value for the image. Specify the value, then check the box to set that value transparent. Note that all pixels with your specified RGB value will become transparent.
Here’s the image after setting the transparent value to RGB 0 0 0:
With the raster layer selected in your contents, you can click the Tools tab where you will find the Transparency, Enhance, and Swipe tools in the Effects group:
Enhance was newly added with the release of build 1500, and can be used to adjust gamma, contrast, and brightness.
You’ll find more details in the control layer appearance help topic.
Image services are new with ArcGIS Server 10, and provide access to raster (and image) data through a Web service. The source of the raster data can be a raster dataset from a geodatabase, a file on disk, a mosaic dataset, or a layer file referencing a raster dataset or mosaic dataset. Publishing a mosaic dataset as an image service requires the ArcGIS Server Image Extension. Once you publish the raster data to your server, you can use the resulting image service in ArcGIS Explorer Desktop the same way you would add any other GIS service layer.
When you connect to a GIS server that publishes image services, you’ll see them shown with a unique image service icon like that shown below for the Davidson_County image service:
The same Effects tools described for local rasters above apply to image services.
You can set other image service properties by selecting the image service layer in contents, right-click to view the layer properties, and then choose the Image Service category as shown below:
Image service properties can be used to interact with the server, allowing you to specify a variety of image properties and options. The properties do not change the image on the server, but rather control how it is sent from the server and subsquently how it is displayed in ArcGIS Explorer.
Transmission compression allows you to change the image compression – more compressed image services will be quicker to display, but will affect image quality. There are more options for resampling and mosaic method, all discussed in detail in the specify properties for an image service help topic.
Server object extensions (SOEs) are a way that you can extend ArcGIS Server to run your own ArcObjects business logic. The nice thing about SOEs are that they are not application-specific; you can write one SOE and attach it to multiple services. You can also expose your SOE as a SOAP or REST Web service, a topic on which we’re preparing some future posts.
In today’s post, we’ll explain how to work with optimized map services when you’re writing an SOE. By “optimized map services”, we mean ArcGIS Server map services that are based on map service definitions (.msd files). This is the type of service that you get when you work with the Map Service Publishing toolbar in ArcMap. Optimized map services use a faster drawing engine than the traditional, MXD-based map services, so there are benefits to writing your SOE to support them.
Because optimized map service use a completely different drawing engine and source file than MXD-based services, they draw very quickly. However, this also means that they do not support full ArcObjects access from the Carto library. When working with optimized map services, you cannot use any ArcObjects directly related to the map document, such as IMapServerObjects, IMap, ILayer, and IFeatureLayer.
It turns out you can still do quite a few things when you use an optimized map service with your SOE. This post explains what objects are available, and how options have increased with ArcGIS 10.
What you can do
The Carto library contains a MapServer class that represents the map service. There are a number of supporting classes and interfaces surrounding MapServer that give you information such as the layer names, whether the service has a cache or not, and how queries should be performed with the service.
On page 6 of the .NET Carto object model diagram, you can see these classes and interfaces. You can use them with any type of map service, whether the source map is an MSD or an MXD. Avoid using other classes in the Carto library with optimized map services.
Getting to the source data at ArcGIS 10
At ArcGIS Server 10.0, the MapServer class implements a new interface IMapServerDataAccess, which allows you to access the data sources of the layers in your map. Using the GetDataSource method on this interface, you can access the IFeatureClass, IRaster, or ITable interface of the underlying data.
The typical pattern is to use the MapServer-related classes and interfaces to discover the layer names and indices in your map service; then use IMapServerDataAccess to get to the data beneath. Once you obtain the source data, you can do many things with it using ArcObjects, such as opening feature cursors or topological operators. You’re safe as long as you avoid the above-mentioned MXD-specific classes from the Carto library.
Here’s an example that gets the source feature class for a map layer named “States”.
string mapLayerToFind = "States";
//Access the map service and its layer infos
ESRI.ArcGIS.Carto.IMapServer3 mapServer = (ESRI.ArcGIS.Carto.IMapServer3)serverObjectHelper.ServerObject;
string mapName = mapServer.DefaultMapName;
IMapLayerInfos layerInfos = mapServer.GetServerInfo(mapName).MapLayerInfos;
// Find the index of the layer of interest
int c = layerInfos.Count;
int layerIndex = 0;
for (int i = 0; i < c; i++)
layerInfo = layerInfos.get_Element(i);
if (layerInfo.Name == mapLayerToFind)
layerIndex = i;
// Access the source feature class
IMapServerDataAccess dataAccess = (IMapServerDataAccess)mapServer;
IFeatureClass fc = (IFeatureClass)dataAccess.GetDataSource(mapName, layerIndex);
The above code gets all the layer information for the map service. IMapLayerInfos and IMapLayerInfo are legal to use because they do not require access to a map document; they just help you get information that the service exposes.
The code then iterates through the layer infos until it finds the index of the layer named “States”. That index is then passed into IMapServerDataAccess.GetDataSource(). At this point you’ve reached your goal of accessing the source data interface IFeatureClass.
For brevity, the above example contains no error handling; but you might want to add a check that IMapLayerInfo.Type is equal to “Feature Layer” before you go casting the result to IFeatureClass.
Registering SOEs that support optimized map services
When you register the SOE, you must also set a property defining that the SOE supports optimized map services. This property is called SupportsMSD and it is a Boolean. You have to set it to True in order for your SOE to show up in the list when you publish an optimized map service.
If you’re following the .NET SOE samples out of the SDK, you’re probably registering your SOE using a console application that calls IServerObjectAdmin2.AddExtensionType(). In this application, you set the properties of your server object extension. Here’s an example of how you’d set up the properties to support optimized map services:
IServerObjectExtensionType3 serverObjectExtensionType =
// Set properties for the SOE
serverObjectExtensionType.CLSID = "MySOE.MySOE";
. . .
// Register the SOE with the server
Notice the call to IServerObjectExtensionType3.Info.SetProperty() that sets the SupportsMSD property.
If you’re developing a Java SOE, the SupportsMSD property is not set at registration time. Instead, you set it directly in the SOE source code using Java annotations. When you later register the SOE, the property is forwarded to ArcGIS Server.
In summary, when using optimized map services with SOEs, you can do quite a bit if you stick to the MapServer-related classes. Also, with ArcGIS 10, you can use IMapServerDataAccess to access the source data for the layers in your map. From there you can do many things to work with the data directly.
Contributed by Sterling Quinn of the ArcGIS Server software development team
One of the most common questions we receive about Web map design is how to display imagery base layers. Specifically, is it better to use an image service, or a cached map service containing the imagery?
As with most Web map design questions, the answer is: “It depends on the purpose of your application”. In general, if the purpose of the imagery is only for visualization on the Web, putting the imagery in a cached map service is the most responsive and scalable solution. Other factors to consider include the required functionality, and maintainability of the application.
First, let’s address the responsiveness, or speed, of the imagery. Under any circumstance, it’s pretty hard to beat the responsiveness of a cached map service. In a head-to-head footrace to produce one view of the map, an image service may get close. This is especially true when using low-bandwidth Internet connections, because the cached tiles consist of multiple files whose imagery payload inevitably extends beyond the boundary of the screen. An image service, on the other hand, produces one image whose extent matches that of the current map view.
Cached services really hold the speed advantage when panning, largely due to browser caching. If a tile or a portion of a tile has already been fetched, it doesn’t have to be requested again from the server. An image service, in contrast, makes a new request on every pan.
No matter how fast an image service can produce an image, ArcGIS Server (specifically, the Server Object Container) still has to do work to make it happen. The cached map service, on the other hand, does virtually no work on ArcGIS Server. After you make an initial “handshake” with ArcGIS Server to determine whether a cache is available, the Web server just hands you the tiles you want. This is decidedly more scalable than an image service once your application reaches a particular threshold of users. That threshold depends on the processing power of your server and the pattern of requests.
The aforementioned browser caching also reduces the work of your Web server and contributes to the superior scalability of cached services.
An advantage of image services is that they are decidedly more functional than cached map services. When working with an image service, you can request a custom projection, image format, resampling technique, band combination, and so on. If your application requires one of these things, an image service may be a better choice.
Image services also let you specify a compression value that can be helpful over low bandwidth networks. You can set a very high compression for quick navigation; then, when you reach the imagery you want, you can reduce the compression to get a better quality image.
You can perform simple queries on either an image service or a cached map service. Queries are possible with cached services because the cache acts as a visualization mechanism only. The administrator can leave the back-end data on the server if end users will need to issue queries to the map service.
For all its performance benefits, caching comes with some overhead. You need time and server power to create the tiles, and hardware to store them. You also need to perform cache updates at some interval to prevent your imagery from becoming stale. If your application offers imagery for a vast area at large scales, you may decide that the excessive work required to build and maintain the cache outweighs the performance benefit.
If you find yourself in this situation, you should ideally perform load testing to understand if the performance of the image service is suitable for your purposes. If the image service is not going to work, you may consider only caching strategic places (such as urban areas) at the largest scales, and displaying uncached areas with a “Data not available” tile. This is the approach used by Bing Maps, Google Maps, and many other Web mapping services that offer large amounts of imagery.
Another option for filling uncached areas is to create tiles on demand. Beware that this requires you to keep the source imagery on the server, and it can introduce scalability issues if you have not sufficiently pre-cached the most popular areas of your map.
In summary, if the purpose of your imagery is only for visualization as a base layer and you expect moderate to high amounts of traffic on your site, you should attempt to use a cached map service for the imagery. If you want to expose analysis and manipulation of the imagery and you don’t feel that your server will be overwhelmed by concurrent requests, use an image service.
Contributed by Sterling Quinn of the ArcGIS Server development team
Many users of the Bentley MicroStation CAD platform have asked us how to connect to image or map data that is served from ArcGIS Server. ArcGIS Server can serve various formats easily consumable by non-ESRI clients. One of these popular formats, supported by MicroStation, is OGC WMS (Open Geospatial Consortium Web Map Service).
Support for WMS in MicroStation was added in version V8 XM (08.09.03) and updated in version V8 XM (08.09.04). In V8 XM, access to WMS services requires a manually-created xWMS file. In V8i (8.11), you can connect to WMS services using an updated interface within the Raster Manager. This post describes both techniques.
Connecting to a WMS in MicroStation V8 XM
To connect to a WMS using Raster Manager in V8 XM, you must create an xWMS file. An xWMS file is a simple XML file with the extension .xWMS, which contains some properties about the WMS.
The following values must be contained in the xWMS file:
- URL: The URL to the service.
- VERSION: The version of WMS supported. MicroStation only supports WMS version 1.1.1 at this time.
- SRS: The EPSG Code for the service’s spatial reference system.
- LAYERS: The layer name of the service.
- BBOX: The bounding box of the service in the aforementioned spatial reference system.
- WIDTH: Width of the service in pixels.
- HEIGHT: Height of the service in pixels.
- FORMAT: The image format in which the service is to be returned. Examples are image/jpeg or image/png
Most of the remaining values in the file can be left as defaults, but you can edit them as necessary. To identify appropriate values, you can use Get Capabilities on the WMS. For example:
Below is a sample xWMS file. You can copy this into a text editor and change the values to suit your own WMS. Note that the URL must be entered without the “http://” prefix. This is automatically added by MicroStation.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MINSIZE width="85" height="100" />
<MAXSIZE width="850000" height="100000" />
<MAXBITMAPSIZE width="1024" height="1024" />
Once you have the above file, follow these steps to add it in V8 XM using Raster Manager
- Open Raster Manager.
- Click File > Attach.
- Navigate to and select the xWMS file, then click Open.
- If necessary, click Fit To View to zoom to the extent of the service.
Connecting to a WMS in MicroStation V8i
Although you can also add xWMS files in MicroStation V8i, it’s easier to use the improved user interface for adding a WMS service interactively. Here’s how:
- Open Raster Manager.
- Create a new WMS connection by clicking File > New > WMS.
- Type in a URL, or click the Servers button and select a service from the server list.
- Select a layer from the Available Layers list and click Add to map.
- Click Save or Save and Attach to add it to the drawing.
Using a jpeg connection for improved performance
By default, the format for the WMS connection is image/png. However, it’s recommended that you make a jpeg connection to ArcGIS Server because the transfer rate is faster.
To change the connection properties in MicroStation V8 XM, modify the .xWMS file prior to attaching it within MicroStation. The XML node to change is:
In MicroStation V8i you can make the change before adding the WMS to the map. See the diagram below.
You can also access this dialog for an open connection. Follow these steps:
- Open the Raster Manager.
- Select the WMS connection to edit.
- Edit the WMS connection (From the Open menu, click Utilities, and click Edit WMS.)
- Change the Format to image/jpeg.
Contributed by Randall Rebello of ESRI
By Dr. A Jon Kimerling, Professor Emeritus, Oregon State University
If you have used any raster data to make maps you may have at one time or another asked yourself, “What is the appropriate resolution of raster data for the map I am making?” This question is tied closely to a basic principle of map compilation that you may have learned in your beginning cartography course: “Always compile your map from source materials of the same or larger map scales”. In our age of digital elevation models and other raster datasets, this basic principle of map compilation can be restated as: “Always create your raster map from data at the same or higher spatial resolution than the ground resolution of your map display grid cells”. The ground resolution of your map display grid cells will depend on the scale of your map. Continue reading
The TextSymbol class has several properties that you can use to fine-tune the position and content of the text element such as angle, offset, font, and kerning (spacing between the letters).
Use the TextSymbol.setFont() method to specify a font for the text. You can use the Font class to set properties like text size, style and weight.
Creating a text graphic
Let’s look at a code snippet that uses several of the Font and TextSymbol properties to create a new TextSymbol and add it to our map as a text graphic. This graphic will denote an unexplored area on our map using an old cartographic phrase “Here be dragons”. First, we’ll create the Font object and specify the font weight and size.
var font = new esri.symbol.Font();
Now we need to create a new TextSymbol and specify that it should be maroon, set at a 15-degree angle and be aligned to the start of our input point.Next, we use the setFont() method to assign the font we just created to the TextSymbol. Finally, we create a new graphic, assign it the newly created TextSymbol, then add the graphic to the map.
var textSymbol = new esri.symbol.TextSymbol("Here be dragons");
textSymbol.setColor( new dojo.Color([128, 0, 0]));
var pt= new esri.geometry.Point(x,y,map.spatialReference)
var gra = new esri.Graphic(pt,textSymbol);
Simplifying the code
The code above is written in a verbose style to make it easier to examine the values we set for the TextSymbol and Font properties. We can reduce the length of the code snippet by using object constructors and chaining method calls. Let’s explore this approach a bit:
- First, use map.graphics to get access to the map’s default graphics layer.
- The GraphicsLayer has an add method that takes a Graphic object as a parameter, we’ll create a new graphic within the method call using the Graphic constructor.
- Graphics consist of geometry, symbol, attributes and an infoTemplate. In our example, we don’t need attributes or an infoTemplate so we’ll use the Graphic constructor and provide only a geometry (Point) and symbol (TextSymbol)
new esri.geometry.Point(x,y, map.spatialReference),
new esri.symbol.TextSymbol("Here be dragons").setColor(
One caveat to this approach is that it can make the code more difficult to read; however, with a bit of practice it becomes second nature.
- Click here to see a live sample that generates text graphics
- To label polygon graphics, use the GeometryService.labelPoints() method to generate a point inside the polygon. You can then designamte this point as the label position. View the Create points for labeling sample for details on how to use this method.
- Some text information may be better suited to display in an info window. The Show an info window sample shows how to display text in an info window at a specific location
There are several browser-specific issues to be aware of when working with fonts and text symbols. These issues are well documented in the dojox.gfx documentation. Some of the more common issues are:
- The font family property does not work in Internet Explorer 7; Arial is always used.
- Several browsers including Internet Explorer 7, Firefox and Opera 9 do not support the rotated and decoration properties for text symbols.
The 9.3.1 ArcGIS Server Web ADF for .NET introduces an extensibility point to the Print Task that allows you to customize the look of your printouts using template files on the Web server.
A new property called LayoutTemplateFile is introduced to define the template file. This property can point to any file on disk but must be accessible via a web URL. The file may be part of the same application or can reside in a separate application (for example, the aspnet_client folder).
In Visual Studio, select the PrintTask control and you’ll see the new property. Clicking the Browse button allows you to browse to the custom template file.
How do you create a simple custom template?
An easy way to create a template is to modify the ADF’s default template.
- Within Visual Studio, right-click your project and choose “Add New Item…” from the menu. When the dialog appears, choose “HTML Page” and give it a suitable name. This will create an HTML document which you can use as the template.
- Open the default template file which is typically installed in the ADF runtime folder (Example: C:Inetpubwwwrootaspnet_clientESRIWebADFPrintTaskLayoutTemplatesdefault.htm). This file defines the default appearance and layout of the Print Task output window.
- Overwrite the markup of the new page with the contents from default.htm.
- Modify the markup and CSS to obtain the output you desire.
What can you do with these custom templates?
Using custom templates, you can:
Control the layout of elements and their styles
In the template file, you can define the position and dimensions of the different elements on the page such as the map title, map image, and legend information. You can style the template page using inline CSS or an externally linked style sheet.
Inject dynamic content
The template file is not restricted to static HTML files but can reference resources which generate dynamic content (such as .aspx files or .ashx files). For example, the current time stamp could be included in the print output using a dynamic page.
Control the display of results
You can control the styling of task results through CSS and you may also choose to render the result entirely, forgoing the default generated table view. If you want to get more advanced, you might add an image generated using the Google Chart API or a report section rendered using a browser plugin like Silverlight.
The SDK sample Common Print Task demonstrates the above capabilities where a chart is drawn dynamically using the Google Chart API
Contributed by Nikhil Shampur of the ArcGIS Server .NET software development team.
We’ve just published a new paper that discusses strategies for creating a dynamic map service that supports heavy user loads. The paper is the latest release in the ArcGIS Server in Practice Series, which describes how to optimally configure ArcGIS Server to address selected workflows. In this case, we took the challenge of developing a map service that can generate over 250,000 maps an hour dynamically. The map service also supports on-the-fly projection, is multiscale, and enables feature filtering.
The paper also gives several tips for optimizing the map service and explores strategies for scaling out deployments of ArcGIS Server. You can access it here: High-Capacity Map Services: A Use Case with CORINE Land-Cover Data
Additionally, we wanted to mention that the 9.3.1 ArcGIS Server Functionality Matrix has been updated. The functionality matrix describes the characteristics of each ArcGIS Server edition and is a high-level guide to selecting the edition that best meets your needs.
Contributed by Ismael Chivite and Derek Law, ESRI Product Management
Special Interest Group
Tuesday, July 14th, 12 – 1 PM, Room 28A
Come to meet the development team and hear Kevin Hoyt, Adobe platform evangelist talk about the Adobe Flex framework. Kevin will provide sneak peeks in to the upcoming Flex 4 functionality. Royce Simpson, GIS Analyst for the City of Greely will also share his experience in working with the ArcGIS API for Flex.
The demo theaters are 45-minute presentations on specialized topics, offered in a smaller setting than the technical workshops. These Flex-related demo theaters are offered at the ArcGIS Server showcase in Exhibit Hall C.
Designing Effective User Experiences for Flex Applications
Tuesday, July 14, 2 – 3 PM
This session will discuss some ways to effectively use tools and functionality in designing engaging applications. We will also discuss some common pitfalls in designing Web applications and ways to avoid them.
Styling your Flex components
Wednesday, July 15th, 3 – 4 PM
This session will show ways to create a unique look and feel in your Flex applications. We’ll discuss various ways to use styles and colors and also look at tools that will help in this regard.
Thursday, July 16th, 9 – 10 AM
The technical workshops take place in a larger group setting than the demo theaters. This year’s User Conference agenda offers the following ArcGIS API for Flex workshop:
Building Rich Internet Applications with the ArcGIS API for Flex
Wednesday, July 15th, 10:15 – 11:30 AM, Room 6E
Thursday, July 16th, 3:15 – 4:30 PM, Room 6C
This session will introduce you to the ArcGIS API for Flex and walk you through the experience of building a Web application with it. No prior knowledge of Flex is needed.
Monday, July 13th, 4:30 – 6:30 PM, Room 6A
New at this year’s conference are a series of “Lightning Talks”, which are five-minute presentations where users demonstrate their own inventive Web and mobile applications. We expect that various Flex-based applications will be showcased at the Lightning Talks, where you can meet and exchange ideas with their creators.
Special Interest Group
Thursday, July 16th 12-1PM
Describes how you can add interactivity to your Web applications with Dojo dijits. You’ll see how the presenters built this San Diego Neighborhoods example application that uses Dojo layouts, buttons, accordion containers, and charts.
Thursday July 16th 9 – 10 AM
Wednesday, July 15th 1:30-2:45PM, Room 6E
Thursday, July 16th 10:15-11:30AM, Room 6E
GIS Design Methods
Tuesday, July 14th 8:30 – 9:45 AM, Room 30B