Quick Export (MBTiles) Issues

436
1
Jump to solution
02-01-2024 06:47 AM
JeremyPeplinski
New Contributor

I'm new to working in ArcGIS, and have been trying to transform data from a REST API into an MBTiles-format vector tile package.  However, I've been running into a few issues through the process, and haven't been able to find solutions from what's documented online.  For context, I'm using the ArcGIS Pro trial (so Pro Advanced), version 3.2.1 on Windows 11.

I've added the layer via `Data from Path`, and have been attempting to export it with the Quick Export tool.  That layer's data is filtered with a definition query, reducing its size from ~173k entries to ~3k as a proof of concept and to ensure only valid geometry is included.  From there, I've selected the layer (with "Use the filtered records" option) as my input layer, configured my MBTiles output accordingly (e.g. zoom range of 4-8, metadata beyond default values, and so forth), and run the export.

The first issue that I run into in the export is a warning, which reports that:

None of the layers to be read contain features in the selection set. Therefore all the features in the layers will be read
 The process continues to run with ~170k features, so oddly missing around 3k from the original dataset, but otherwise generally what one would expect from the warning.  I've attempted the same thing with no filtering on the dataset, other export formats (e.g. JSON), and even a layer from a local file (a subset of the dataset exported in KML format) rather than a REST API, and have continued to see the same results.

After this warning and switch to the full dataset, the debug log reveals some other issues with the MBTiles export, which may or may not be a result of that initial warning.  The most substantial ones are related to the tileset's zoom levels, appearing to revert the tileset's zoom levels to the defaults (0-5) after being unable to find zoom level options for the input layer:

MBTILES_MVT writer: Feature Type Parameter 'mvt_min_zoom' has not been set for feature type 'L0National_Forest_System_Roads'. Using default value '0'
MBTILES_MVT writer: Feature Type Parameter 'mvt_max_zoom' has not been set for feature type 'L0National_Forest_System_Roads'. Using default value '5'


From this point, the tileset appears to generally be written as expected with the 0-5 zoom change and unfiltered data.  Some of the higher-zoom tiles might not be being generated correctly, as multiple programs display lower-detail tiles than expected across much of the extent of the dataset, but the underlying SQLite database appears to have its tiles table configured in a reasonable manner, so I'd have to some more digging to get more details.

Is there something I'm missing in my workflow or baseline understanding of the process that would be causing this?

 

A more precise workflow to recreate this:

  1. Add data from path, no additional parameters: https://apps.fs.usda.gov/arcx/rest/services/EDW/EDW_RoadBasic_01/MapServer/0
  2. Layer properties -> Definition query -> Add query: LOC_ERROR = 'NO ERROR' AND PRIMARY_MAINTAINER = 'C - COUNTY, PARISH, BOROUGH'
  3. Data Interoperability Tools -> Quick Export
  4. Select new layer as input layer from dropdown
  5. Output dataset: MVT
  6. Parameters -> Zoom levels: Minimum other than 0, maximum other than 5 (e.g. 4-8)
  7. Run

From this point, relevant debug printouts are visible in View Details -> Messages.  Assuming zoom levels of 0-5 and an unfiltered dataset, the tiles would be expected to appear similar to the segment of map in purple (exported via QGIS, which has some small errors in geometry).  Instead, the resulting tiles render as shown in yellow.

JeremyPeplinski_0-1706798508209.png

JeremyPeplinski_3-1706798764172.png

 

 

 

0 Kudos
1 Solution

Accepted Solutions
BruceHarold
Esri Regular Contributor

Hello Jeremy, apologies for the delay.

Quick Export doesn't know about definition queries.  In the attached is a Pro 3.2 toolbox with a spatial ETL tool in it that exports your query features to mbtiles, zoom levels 4-8.

View solution in original post

0 Kudos
1 Reply
BruceHarold
Esri Regular Contributor

Hello Jeremy, apologies for the delay.

Quick Export doesn't know about definition queries.  In the attached is a Pro 3.2 toolbox with a spatial ETL tool in it that exports your query features to mbtiles, zoom levels 4-8.

0 Kudos