Skip to main content

Using GeoPackage as a basemap or offline cache

One of GeoPackage's most practical applications is storing raster tiles for use as basemaps or offline caches. This capability is essential for Danish municipalities when field workers need access to aerial imagery, topographic maps, or other background layers without reliable internet connectivity.

Unlike online tile services that require constant connectivity, a GeoPackage tile cache allows you to:

  • Work completely offline in remote areas
  • Ensure consistent performance regardless of network conditions
  • Reduce data costs for mobile workers
  • Maintain access to basemaps even if external services are unavailable
  • Comply with data sovereignty requirements by keeping sensitive basemaps local

This section will show you how to create, optimize, and use GeoPackage tile caches using GDAL and QGIS.


Understanding Tile-Based Mapping

How Tile Pyramids Work

Tile-based mapping divides geographic areas into a grid of small image tiles at multiple zoom levels. Each zoom level contains four times as many tiles as the previous level, creating a pyramid structure:

  • Zoom level 0: The entire world in a single 256×256 pixel tile
  • Zoom level 10: Suitable for viewing a large municipality
  • Zoom level 15: Detailed enough to see individual buildings
  • Zoom level 18: High detail for asset inspection and field mapping

For Danish municipalities, practical zoom levels typically range from 10 (overview) to 18 (detailed inspection).

Tile Scheme Standards

GeoPackage supports multiple tile schemes, but the most common is the Web Mercator tile scheme (EPSG:3857), used by Google Maps, OpenStreetMap, and most web mapping services.

Important consideration for Denmark: Web Mercator introduces distortion at northern latitudes. For precise measurements, municipalities should work with vector data in ETRS89/UTM zone 32N (EPSG:25832), using Web Mercator tiles only for visual reference.


Creating a GeoPackage Tile Cache with GDAL

GDAL (Geospatial Data Abstraction Library) is a powerful command-line tool for working with geospatial data. It's included with QGIS installations and provides the most efficient way to create GeoPackage tile caches.

Example 1: Converting a GeoTIFF to GeoPackage Tiles

Suppose your municipality has an orthophoto GeoTIFF covering Brøndby Kommune that you want to convert into a tile cache for field use.

gdal_translate -of GPKG \
  -co TILE_FORMAT=JPEG \
  -co QUALITY=85 \
  -co TILING_SCHEME=GoogleMapsCompatible \
  orthophoto_broendby.tif \
  broendby_basemap.gpkg

Parameter explanation:

  • -of GPKG: Output format is GeoPackage
  • -co TILE_FORMAT=JPEG: Use JPEG compression (good for aerial photos)
  • -co QUALITY=85: JPEG quality (85 is a good balance)
  • -co TILING_SCHEME=GoogleMapsCompatible: Use Web Mercator tile scheme
  • Input file: orthophoto_broendby.tif
  • Output file: broendby_basemap.gpkg

Example 2: Generating Multiple Zoom Levels

For a complete tile pyramid with zoom levels 10-18:

gdaladdo -r average \
  --config GPKG_FORCE_TEMPDB_COMPACTION NO \
  broendby_basemap.gpkg \
  2 4 8 16 32 64 128 256

Parameter explanation:

  • -r average: Use average resampling for overview generation
  • --config GPKG_FORCE_TEMPDB_COMPACTION NO: Improves performance
  • Numbers represent the overview levels (powers of 2)

Example 3: Creating Tiles from Online Services

You can download tiles from online services (where licensing permits) using gdal_translate with a virtual raster:

gdal_translate -of GPKG \
  -co TILE_FORMAT=PNG \
  -co TILING_SCHEME=GoogleMapsCompatible \
  -projwin 12.3 55.7 12.5 55.6 \
  -projwin_srs EPSG:4326 \
  -outsize 4096 4096 \
  "WMS:http://services.datafordeler.dk/Dkskaermkort/topo_skaermkort/1.0.0/WMS?token=YOUR_TOKEN" \
  dataforsyningen_basemap.gpkg

Important: Always check licensing terms before caching tiles from online services. Dataforsyningen data requires proper tokens and adherence to terms of use.

Example 4: Optimizing File Size

For large tile caches, optimization is crucial:

# Create with PNG for transparency support but optimize
gdal_translate -of GPKG \
  -co TILE_FORMAT=PNG \
  -co QUALITY=75 \
  -co ZLEVEL=9 \
  -co TILING_SCHEME=GoogleMapsCompatible \
  aerial_photo.tif \
  optimized_cache.gpkg

# Then compact the database
ogrinfo optimized_cache.gpkg -sql "VACUUM"

Parameter explanation:

  • ZLEVEL=9: Maximum PNG compression (slower but smaller files)
  • VACUUM: SQLite command to reclaim unused space

Creating Tile Caches in QGIS

QGIS provides a user-friendly interface for creating GeoPackage tile caches without using the command line.

Method 1: Using "Generate XYZ Tiles (MBTiles/GeoPackage)"

This is the recommended method for most users.

Step-by-step process:

  1. Prepare your map canvas:
    • Load your basemap layers (aerial photos, topographic maps, etc.)
    • Set your CRS to EPSG:3857 (Web Mercator)
    • Style layers as desired for the offline cache
    • Zoom to show the area you want to cache
  2. Open the tile generation tool:
    • Go to Processing ToolboxRaster toolsGenerate XYZ tiles (MBTiles/GeoPackage)
    • Or use the search bar in Processing Toolbox: type "Generate XYZ"
  3. Configure parameters:
    • Extent: Click ... and select "Use Map Canvas Extent" or draw a custom extent
    • Minimum zoom: 10 (municipality overview)
    • Maximum zoom: 18 (detailed inspection)
    • DPI: 96 (standard screen resolution)
    • Tile format:
      • PNG for maps with transparency or sharp text
      • JPEG for aerial photos (smaller file size)
    • Quality: 85 for JPEG, 75 for PNG
    • Metatile size: 4 (improves label placement)
    • Output format: GeoPackage
    • Output file: Choose location and filename (e.g., field_basemap.gpkg)
  4. Run the process:
    • Click "Run"
    • Processing time depends on the area and zoom levels (can take several minutes to hours)

Practical example for a Danish municipality:

Suppose you're preparing a basemap for inspecting playground equipment across Brøndby Kommune:

  • Extent: Draw around Brøndby Kommune boundaries
  • Minimum zoom: 12 (see all playgrounds at once)
  • Maximum zoom: 18 (inspect individual equipment)
  • Tile format: JPEG (aerial photos)
  • Quality: 85
  • Output: broendby_playground_inspection.gpkg

Estimated file sizes:

  • Zoom 12-15: ~50-200 MB
  • Zoom 12-18: ~500 MB - 2 GB (depending on area)

Method 2: Using "Package Layers" (for existing layers)

If you already have a GeoTIFF or other raster:

  1. Right-click the raster layer in the Layers Panel
  2. Select ExportSave As...
  3. Configure export:
    • Format: Select "GeoPackage"
    • File name: Choose output location
    • CRS: EPSG:3857 (for web compatibility)
    • Click "Select" next to "Create Options" and add:
      • TILE_FORMAT=JPEG or PNG
      • TILING_SCHEME=GoogleMapsCompatible
      • QUALITY=85

Method 3: Downloading Tiles from XYZ Services

QGIS can cache tiles directly from XYZ tile services:

  1. Add an XYZ tile connection:
    • In Browser Panel, right-click XYZ Tiles
    • Select "New Connection"
    • Name: "Dataforsyningen Topo" (or your service name)
    • URL: Enter the tile service URL
    • Example for OpenStreetMap: https://tile.openstreetmap.org/{z}/{x}/{y}.png
  2. Load the XYZ layer to your map canvas
  3. Use QGIS's tile caching:
    • QGIS automatically caches viewed tiles in its cache directory
    • To create a permanent GeoPackage, use Method 1 with the XYZ layer visible

Note: Always respect tile service terms of use. Some services prohibit bulk downloading.


Using GeoPackage Tile Caches in QGIS

Loading a GeoPackage Basemap

Simple drag-and-drop:

  1. Drag your .gpkg file from File Explorer into QGIS
  2. If the GeoPackage contains tiles, QGIS will display them automatically

Through the Browser Panel:

  1. Navigate to your GeoPackage in the Browser Panel
  2. Expand it to see contents
  3. Drag the tile layer to your map canvas

Setting as a background layer:

  1. Load the GeoPackage tile layer
  2. Move it to the bottom of the Layers Panel
  3. Consider reducing opacity slightly (90-95%) if overlaying vector data

Configuring Display Settings

For optimal performance:

  1. Right-click the tile layerProperties
  2. Go to the Rendering tab:
    • Resampling: "Bilinear" (good balance) or "Nearest Neighbour" (fastest)
    • Oversampling/Undersampling: Leave at default
  3. Go to the Symbology tab:
    • Adjust brightness/contrast if needed
    • Apply color adjustments for better visual separation from vector layers

Working Offline

Best practices for field work:

  1. Test before going to the field:
    • Disable your network connection
    • Open QGIS with your tile cache
    • Zoom to different levels and pan around
    • Verify all necessary zoom levels are present
  2. Combine with vector data:
    • Store both tiles and vector layers in the same GeoPackage
    • Example: Playground locations (points) + aerial basemap (tiles)
    • Everything loads from one file
  3. Optimize QGIS settings for offline use:
    • SettingsOptionsNetwork
    • Uncheck "Use proxy for web access" if not needed
    • Set timeout values appropriately

Managing Tile Cache File Size

Understanding Storage Requirements

Tile cache file size grows exponentially with zoom levels:

Example calculation for a 10 km² area:

  • Zoom 10-12: ~10-30 MB
  • Zoom 10-15: ~100-300 MB
  • Zoom 10-18: ~1-3 GB

Factors affecting size:

  • Geographic area covered
  • Number of zoom levels
  • Tile format (JPEG vs PNG)
  • Compression quality
  • Image content (complex imagery = larger files)

Optimization Strategies

1. Limit zoom levels strategically:

# Only generate zooms 12-16 instead of 10-18
# Reduces file size by 60-80%

2. Use selective coverage: Create separate GeoPackages for different zoom ranges:

  • overview.gpkg: Zoom 10-14 for entire municipality
  • detailed_north.gpkg: Zoom 15-18 for northern district only
  • detailed_south.gpkg: Zoom 15-18 for southern district only

3. Choose appropriate formats:

  • JPEG for aerial photos (smaller files, lossy compression)
  • PNG for maps with text and sharp edges (larger files, lossless)
  • PNG8 (8-bit PNG) for simple color schemes (compromise)

4. Compress the GeoPackage:

# After creating tiles, run VACUUM to compact
sqlite3 your_cache.gpkg "VACUUM;"

5. Use different quality settings by zoom level:

GDAL doesn't directly support this, but you can merge multiple GeoPackages:

# Create high-quality tiles for close zoom
gdal_translate -of GPKG -co QUALITY=90 -outsize 50% 50% source.tif detailed.gpkg

# Create lower-quality for overview zoom  
gdal_translate -of GPKG -co QUALITY=70 -outsize 25% 25% source.tif overview.gpkg

# Merge (requires custom scripting)

Practical Workflow Examples

Example 1: Municipal Park Inspection

Scenario: Park maintenance staff need offline access to aerial imagery for inspecting 45 parks across the municipality.

Solution:

  1. In QGIS:
    • Load park boundaries (vector)
    • Buffer by 100m: VectorGeoprocessing ToolsBuffer
    • Use buffered areas to define tile generation extents
    • Generate tiles for zoom 15-18 only
    • Store park boundaries and tile cache in same GeoPackage
  2. Field workflow:
    • Load single GeoPackage on tablet
    • Navigate between parks
    • All imagery available offline
    • Collect inspection data in same GeoPackage

Create a focused GeoPackage:

# For each park, create a buffered tile cache
# Zoom 15-18 for detail, buffer 100m around each park

Estimated file size: ~500 MB for 45 parks

Example 2: Emergency Response Basemap

Scenario: Emergency services need offline basemap covering entire municipality for disaster response.

Solution:

  1. Multi-resolution approach:
    • Zoom 10-14: Entire municipality for overview
    • Zoom 15-18: Critical infrastructure areas only (fire stations, hospitals, schools)
  2. QGIS workflow:
    • Create project with emergency_overview.gpkg
    • Add vector layers for critical infrastructure
    • Save everything in a single project file
    • Test completely offline

GDAL workflow:

# Overview - entire municipality
gdal_translate -of GPKG \
  -co TILE_FORMAT=JPEG \
  -co QUALITY=80 \
  -projwin 12.3 55.65 12.5 55.75 \
  -projwin_srs EPSG:4326 \
  aerial_source.tif \
  emergency_overview.gpkg

# Generate overviews for zoom levels
gdaladdo emergency_overview.gpkg 2 4 8 16

Estimated file size:

  • Overview (zoom 10-14): ~200 MB
  • Detailed areas (zoom 15-18): ~800 MB
  • Total: ~1 GB

Example 3: Construction Project Documentation

Scenario: Document a construction project's progress with before/during/after aerial imagery.

Solution:

  1. Time-stamped tile caches:
    • project_site_2024_jan.gpkg: Pre-construction
    • project_site_2024_jun.gpkg: Mid-construction
    • project_site_2024_dec.gpkg: Post-construction
  2. QGIS workflow:
    • Load all three GeoPackages as separate layers
    • Use layer visibility to toggle between time periods
    • Add construction boundary vector in same GeoPackages
    • Create time-slider using "Temporal Controller"
  3. Sharing with stakeholders:
    • Single folder with three GeoPackage files
    • Include QGIS project file (.qgz)
    • Recipients can view without internet connection

Updating and Maintaining Tile Caches

When to Update

Tile caches should be updated when:

  • New aerial imagery becomes available (typically annually in Denmark)
  • Significant changes occur in the mapped area
  • User feedback indicates outdated information
  • Planning new field campaigns

Incremental Updates

Rather than regenerating entire tile caches, update only changed areas:

Approach 1: Replace specific zoom levels:

# Update only high-zoom levels for a specific area
gdal_translate -of GPKG \
  -co APPEND_SUBDATASET=YES \
  -co RASTER_TABLE=updated_area \
  -projwin 12.4 55.68 12.42 55.70 \
  new_imagery.tif \
  existing_cache.gpkg

Approach 2: Merge multiple GeoPackages:

Use Python with GDAL to programmatically copy tiles between GeoPackages (advanced, requires scripting).

Version Control for Basemaps

Best practices:

  1. Include date in filename:
    • broendby_basemap_2024_01.gpkg
    • broendby_basemap_2024_06.gpkg
  2. Document changes:
    • Store metadata in GeoPackage using metadata extension
    • Include a README file with each basemap distribution
  3. Maintain a master catalog:
    • Spreadsheet or database tracking all tile caches
    • Columns: Filename, Creation date, Area covered, Zoom levels, File size, Source data date

Troubleshooting Common Issues

Issue 1: Tiles Not Displaying at Certain Zoom Levels

Symptom: Basemap disappears when zooming in or out.

Cause: Missing pyramid levels.

Solution:

# Generate missing overviews
gdaladdo your_cache.gpkg 2 4 8 16 32 64 128

Issue 2: Poor Performance with Large Tile Caches

Symptom: QGIS is slow when panning or zooming.

Causes and solutions:

  1. Too many zoom levels loaded:
    • In QGIS, set scale-dependent visibility
    • Layer Properties → Rendering → Scale Dependent Visibility
  2. Disk I/O bottleneck:
    • Store GeoPackage on SSD instead of HDD
    • For network drives, copy to local disk first

GeoPackage not optimized:

sqlite3 slow_cache.gpkg "VACUUM;"
sqlite3 slow_cache.gpkg "ANALYZE;"

Issue 3: Coordinate Mismatch

Symptom: Tiles don't align with vector layers.

Cause: CRS mismatch between tiles (EPSG:3857) and vectors (EPSG:25832).

Solution:

  • Enable on-the-fly reprojection (should be automatic in QGIS 3.x)
  • Verify: Project → Properties → CRS → Ensure correct CRS is set
  • Reproject vector layers if necessary for better performance

Issue 4: File Size Too Large

Symptom: GeoPackage exceeds storage capacity.

Solutions:

  1. Reduce quality:
    • Regenerate with QUALITY=75 instead of 90
    • Use JPEG instead of PNG
  2. Limit coverage:
    • Generate tiles only for areas of interest
    • Use separate GeoPackages for different districts
  3. Reduce zoom levels:
    • Skip zoom 17-18 if not needed
    • Can reduce file size by 75%

Issue 5: Licensing and Attribution

Symptom: Uncertainty about legal use of cached tiles.

Solution:

  1. Check source data license:
    • Dataforsyningen: Requires token and compliance with terms
    • OpenStreetMap: Requires attribution
    • Commercial imagery: May prohibit offline caching
  2. Include attribution:
    • Add text layer in QGIS with data source
    • Include attribution in metadata
    • Document in README file
  3. When in doubt:
    • Contact data provider for clarification
    • Use only data with clear licensing for offline use
    • Consider using municipal-owned aerial imagery

Best Practices Summary

Planning Your Tile Cache

Do:

  • Start with smaller area and fewer zoom levels to test
  • Calculate expected file size before generating
  • Document source data and creation date
  • Test offline functionality before field deployment
  • Use JPEG for photos, PNG for maps with text
  • Store related vector data in same GeoPackage

Don't:

  • Generate all zoom levels 0-20 (wasteful and slow)
  • Cache entire country when you need one municipality
  • Forget to verify licensing terms
  • Skip testing before critical field work
  • Use PNG for large aerial photo caches (file size explosion)

File Organization

Recommended structure:

Municipal_Basemaps/
├── Overview/
│   └── municipality_overview_z10-14_2024.gpkg
├── Districts/
│   ├── north_district_z15-18_2024.gpkg
│   └── south_district_z15-18_2024.gpkg
├── Projects/
│   ├── harbor_renovation_z16-19_2024.gpkg
│   └── park_development_z15-18_2024.gpkg
└── README.txt (documentation)

Performance Optimization

  1. For desktop QGIS:
    • Store GeoPackage on local SSD
    • Use bilinear resampling
    • Enable multi-threaded rendering: Settings → Options → Rendering
  2. For mobile/tablet field devices:
    • Limit to zoom 12-17 (avoid 18-19)
    • Use JPEG with quality 80
    • Keep file size under 1 GB per GeoPackage
    • Test on actual device before field deployment
  3. For shared/network use:
    • Copy to local disk before opening
    • Consider using a tile server instead (GeoServer, MapServer)
    • Or use Cloud-Optimized GeoPackage (COG) extension

Knowledge Check Quiz

Question 1: Understanding Tile Pyramids

A GeoPackage tile cache for Brøndby Kommune (11 km²) has zoom levels 10-18. Approximately how much larger is zoom level 18 compared to zoom level 15?

A) 2 times larger
B) 8 times larger
C) 64 times larger
D) 512 times larger

Click for answer Answer: C) 64 times larger Explanation: Each zoom level contains 4× the tiles of the previous level (2× in each dimension). From zoom 15 to 18 is 3 levels: 4 × 4 × 4 = 64 times more tiles.

Question 2: Choosing Tile Format

You need to create a tile cache of the latest orthophoto for field inspection of road surfaces. Which tile format and quality setting would be most appropriate?

A) PNG, Quality 100 (lossless, maximum quality)
B) JPEG, Quality 95 (near-lossless, high quality)
C) JPEG, Quality 85 (good quality, reasonable file size)
D) PNG8, Quality 50 (8-bit color, smallest file)

<details> <summary>Click for answer</summary>

Answer: C) JPEG, Quality 85

Explanation: Aerial photos compress well with JPEG. Quality 85 provides excellent visual quality while keeping file sizes reasonable. PNG would create unnecessarily large files for photos, and Quality 95 provides minimal visible improvement over 85 but increases file size significantly.

</details>


Question 3: GDAL Command Interpretation

What does this GDAL command do?

gdal_translate -of GPKG -co TILE_FORMAT=PNG \
  -co TILING_SCHEME=GoogleMapsCompatible \
  -projwin 12.3 55.7 12.5 55.6 -projwin_srs EPSG:4326 \
  topographic_map.tif output.gpkg

A) Converts the entire topographic map to GeoPackage with PNG tiles
B) Extracts a rectangular area (12.3°E to 12.5°E, 55.6°N to 55.7°N) and creates PNG tiles
C) Reprojects the map from EPSG:4326 to Web Mercator
D) Creates only the tile pyramid without the base imagery

<details> <summary>Click for answer</summary>

Answer: B) Extracts a rectangular area and creates PNG tiles

Explanation: The -projwin parameter defines a bounding box in the specified CRS (EPSG:4326 = WGS84 lat/lon). Only the area within these coordinates is extracted and tiled. The -co TILING_SCHEME=GoogleMapsCompatible creates Web Mercator tiles, but -projwin_srs specifies the coordinate system of the bounding box, not the output.

</details>


Question 4: Zoom Level Selection

You're preparing a basemap for inspecting tree health in municipal parks. Staff need to see individual tree crowns. Which zoom levels should you include?

A) Zoom 8-12 (municipality overview)
B) Zoom 10-15 (district level detail)
C) Zoom 15-18 (individual features visible)
D) Zoom 18-21 (maximum possible detail)

<details> <summary>Click for answer</summary>

Answer: C) Zoom 15-18

Explanation: Individual trees become visible around zoom 17-18, but including 15-16 provides context for navigation. Zoom 8-12 is too broad, and zoom 19+ (if available) would create enormous file sizes with minimal additional benefit for tree inspection.

</details>


Question 5: File Size Estimation

A colleague creates a tile cache for a 25 km² area with zoom levels 12-18, using JPEG quality 85. The file is 4.2 GB. You need to cache a similar 25 km² area but have only 1 GB available. What's the best approach?

A) Reduce quality to 50
B) Change to zoom levels 12-16 only
C) Split into 4 separate GeoPackages of ~6 km² each
D) Use PNG8 instead of JPEG

<details> <summary>Click for answer</summary>

Answer: B) Change to zoom levels 12-16 only

Explanation: Removing zoom 17-18 will reduce file size by approximately 80% (since these high zoom levels contain the vast majority of tiles), bringing a 4.2 GB file down to ~800 MB. Reducing quality to 50 would severely degrade image quality. Splitting into separate files doesn't reduce total size. PNG8 would likely increase file size for aerial photos.

</details>


Question 6: CRS Considerations

Your municipality uses EPSG:25832 (ETRS89/UTM zone 32N) for all vector data. You're creating a GeoPackage tile cache. Which CRS should you use for the tiles?

A) EPSG:25832 (to match vector data)
B) EPSG:3857 (Web Mercator for tile compatibility)
C) EPSG:4326 (WGS84 for maximum compatibility)
D) EPSG:4093 (ETRS89 for Danish data)

<details> <summary>Click for answer</summary>

Answer: B) EPSG:3857 (Web Mercator)

Explanation: Tile schemes are designed for Web Mercator (EPSG:3857). QGIS will automatically reproject your EPSG:25832 vector data on-the-fly to match the basemap tiles. Using EPSG:25832 for tiles would create compatibility issues and prevent proper tile pyramid generation.

</details>


Question 7: Offline Functionality

You've created a GeoPackage tile cache and need to test it before field deployment. What's the most important test?

A) Check that file size is under 2 GB
B) Verify tiles display correctly at all zoom levels with network disabled
C) Confirm the GeoPackage opens in multiple GIS applications
D) Validate that CRS matches the project CRS

<details> <summary>Click for answer</summary>

Answer: B) Verify tiles display correctly at all zoom levels with network disabled

Explanation: The primary purpose of a tile cache is offline functionality. You must test with network disabled to ensure all necessary zoom levels are present and tiles display correctly. The other checks are useful but secondary to confirming offline operation.

</details>


Question 8: Performance Optimization

Field staff report that panning and zooming with your 2.5 GB GeoPackage tile cache is very slow on their tablets. What should you try first?

A) Regenerate with fewer zoom levels
B) Run VACUUM and ANALYZE on the GeoPackage
C) Split into multiple smaller GeoPackages
D) Change from JPEG to PNG

<details> <summary>Click for answer</summary>

Answer: B) Run VACUUM and ANALYZE

Explanation: Before regenerating or restructuring, optimize the existing GeoPackage with SQLite's VACUUM (defragments and compacts) and ANALYZE (updates query optimizer statistics). This often resolves performance issues without requiring regeneration. If this doesn't help, then consider options A or C.

</details>


Question 9: QGIS Tile Generation

In QGIS's "Generate XYZ tiles" tool, you set minimum zoom to 12 and maximum zoom to 16. What does the "Metatile size: 4" parameter do?

A) Creates tiles that are 4× larger (1024×1024 pixels)
B) Generates 4 zoom levels
C) Renders 4 tiles at once for better label placement across tile boundaries
D) Compresses tiles to 25% of original size

<details> <summary>Click for answer</summary>

Answer: C) Renders 4 tiles at once for better label placement

Explanation: Metatiling renders a 2×2 (when metatile size=4) or larger group of tiles together before splitting them apart. This prevents labels and symbols from being cut off at tile edges, creating a better visual experience. Tiles are still 256×256 pixels.

</details>


Question 10: Licensing and Compliance

You want to create an offline tile cache from Denmark's Dataforsyningen service for internal municipal use. What must you do?

A) Nothing special; government data is always freely usable
B) Include proper attribution in the GeoPackage metadata
C) Obtain a valid token and ensure compliance with Dataforsyningen's terms of use
D) Only use tiles for non-commercial purposes

<details> <summary>Click for answer</summary>

Answer: C) Obtain a valid token and ensure compliance with terms of use

Explanation: Dataforsyningen requires authentication via token and has specific terms of use. While Danish public sector organizations typically have access rights, you must still comply with the terms, which may restrict certain uses or require specific attribution. Always check current terms before caching tiles.

</details>

Updated on Jan 21, 2026