Creating offline Tile Packages for Survey123
Defining Offline Data and Tiles
Survey123 and other Esri applications generally handle the term “offline” in the same way. Offline access means that data is available when a device does not have internet access via WiFi or Cellular Data Network (3G, 4G, LTE etc.) Esri Mobile apps support various levels of offline data access, but generally datasets are split into offline vector or attribute data and offline basemap or tiled data. On top of this, some applications support different levels of editing of the vector or attribute data with differente permissions defining what layers and features can be edited, added, deleted or modified. Offline support is therefore a combination of data, tiles and permissions.
Offline Data
Esri provides access to offline vector data and attributes primarily through the concept of feature services. Feature services are web services published to ArcGIS Server or through ArcGIS Online, which allow an authenticated client (a user that has logged in) to request a set of features from a service for a specific area. This is the classic “Collector” workflow, where a user pre-defines their area of interest, and the app downloads all of the vector features for that area so they can be viewed and (if appropriate) edited.
Survey123 supports offline data through the Inbox, a simpler method of taking data offline which allows a user to review existing records and make edits to them.
Offline Tiles
Esri supports offline basemaps using the Tile Package data item. Tile Packages are .tpk files, which are zipfiles that contain a director of basemap tiles and a few files that provide relevant metadata about the area of coverage, layers, and other items. A tile package can only contain one set of basemap tiles. Tile packages are created through several different processes to be discussed in the next sections.
The ingredients for a tile package are:
-
Either
a. The service URL of the map service with Tile Export Enabled – this specifies which service + tiles to request
or
b. The map in ArcMap or Pro to export a TPK from
-
An Extent to request (the geographic area to request tiles for) – this controls the area of interest
-
The Levels (zoom scales) to request tiles for (0-20 generally) – this controls the level of detail of the tiles
Together, these three parameters define the tile package, which can range from a few Mb to Gb in size.
Offline Permissions
Access to edit and add to datasets is generally controlled at the feature service permission level. A certain dataset may allow users to create new features only, or might allow them to edit existing features but not create or delete, for example. These permissions are inherited in the offline data, which the app uses to control what a user can and cannot do with their data once it is available offline.
Creating Tile Packages for Survey123
Survey123 supports offline basemaps through tile packages. There are several ways to create a tile package, the best of which is Tile Package Kreator, a desktop stand-alone application which allows a user to identify a service from their ArcGIS Enterprise or ArcGIS Online organization, choose an extent and which scale levels to export, and generate the exported package, which is then downloaded to their computer.
Help for the Tile Package Kreator is available here: https://esri.app.box.com/s/d6xaclvrdu14pqk6t95arxu02zz2mtin
Users can also create Tile Packages with ArcMap and ArcGIS Pro. These tools are helpful for when a user wants to include other layers in their tile package, or use custom imagery files or other data. Note that when other layers are included in a tile package they are “flattened” to the raster format of the TPK, so no attributes can be extracted and symbology cannot be changed.
ArcMap documentation: How to create a tile package
ArcGIS Pro documentation: Tile Package Overview
Tile packages can also be created directly from the ArcGIS REST API by a developer using the Export Tiles function (when enabled): Export Tiles Documentation
Another web-based tool for creating tile packages is available here: http://nixta.github.io/tpk-creator/#
Methods for making Tile Packages available to users in Survey123
There are four main methods for getting a tile package available to Survey123 field users:
-
Load to an SD Card - Documentation
-
Copy your Tile Package Directly to the Device - Documentation
-
Package TPKs in the media folder during Survey publishing - Documentation
-
Upload TPKs to Portal and reference them in the Survey - Documentation
These methods are all covered in detail in the following documentation from the Survey123 website: http://doc.arcgis.com/en/survey123/desktop/create-surveys/preparebasemaps.htm
Included below is a brief Pro/Con listing of the options to help decide which is best for a specific scenario:
Method | Pros | Cons | Recommended Use Case |
---|---|---|---|
Load tile packages to SD Cards | - Easy to share cards - Quick to copy and load - Large TPKs are supported - No Network Bandwidth required |
- Not supported on iOS - Only update by connecting to a computer |
Areas with very limited network connectivity + Android devices |
Load to device from Windows/Mac OS using USB | - Direct load via USB - Fast to copy |
- No updates over the air - Requires users to be at the same place to access data - Difficult to send updates |
Small survey teams One-off field exercises |
Add to Survey During Publishing | - All in one package - Publisher can update survey + tile package remotely |
- Large download size for survey - Downloads on every refresh |
Small Tile Packages or frequently-updated packages, working in areas with good data coverage |
Add the TPK link to the MySurvey.info file after publishing | - Create tile package once and host it -> everyone can use | - Requires bandwidth for users to download - Manual process to add it to the file as a publisher - No method for updating automatically |
Best option across the various use cases |
Outstanding TPK topics
-
How to update a TPK that has been published to Portal and have users re-download the file?
-
How to pre-generate TPKs across an area for use in mobile devices, so they can be pre-loaded or available for pre-loading as necessary
-
Generation of a country-scale TPK down to L12 or so which can be used for all offline scenarios