At this year’s developer summit, the Lab presented a session entitled “Latest Innovations from Esri’s Prototype Lab”. This sessions consisted of a brief introduction to 23 of our most recent apps/demos/prototypes in less that 60 minutes. As of today, this session is available for download or as a streaming video. Click here for details.
The Lab is pleased to announce the release of Raster Shader, a new addin for ArcMap 10.1! Raster Shader is a tool for creating full-color, relief-shaded visualizations of single-band raster datasets. Similar to the Image Analysis Window, Raster Shader leverages the power of raster functions to process the data dynamically as it is displayed in the map. Since the processing occurs entirely in memory, it is extremely fast and does not affect the source datasets.
The idea for this tool came from projects we’ve done over the last couple of years involving large collections of single-band raster datasets containing climate data such as temperature averages and precipitation totals over time. Our standard approach for visualizing these datasets is to use chained raster functions to apply a combination stretch/colormap renderer. However, building and configuring raster function chains which produce an attractive and meaningful visual result can be a challenge if you are not familiar with the concepts and techniques involved. This is where Raster Shader can help. Not only does it build the raster function chain for you. It also provides a simple interactive UI for adjusting key rendering parameters so you can see the results immediately in the map layer. An interesting feature of Raster Shader is a histogram which shows how the colors in the colormap relate to the distribution of values in the data. This relationship is based on stretch parameters which you can adjust with slider bars and/or text boxes. Optionally, if the map contains a layer based on a DEM, you can add topographic context to the data with a hillshade effect and easily adjust parameters such as sun azimuth and sun angle.
Click here for the addin.
This project was brought to life to bring attention to Mexico’s world-class attractions and friendly people. What started off as a “story map” soon become a “story atlas” as the author continued to add more and more content. The author is publishing the atlas to educate and encourage future travelers to Mexico. You can view this atlas as any one of the following:
Whether you are interested in outstanding pre-Hispanic historical landmarks, love to explore fascinating caves, research vibrant Mexican indigenous cultures, or are just a casual traveler who feels like tasting tequila or margarita, the Traveler’s Atlas of Mexico might help you to learn more about the country and its tourist attractions, as well as plan your itinerary. This atlas might come in handy while you are already there or before you next visit looking for worthwhile attractions. The atlas consists of over 30 thematic maps depicting Mexico’s geography, population, and primarily, tourist attractions. The majority of the attractions are precisely located allowing you to explorer these locations at both small and large scales.
Other than indicating where there is the highest density of “must see” attractions, the atlas’s maps show where extra caution should be exercised. Crime analysis represented by the most severe crime of murder is also presented. The analysis concludes that even though Mexico is not crime free, there are states with murder rates comparable to the safest European countries.
Hope you enjoyed the atlas as much as I enjoyed creating it and hope that you are inspired to visit this amazing nation.
Please note that the first presentation link above displays map popups incorrectly. This is known issue that will be corrected in the coming weeks. In the meantime please use the second presentation link to view detailed descriptions and photographs of Mexico’s attractions.
Contributed by Witold F.
Leap motion is a hand and finger sensing peripheral for Macs and PCs. This video demonstrates the integration of the Leap Motion Controller with the ArcGIS Desktop application called ArcGlobe. The controller is used as a virtual 3d mouse for navigating in the three dimensions.
To download the source code, click here.
The controller is surprisingly accurate, it is able to measure hand and finger displacement with millimeter accuracy at a rate of up to 120 updates per second. Because this flying tool did not require any precision sketching we used the hand position and orientation information exclusively. At approximately 30 times a second, the tool retrieves the spatial and angular displacement of the hand from the original starting position. These differentials are used to update the observer’s location and orientation in ArcGlobe.
One of the complexities that needed to be overcome is how to present a consistent navigational experience when the controller is communicating at a rate of 60-120 times a second and ArcGlobe is refreshing anywhere between 15 to 60 times a second.
The work presented here is based on an early developer unit from Leap Motion. Consumer units are scheduled to ship in May 2013. Please visit the Leap Motion website for more details.
The virtual city featured in the video is Philadelphia, PA. For more information about this data please click here.
Video filmed by Mark D.
With this app you can perform sub-second elevation analysis anywhere on the Earth surface, even along the sea floor! End users can display areas on the Earth surface that comply with any or all of three conditions (i.e. elevation, slope, or aspect). What may surprise you is that the end result displayed on your screen is coming from a single set of elevation data. The technology that makes this possible is raster function chaining.
About the Technology
Making raster and imagery data GIS-ready involves a number of pixel-transforming processes to the source data so they display in the correct location and convey meaningful information. ArcGIS 10.0 delivered a new and faster approach for processing raster and imagery data. Many of the tasks that had previously been accomplished with time-consuming pre-processing workflows could now be performed on-the-fly with a new class of objects known as raster functions. By chaining together multiple raster functions, a variety of processed products can be generated very quickly and streamed directly to the client application, eliminating the need to write the processed data to disk. The result is big savings in processing time and data storage requirements. ArcGIS 10.1 brought further advancements to on-the-fly raster processing, including the ability to implement custom raster function chains on the server and to expose their parameters via REST. This has opened up an entirely new range of possibilities for developers to build dynamic web-based applications to perform rapid ad-hoc image and raster analysis.
About the App
The front end of the application was built with the ArcGIS API for Flex. The user interface allows the user to specify which of the three range filters to apply in the analysis. The back end of the application consists of an image service of elevation data published with ArcGIS Server. The service implements a collection of raster function chains which are exposed from the service’s REST endpoint as custom server functions. The functions analyze the elevation data on-the-fly and deliver the pixels to the client application as single-color RGB output. Considering the nearly infinite combinations of elevation, slope and aspect ranges one might want to support in an application like this, imagine for a moment what it would be like to have to pre-generate all those outputs and manage them as static datasets on disk. The only feasible way to implement an application like this is with dynamic rather than static pre-generated output.
Click on the screenshot at the top of this post to check it out. We named the application “Avalanche!” because one potential use of this type analysis could be to help identify areas of high avalanche risk. Please keep in mind that this application is running on one of the Lab’s sample servers and is not designed for scalability or high-availability. Even so, I think you will be impressed with its responsiveness once the server has loaded the elevation data for an area into memory. I suggest zooming into Mount. St Helens since we have included higher resolution elevation data for that area.
Motion Mapper is an application built using Esri’s ArcGIS Runtime for WPF and Microsoft’s Kinect for Windows SDK. The application uses Kinect’s audio and motion recognition to interact with the map and exploit Landsat satellite imagery without the use of a keyboard or mouse.
The source code is available here.
The video embedded in this post shows a person gesturing and speaking to a desktop mapping application. The text within the black banner represents voice commands available to the user. Below is a detailed description of the operations being performed by the operator in the video (spoken commands in bold):
- The user activates the pan tool and navigates from the Middle East to Europe by pointing in the intended direction of travel,
- The user activates the zoom tool and moves his hands away from the screen to zoom out.
Pointing directly at the screen with either (or both) hands will zoom in.
- The user displays the bookmark menu and then zooms to the Dubai preset extent.
- The user activates the swipe tool and selects the year 2005. As his hands move across the screen, Landsat imagery from 2005 clearly shows the impressive Palm Jebel Ali and Palm Jumeira archipelagos.
- Then the user selects 2000 to reveal that these engineering marvels did not exist five years earlier!
- The user zooms out to a smaller scale and activates the Landsat tool that commences a download of all individual Landsat scenes that overlap the map display. Details about each image appear in the upper left hand corner of the screen whenever his hand hovers over an image. Information boxes are colored blue and yellow to represent images selected with the left and right hands respectively.
- The rotate tool is activated so that the map can be pivoted in three dimensions revealing the chronological order of imagery. Older imagery is located at the bottom close to the map and newer imagery is located near the top.
- Lastly, the user places his hand over a single image and says open to view the image at full resolution. The image is traversed using the same panning technique described in (1) above.
Just over a year ago we published an add-in for ArcGlobe that allowed a user to navigate in three dimensions using hand gestures. When observing other people using this app we quickly realized that the hand and arm rules were too complicated and clearly not as intuitive as they could be. Based on these observations and recommendations from Microsoft we researched alternative techniques of Kinect integration.
Inspired by Netflix and other apps for the Xbox 360 gaming console we decided that speech was the key to compartmentalizing mapping tools. Rather than using complicated gestures to differentiate between mapping operations we choose to use speech to switch between panning, zooming and other tools. Overall this meant that hand gesturing could be much simpler but at the cost of a slightly more time consuming experience.
The Kinect sensor features a directional four microphone audio array, ideal for noise cancellation. Within our offices, speech recognition works very well but we have yet to test its proficiency in a noisy environment such as an exhibition hall at a large a conference.
The stacked temporal view of Landsat Imagery is achieved using WPF’s Viewport3D and Esri’s Map hosted in a Viewport2DVisual3D visual. This works well with no significant performance degradation but coding in three dimensional space is considerably more difficult than 2D! One must define texture coordinates, vertex mapping and odd things like ambient lighting. Something that needs additional work is better management of 2D scaling of the map in the 3D viewport.
In summary, developing Kinect-based apps is both challenging and rewarding. Challenging because Microsoft technology does not natively support “motion”. Developers must interpret and present raw video, depth and skeleton feeds for themselves. A developer’s job would be a lot easier if Microsoft extended the Kinect SDK to support fundamental gestures like “swipe left” and include fingers in the skeleton model. It is unlikely our trusted keyboard and mouse will be redundant anytime soon but it is very rewarding to experiment with technology that may augment our lives in the near future.
Two years ago, almost to the day, we published an add-in for ArcMap that could painlessly and effortlessly register your GIS services with arcgis.com. Click here to read the original blog posting.
Unfortunately an issue with ArcMap’s drag and drop framework broke the add-in at 10.1. Today we released an update to address this issue. Previously servers were added by dropping a server connection from the Catalog window. In this release connections are added via a standard add data-like dialog as shown below.
Click here for the add-in.
Click here for the source code.
Inspired by the hypnotically simple but elegant wind map we challenged ourselves with building a conceptually similar app based on USGS stream gauge data.
Click here to access the live application.
Click here to download the source code.
The hydrographic network used and shown lightly in the background is derived from the World Hydro Reference Overlay. To improve display performance the dataset was thinned of minor rivers and generalized. To assist with client-side animation, rivers were dissolved to multi-part polylines using river names as the aggregate.
Stream gauge locations and flow data for the month of June 2012 were downloaded from the USGS. Considerable manual editing was required to when gauges to stream associations were not obvious or ambiguous. Once associated, stream flow volumes were distributed along the hydrographic network. Of the 9,000+ USGS stream gauges, only 2,000 were used.
The hydrographic network and the flow data were published to an ArcGIS Server as map services.
The client application consists of a Silverlight based web app. Silverlight was chosen merely because of the availability of technical expertise. The animating “flares” consist of a collection of paths on a canvas overlay. Each path is geometrically described by a quadratic bezier curve with control points that animate over time. For performance reasons we chose to display and animate these flares independent of the map, that is, not map graphics. Flares and the associated animations are recreated every time the map is panned or zoomed.
This app displays average daily flow for the month of June 2012. Our intention in a future release is to show average daily flow every week or month.
Contributed by Witold F. and Richie C.
Inspired by decorative inlaid stone globes we tasked ourselves with reproducing this cartographic style in a web application. This post discusses the product of our experimentation and the techniques used. Please note that the assignment of textures to countries is completely random and does not imply any mean whatsoever.
Click here to view the live app.
Click here to download the source code.
The first step was to look for a suitable map service containing country boundaries and, most importantly, a color map field for non-contiguous shading. Fortunately we were able to reuse a map service created originally for the animated cartogram sample. Data for this map service is derived from the Esri data and maps dvd. Incidently, this app is using the iconic and somewhat unusual Goode homolosine map projection.
For textures were harvested content from deviantART, an online repository of digital artwork. We collected eight textured images for three themes: wood, metal and clothing. Please click the about this app button in the application to display content attribution.
The presentation of textured countries simply required a UniqueValueRenderer with a PictureFillSymbol for each color map value. However, rather than using the standard PictureFillSymbol we used a custom fill symbol so that we could introduce custom behavior whenever the user moved his or her mouse over a country. On mouse-over, a country will shift slightly to the south east, enlarge and display a white halo. This gives the impression that the country is lifting out of place.
One known issue with this application is that an out of memory exception is occasionally thrown at large scales. After a little experimentation it appears that the occurrence of this exception can be reduced if the white halo is removed from the custom symbol. The white halo is achieved by applying a blur effect to cloned geometry.
Unlike WPF, Silverlight does not support image brush tiling. This meant that textures could only be stretched to the geometric extent of each countries. For geographically large countries this resulted in blurry textures at normal scales.
Lastly, we experimented with hardware accelerated graphics but there was no perceivable performance improvement. In summary, the use of images for polygon fills can produce very attractive maps however the omission of image brush tiling in Silverlight can result in less appealing maps at large scales.
This blog post was written by Brad Simantel, a summer intern in the Applications Prototype Lab.
Flow maps are used to show the movement of goods or people from one place to another. These maps use lines to symbolize the movement, often varied in width to represent the quantity of the flow, and fall into one of three categories: radial, network, and distributive. Radial flow maps are used to show relationships between one source and many destinations. If there are more than a handful of destinations and you still want to show the the quantity of flow, however, the lines overlap too much to discern individual values. Network flow maps are used to show the quantity of flow over some existing network — transportation and communication networks being the most common. Distributive flow maps are similar to radial flow maps, but rather than having individual lines from the source to each destination, lines are joined together, only forking once they get close to their destinations.
A distributive flow map made by Charles Joseph Minard showing coal exports from England in 1864.
Unfortunately, there are no built-in tools in ArcGIS to generate distributive flow maps — the only way to make one with the software currently is to draw and attribute it by hand. So I wrote my own.
How it Works
First, the tool takes source and destination features and converts them to points, if they’re not already. It then generates a grid using the Create Fishnet tool, which will ultimately give the finished flow lines some structure, and converts that grid to points. Next, it creates three Euclidean distance rasters — one based on distance from the source, one based on the destinations, and one based on the grid centroids — and divides them into an equal number of slices, depending on the settings when you run the tool. These three rasters are then added together, creating a surface that can be used to determine least-cost paths from the source to the destinations. After that, it runs the Flow Accumulation tool to determine the quantity of goods or people upstream of any given pixel, and then converts the output to vector lines (which now have the quantity of upstream goods or people as an attribute).
Here’s the output of the tool when run using the data from Minard’s coal export map, seen above:
This is without any finessing – just the raw output of the tool. See below for information about how this raw output can be improved.
Here’s another example, showing migration from California in 2010:
Again, this is the raw output.
Generating Flow Maps
If you’d like to generate some flow maps yourself, you can download my tool here. Once you’ve downloaded it, the first step before running the tool is making sure your data is suitable. You’ll need:
- A source feature class containing one single feature.
- A destination feature class containing all destinations and a Z-value attribute (any features with a Z-value of null or zero will be discarded). Basically anything you could use to make a choropleth or graduated symbol map you can use to make a flow map.
- Optionally, a feature class which you would like the lines to avoid. An impassable feature class, if you will.
- Lastly, you’ll need all your data to be projected, ideally in the same projection as your data frame.
If you don’t have any data of your own but want to follow along, you can download the Minard-based dataset seen above here.
To run the tool, open ArcMap and find the FlowMapGenerator Python toolbox you’ve just downloaded using the catalog window, then double-click it to run the FlowMapGenerator tool. You should see this:
Let’s go through these fields one by one.
- Source Feature Class: This is the source of your flow, and must be a feature class containing only one feature. In the Minard example, that would be England.
- Destination Feature Class: These are the destinations of your flow. The features in this feature class also have to have a quantity attribute that will ultimately be inherited by the line leading to it.
- Z-Value: This is the quantity attribute I was referring to, and will be used to symbolize the magnitude of flow to a given destination.
- Impassable Feature Class: An optional feature class which allows you to influence how the flow lines are drawn. Whichever feature class you select will be treated as nearly impassable (the lines will cross the features in this feature class only when there are no other options). In the Minard example, I used a land feature class for this field.
- Processing Extent: For raster analysis you have to choose a processing extent. I recommend using the Same as Display option and setting your extent visually.
- Cell Size: This is also for raster analysis purposes. On a global scale, I’d recommend something in the ten to twenty kilometer range.
- Source Weight: This field lets you choose how much influence you’d like the distance from source to have over your flow lines. The bigger the number, the more likely your lines are to beeline for the source.
- Destination Weight: Same as Source Weight, but for destinations. If you want your lines to prefer going through or near your destinations, increase this number.
- Grid Weight: Again, the same. If you want your lines to clump together for longer before fanning out, use a higher number here.
- Grid Size: This field determines the size of the grid. If you use a larger grid, your lines are more likely to clump together (rather than fanning out and all heading in the same direction). The grid will be your cell size multiplied by this number.
- Output Feature Class: Choose the name and location of your output polyline feature class.
Finessing and Symbolization
Once you’ve run the tool, you’ll be left with a fairly inorganic-looking flow map. If you like that look, congratulations! You’re done! If you want to smooth out some of those rough edges, though, we can run the Smooth Line tool. For the Minard map below, I ran it with a tolerance of 1,000 kilometers. Smoothing isn’t enough, though — there are still too many straight lines. Unfortunately, the only way to fix that is by hand. At least you didn’t have to draw and attribute everything manually, though! Here’s my final result after a little bit of finessing:
This is symbolized using graduated symbols with ten classes ranging in width from 0.5 pts to 7 pts. I’d prefer to use proportional symbols so you could see the the actual values, but then the source overwhelms the map.
Assuming you’ve been following along, congratulations! You just saved yourself hours of manually drawing and attributing lines. If you have any questions, leave a comment below.
After downloading and unzipping the sample you should see the following in the ArcMap catalog window.
Expanding python toolbox will reveal one script tool as shown below:
By default, python toolboxes do not display the “pyt” file extension. To display this and other known extensions in ArcCatalog (or the catalog window in ArcMap) check the following:
This dialog is accessible in ArcCatalog by clicking Customize > ArcCatalog Options. Unchecking the highlighted option will show the following: