Skip navigation
All Places > Applications Prototype Lab > Blog > 2017 > April

Landsat Lens 2

Posted by rcarmichael-esristaff Employee Apr 24, 2017

Landsat Lens

Landsat Lens is a touch and mouse friendly application for browsing past and present Landsat satellite imagery hosted by Esri.

Click here for the live app.

Click here for the source code.


Using a mouse, a lens can be moved around the map with a standard left mouse click and drag operation. Scrolling the mouse wheel will enlarge or decrease the size of a lens depending on the direction.


With a touch device like an iPad, a lens can moved with an intuitive press and drag. To resize, pinch or expand two or more fingers within a lens. Likewise, rotating a lens is achieved by twisting two or more fingers. Unlike with a mouse, touch screens allow the user to manipulate two or more lenses concurrently.


By default, the app starts with a lens dated 2017 located close to the Palm Jebel Ali in Dubai. To pick a preset location choose from one of the entries from the Bookmarks dropdown menu. Alternative you can pan or zoom to any area of interest.


For one of the preset locations, or your own area of interest, you may want to view changes over time. To do so, use the Windows dropdown menu to add a window showing 2002, 2005, 2010, 2015 or 2017 imagery. By swiping lenses over the basemap and one another you can easily see changes in vegetation, coastlines, rivers and human activity. Use the last option in the dropdown menu to removal all lenses from the map.


Known Issues:

  • Support for W3C's touch events is extremely varied across browsers and operating systems. However the author notes that the most consistent behavior has been with Chrome browsers.
  • The Esri hosted Landsat image services ms and ps currently contain imagery from the year 2000 til present. However the imagery is not uniformly distributed over time. Imagery prior to 2014 is fairly sparse. This will likely change over time.

Animation of building interaction sample

This developer sample demonstrates how to interact with a multi-level building in three dimensions using Esri's ArcGIS API for JavaScript version 4.3. With a simple click/tap and drag operation a building can be intuitively and smoothly repositioned on the Earth's surface. Note that each floor is a separate graphic but are treated as a single entity when manipulated.


Click here for the live application.

Click here for the source code.


It is important to note that the sample uses a few undocumented API calls to achieve this behavior. As such we caution against using these calls in a production environment as they are unsupported and will very likely change in the near future.


The code may seem overly or unnecessarily complicated, below is a summary of what the code does:

  • Building Construction
    For portability reasons, building floors are constructed from a set of hardcoded values. It is important to note that each floor is an individual graphic attributed with a building identifier. This identifier is used to group all adjacent floors for highlighting and spatial translation.
  • Dragging
    The code is using the SceneView's drag event to respond to the three phases of a pointer's drag operation, namely start, update and end. During the "start" phase, a hittest is performed to identify the building floor (if any) under the pointer. If a floor is found, adjacent floors are identified and highlighted. In the "update" phase, two undocumented methods SceneView._stage.pick and SceneView._computeMapPointFromIntersectionResult are used to tracking pointer displacement in real world coordinates. These methods return the map location directly beneath the pointer, ignoring features and graphics.
  • Disabling/Enabling Pointer Interaction
    When a building is dragged to a new location, it is necessary to disable map interaction so that map does not pan. To achieve this we used another undocumented method, SceneView.inputManager, to add and then restore handlers.
  • Moving
    At present, it is not possible to update the geometry of an existing graphic. In order to show a graphic moving it must be deleted and then re-added. This may seem somewhat cumbersome but the performance hit is negligible.
  • Throttling
    It is likely that the rate of the drag event is fired will exceed the display frame rate. If the display is performing at 60 frames per second (or better) then excessive drag events are ignored.


Once again I would like to stress that this is a developer sample specifically for version 4.3 of the Esri JavaScript API. It is very likely that some of the code used is this application will be either obsolete or redundant (or both) in future releases.


Special thanks to Johannes Schmid for his technical expertise!

Welcome to the Applications Prototype Lab’s new web demo page:


APL web demo landing page


Our new home page for web applications has an updated, fresh look that we hope is easier to navigate and explore. Discover demos by visually exploring the thumbnails and hovering over an item for more information or long-press on a touch screen device.


In the default Grid View, hover over a demo's name to get a short description. Hover over the thumbnail to view quick access linked to resources like a video, comments, source code, and other documentation. Click or tap the thumbnail to launch the application into a new tab.

Explanation of portal item links
Change to a List View with the icon in the upper right side of the page. In List View, resource information about the demo are shown next to the thumbnails. This is the view you can use to rate an application or share an application with social networking site or forward to a friend or colleague via email.


In both views, items can be filtered by a plain text search of an application's title, summary, or description or by one or more tags.  Clicking the "x" button will remove all filters. You can also sort filtered items by publication date, rating or author, by clicking the appropriate icons at the upper right hand corer of the view.


At present, there are more than 50 prototype applications for you to explore. Many of these applications have shared source code and accompanied demonstration videos. We encourage you to rate these apps, provide feedback and share socially. Esri employees and Esri distributors are also welcome! :-) You will be treated with access to a few extra applications that are either still in testing or have certain restrictions.


Enjoy and welcome again to the new Prototype Lab Portal.

This Spring we released a new version of the 3D Fences python tool box.  The new release works in both ArcGIS Pro and ArcMap. The 3D Fences Toolbox was introduced in November 2015 and originally ran only in ArcMap.  For detailed description of the toolbox and how it works please read Transforming 3D Data into Fences and Curtains with Geostatistical Tools,  ArcUser Winter 2016 article. 

This python toolbox now consists of two tools enabling the interpolation of point data in the Z (vertical) dimension.   The Parallel Fences tool creates equally spaced fences parallel to the X, Y or Z dimension. X and Y dimension fences will run East-West and North-South respectively in the Z dimension.   Z dimension fences will  be stacked in the standard XY "flat" (horizontal) planes at regular Z intervals.  The Feature-Based Fences tool creates vertical fences in the Z dimension along features in a polyline feature class and,  in Pro, it can also use Map Notes line layers as input.   The Map Notes line layers enable users to create ad hoc features along which fences will be interpolated.  An added benefit of using the toolbox within Pro is that it can be used with either a Scene or Map.  The primary output is a 3D point feature class, optionally time enabled.

The original toolbox also contained a third Interactive Fence tool that only works in ArcMap.  This tool is not needed in Pro because use of Map Notes features provides a new way to achieve the same functionality using the Feature-Based fence tool with better control of fence location, creation, selection and symbology.


Using Map Notes in an ArcGIS Pro Scene to create 3D fences

Insert either a Scene or Map in your Pro project and add your point data to the TOC. (I am working in a scene below. My TestPts layer represents a fictional oil leak in the Gulf of Mexico.)

Insert Map Notes, and remove point and polygon map note layers to avoid confusion.

Open the Edit tab, select Create Features, and then select your Map Notes line feature in the Create Features pane.

Digitize line features in you Map or Scene and save Edits.

Run the 3D Fences, Feature-Based Fences tool.

Style your output layers and view.


In the screenshot above, I symbolized the points used in the interpolation as red dots.  You can also see the end of the Map Notes base fence protruding past the interpolated fence.  This is because the tool limits interpolation to the extent of the data, not the fence.  I would be interested in hearing your opinions about enabling  extrapolation to the full length of the fence and limiting the results to the minimum bounding area of the sample points instead of the minimum bounding envelope of the sample points. 

All feedback is welcome and I hope you find the toolbox helpful.

Arctic Dem is a prototype app developed a few years ago in conjunction with President Barack Obama's executive order calling to "enhance coordination of national efforts in the Arctic" . With a small preliminary dataset from the Polar Geospatial Center we created this proof of concept. Our intention was to experiment with the dynamic rendering of ArcGIS Image Services. For example, the first two sliders define the sun's position used by the image service to dynamically generate a hillshade from the elevation dataset. The second group of sliders are used to highlight a subset of elevation pixels that satisfy the height, slope and aspect criteria. Likewise, this rendering is performed dynamically using out-of-the-box rendering functions.


Easter Egg: Click the "hillshade" label to toggle between the standard hillshade function and a multi-directional hillshade custom function. Please click here to access a global multi-directional hillshade.


For a detailed description of the data and a user guide please click the orange buttons in the lower left hand corner of the application.


Click here for the live application.

Click here for the source code.


For the production application please visit the ArcticDEM Explorer and read the associated press release. Special thanks to David Johnson for preparing and republishing this service.

What is it?

This is an add-in for ArcGIS Pro 1.4. It's a dockable pane that shows basic statistics and a histogram for any numeric attribute in your dataset.  It also offers a slider control for selecting and filtering map features on a range of those numeric values.

Add-in panel

Why build this?

Quite some time ago, I built a healthcare-oriented Flex app. It let you choose two to four attributes and set a numeric filtering criterion on each, using the drop-down control.

HealthIndicators Flex app side-by-side maps

Then the Summary Map button would produce a filtered map with the unioned results of those filters—like a logical "AND" operation. This facilitates exploration of your data set, helping you find, for example, places where diabetes rates are above average and also where uninsured rates are below average.


Now that Flex has come and gone, I wanted to take those capabilities—filtering with a specified range, combining filters together, viewing the data's histogram—to a new platform. Sporting an SDK for extensibility, ArcGIS Pro is Esri's premier desktop application, so I settled on an ArcGIS Pro add-in.


Pro histogram chart

Some searching indicated that all this desired functionality is already available in different places in ArcGIS Pro. A Histogram chart shows the mean and median and a histogram of how the data is distributed throughout its range. There are some pretty neat features here that mirror chart selections on the map and vice-versa. If you create ranges for one or more attributes, you can use the resulting range slider bars to define, apply, and combine filter criteria.


But I wanted all this functionality all together in one place, available with a minimal number of mouse-clicks and dialogs; so I built an add-in to offer it in an ArcGIS Pro DockPane.


To use it

If you want to try it out, here's how:

  1. Make sure you have ArcGIS Pro 1.4 or 1.4.1 installed.
  2. Download the add-in file here.
  3. Double-click the add-in file to install it.
  4. Start ArcGIS Pro and open a project that has a map and a layer with numeric attributes. Or you can download a sample project here.
  5. Click the "Query Helper" button in the add-ins tab.
  6. Select a map, layer, and field; use the track bar control to choose a range of values in that attribute.
  7. Click "Add Clause" and then "Apply Query" to filter the features on the map.
  8. You can add more fields and ranges to the SQL and apply them for an additive effect.
  9. You can also edit the SQL where clause in the text box if you want to explore your data more directly; if you enter an invalid SQL clause, the map result will be blank--just click Clear SQL and start again.

Add-in panel and map

Challenges and lessons learned while building it

To get started, I tried using the ArcGIS Pro DockPane template for Visual Studio 2015. That created an empty DockPane and button, but didn't give me the guidance I needed to work with the MVVM pattern built into the template. (You may also want to see this Microsoft document on the MVVM pattern.) So I ended up extending an existing Esri community sample that loads maps and bookmarks into a DockPane.


I ran into a few instructive challenges in the process, mostly involving helper libraries and controls, but also matters of display and output. usage exampleThere are lots of statistics libraries available for .NET. I was looking for something simple, reliable, and free. Some research led me to the package, which I ended up using for statistical computation and creating histogram ranks.

Chart control

Since there's no chart control bundled into .NET, I had to look for one—again, it needed to be freely available. Though documentation is minimal, I went with the WPF Extended Toolkit (available through Visual Studio via the NuGet package system). Discussion of the challenges of using this charting system could fill another blog post or several. I'll just say that Google is your friend here.

Decimal point precision

This add-in needs to work with all sorts of numbers, including floating point values with too many decimal places to display in the available on-screen space. I opted to use StringFormats for limiting displayed decimal places to three (although computations are still done on the original, unrounded values).

XAML design mode

I also needed a way to hide the statistics field and histogram when an attribute field wasn't yet chosen and there was no data to display. I did this with a ValueConverter. The suggested way to declare ValueConverters is as static resources in the XAML file; unfortunately, this led to another problem I still don't have a proper fix for. The resource declarations seem to confuse the visual editor into displaying only an error message. My workaround was to remove the static resource declarations for those rare occasions I wanted to use the design view; then pasting those declarations back in before building the project.

XAML static resources


Next steps

There's still more to be done. Now that I have a basic level of functionality, I want to add the different range-specification options available in the original Health Indicators Flex app: things like top/bottom X% and choosing a given range of percentages.

HealthIndicators range options




Sample data

Source (GitHub)


Welcome to the new Applications Prototype Lab GeoNet group!  Our blog, discussions and other updates are now hosted on the GeoNet Community for better integration with industry, product and developer forums.  For your convenience in the future many of our more popular historic blog postings will be ported to, and redirected to, our new GeoNet home.


A little bit about us.  We are small group of twelve geospatial professionals engaged in pre-sales activities, corporate assignments and applied research and development.  We are based at Esri's headquarters in Redlands, California.


The Prototype Lab

Left to right, front to back: Lenny K., John Grayson, Bob Gerlt, David Johnson, Carol Sousa, Richie CarmichaelAl Pascual, Mark Smith (Manager), Witold Fraczek, Mark Deaton, Thomas Emge and Hugh Keegan.


Please be sure to click "follow" in the top right corner of the overview page to be alerted to new announcements, apps, snippets or postings.


If you're new to GeoNet, we also encourage you to check out the GeoNet Help group for tips and FAQs on how to get started and get the most out of your community experience.


Thanks for joining us and we look forward to seeing your contributions!

Filter Blog

By date: By tag: