To prove out our Google Cloud Storage (GCS) vector tile solution with a more substantial dataset, we chose a 2 ft contour dataset covering Fairfield County, Ohio. The source data were contained in a 5Gb Esri file geodatabase. We processed the dataset by following the same overall sequence and with the same tooling as Hamilton County.
Steps
- Convert from Esri file geodatabase to GeoJSON format. Create separate GeoJSON files for three contour levels (50ft, 10ft, 2ft) by applying an attribute filter on the elevation field. Use the simplify flag to generalize geometries and reduce file size.
ogr2ogr \
-f GeoJSON fairfield_contours_2ft_simplify_004.geojson FairfieldCounty.gdb Contour \
-nln countours_2ft \
-lco DESCRIPTION="Fairfield County, OH, 2 foot contours" \
-select ELEV \
-simplify 0.4 \
-t_srs EPSG:4326 - Create vector tile pyramid from GeoJSON file.
tippecanoe \
-Z18 -z20 \
-n contours_2ft \
-l contours_2ft \
--no-tile-compression \
--output-to-directory fairfield_contours_2ft \
fairfield_contours_2ft_simplify_004.geojson - Combine separate tilesets into a single fused tileset. You may get errors related to file handle limits on Linux with tile-join and a manual join may be required.
tile-join \
-pk \
-pC \
-e fairfield_contours \
fairfield_contours_50ft \
fairfield_contours_10ft \
fairfield_contours_2ft \
fairfield_contours_boundary - Compress tiles with gzip.
gzip -r fairfield_contours
- Upload to GCS.
gsutil -m cp -r fairfield_contours gs://geoaccelerators.woolpert.dev/tileservices
- Set metadata.
gsutil -m setmeta -r -h "Content-Encoding:gzip" \
-h "Content-Type:application/vnd.mapbox-vector-tile" \
gs://geoaccelerators.woolpert.dev/tileservices/fairfield_contours/**/*.pbf.gz
gsutil -m setmeta -r -h "Cache-Control:no-cache, max-age=0" \
gs://geoaccelerators.woolpert.dev/tileservices/fairfield_contours/*
Key URLs and Demo Apps
Here is a list of key urls and demo apps.
- Tile service base: https://geoaccelerators.woolpert.dev/tileservices/fairfield_contours
- TileJSON
- Esri vector tile layer (GeoServices REST API)
- OpenLayers
- ESRI JavaScript API
Simple Load Testing Stats
Apace Bench was used for simple load testing. Here are some basic statistics on the performance of this 7.7Gb compressed tileset served from GCS.
ab -n 100 -c 10 https://geoaccelerators.woolpert.dev/tileservices/fairfield_contours/15/8864/12446.pbf.gz
Connection Times (ms)
min mean[+/-sd] median max
Connect: 62 82 15.3 77 169
Processing: 136 160 24.3 155 292
Waiting: 112 131 25.0 122 267
Total: 202 241 32.2 231 357
Percentage of the requests served within a certain time (ms)
50% 231
66% 238
75% 244
80% 254
90% 290
95% 330
98% 344
99% 357
100% 357 (longest request)
For 100 total requests with a concurrency of 10, Apache Bench reports a 330ms response time at the 95th percentile.
Comments
0 comments
Please sign in to leave a comment.