Maps on Demand

A Service orientated approach to dynamic map creation

Stantec Logo
USACE Logo
MMC Logo
  • Est. 2008
Standardizing the production process for EAP models and maps by:
  1. HEC-RAS or Flo2D Modeling
  2. GIS Mapping
  3. Data Loading
  4. Web Mapping

Initial web-based workflow


Getting to the static pdfs is pretty easy


But what if you wanted to change the data layers in the map?

Next

Maps on Demand v. 1.0


But what if we hadn't mapped the site, or you want a custom extent?

Maps on Demand v. 2.0

Next

Goals

The Goals of this project was to allow a user to dynamically create their own map atlas depending on their needs at the time of creation. We wanted the web site to perform most if not all of the data crunching on the browsing and be abstract enough to be easily implemented into any previous web site.

Next
Next

User Draws Grid

Using the OpenLayers draw tool the user can draw the area on the map they wish to export as a map Atlas


Since the starting point of the grids are based off the bounding box coordinates of the user drawn polygon the code will then run a Hit Test on the user drawn polygon and remove any grids that don't intersect using JSClipper

The remaining grid coordinates will then be posted to the REST interface and the service will run a Hit Test on the geometries in the Database. The service will return only the id of the grid and either True or False

The web site will then remove any grids that returned a false and display the created grids to the user

Next

Creating the config file and Server side logic

After the user adds optional information, such as basemap, additional emails, and notes, the website will post the data back to the server as a stringified JSON

Using the google-gson library the service will parse the string into a class that will hold our data to be used by a buffered writer to write out a control file

Depending on the type of map the user wants the config file will point to different available templates

The service will then start the python scripts using the config file as a parameter

Next

Python Scripts to create Map Pages

The python script will start and read/parse the config file.

The main python script(_mapbook_main) utilizes the python multiproccesing module for the creation of the individual map pages. The script will parse the geojson of the created map grids and pull the page numbers to divide them up evenly depending on the number of processors the config file has listed

The python script for creating the index sheet and map book pages will use arcpy to create in memory feature classes using the coordinates listed in the Geojson to be exported with the map. For layers that are already stored in the database the templates utilize Query layers and the python script will update the query to reflect the chosen data.

Text box data such as page numbers will update using the information from the config file and the parsed geojson

Next

Resources

Contact Info

Work

Email

Brian Mulcahy

913-202-6877

Will Breitkreutz

816-389-3474