ESRI Map Integration with Unleash live

 

One of Unleash live's powerful features is the ability to automatically generate Orthomosaic maps from a drone flight and overlay these Orthomosaic maps over standard low-resolution satellite imagery provided by Google, open street maps, etc.

This feature is useful, allowing high-resolution scans of ongoing construction projects, land for potential development, or anything you can fly a drone over.

However, as many cities and enterprises rely on Esri’s ArcGIS mapping software, we decided to integrate our Unleash live-generated Orthomosaic maps straight into Esri. We do this via live sync across the two platforms—there is no need for the user to export and import the maps.

This blog post shares a bit of our journey while building this fantastic capability together with our partner, Esri.

Map Tiles

Unleash live generates and displays high-resolution, large-scale Orthomosaic maps using tiles.

Maps on the internet generally follow the “Tiled Web Map”, or “Slippy Map” format. This prevents unnecessary load — both on the network and memory — as only parts of the map currently required are loaded.

The "Slippy" map format consists of a simple folder hierarchy, with the top-level directory containing the zoom level ( with 0 being the topmost i.e. the earth), the next subdirectory containing the “x”/Column tile, and finally, a 256x256 pixel image containing the “y”/Row tile — for example:

tiles/0/0/0.png

These tiles are usually served at a URL in the format:

subdomain.domain.com/mapType/{level}/{col}/{row}.png

A map front end calculates which tiles it needs based on the zoom level and location of the viewport, requests those tiles, and then displays them. Easy.

Not so fast

As with everything on the internet, multiple standards exist for storing and requesting map tiles.

Unleash live uses the Google/OpenStreetMap standard, where tiles are stored in the format:

Tiles/{zoom level}/{x/col}/{y/row}.png

Esri expects tiles in the same format, but with the row reversed. This is referred to as TMS, or Tile Map Service format. Using basic algebra, we can return the TMS row from Google.

The Challenge

Our solution must return the correct tile — requested by ArcGIS in the TMS format, but stored in AWS S3 as the Google format.

It also needs to be:

  1. Fast, latency wise

  2. Simple to use

  3. Scalable

Solution: Hooray for the power of AWS API Gateway and CDN

Blog - ESRI map integration with Unleash live - orthomosaic new road
Generated Orthomosaic of a new road — note the lineup between new and old maps



To prevent storing multiple images and formats, we use an AWS lambda function to process the request, check its authenticity, convert it into the correct format, and return the correct image from an S3 bucket.

To get started with AWS API Gateway, I recommend the Lambda Proxy Integration tutorial, which provides a great introduction to receiving data from an HTTP request and returning a result.

You also need to configure your API to return all binary media types — otherwise, your browser (or whatever mapping application you use) will treat the returned data as JSON data and not an image.

Finally, check out the AWS CDN/Lambda@Edge tutorials for more information about putting your Lambda function and content (in this case, image tiles) at the “edge” for the lowest latency.

 
Blog - ESRI map integration with Unleash live - orthomosaic barangaroo

Orthomosaic of development at Barangaroo, Sydney, displayed over a dark infrastructure map

Testing

With the Lambda function deployed and the AWS API gateway configured correctly, our Unleash live users can now type the URL into any web browser and see the appropriate synced image in Esri immediately.

For example, in your Unleash live account, you can select a link like this:

https://tms.unleashlive.com/{level}/{col}/{row}?user={}

Which should display the base tile (the earth) if it exists in your Esri ArcGIS tileset. 

In Conclusion

You can see it in action in this video:

 

Unleash live and Esri Map integration


This solution allowed us to integrate Esri ArcGIS with any Orthomosaic map currently generated through Unleash.Cloud ensuring a great user experience, very low latency and without unnecessary processing.

Thanks to AWS S3/Cloud-front CDN, it's fast and scalable, and it’s simple—users only need to know how to paste a link.

We’ll be demoing this and other solutions provided by Unleash Live at the 2020 Esri Developer Summit in Palm Springs — feel free to come say hi!

Get Started with Unleash live

Get in touch to learn more or book a time with one of our specialist team members to learn how your business can take advantage of live streaming video and AI analytics.

To learn more about our Operations Analytics and Insights Software Package, contact us today.
Get in touch →