Working with Layers¶
Layers are the fundamental building blocks of Cloud Native GIS. This guide covers everything you need to know about creating, managing, and serving geospatial layers.
Layer Types¶
Vector Layers¶
Vector layers contain geometric features (points, lines, polygons) with associated attributes.
Supported formats:
- Shapefile (
.shp) - GeoJSON (
.geojson) - GeoPackage (
.gpkg) - KML (
.kml) - CSV with geometry (
.csv)
Storage: Vector data is stored in PostGIS and served as Mapbox Vector Tiles (MVT).
Raster Layers¶
Raster layers contain gridded data such as satellite imagery, elevation models, or thematic maps.
Supported formats:
- GeoTIFF (
.tif,.tiff) - Cloud Optimized GeoTIFF (COG)
- PMTiles (
.pmtiles)
Layer Management¶
Creating a Layer¶
flowchart LR
A[Upload File] --> B[Process Data]
B --> C[Store in PostGIS]
C --> D[Generate Tiles]
D --> E[Apply Style]
- Navigate to Admin > Cloud Native GIS > Layers
- Click Add Layer
- Fill in the required fields:
- Name: Unique identifier for the layer
- Title: Display name
- Description: Layer description
- File: Your geospatial data file
Layer Properties¶
| Property | Description |
|---|---|
name |
Unique layer identifier |
title |
Human-readable display name |
description |
Layer description |
created_at |
Creation timestamp |
updated_at |
Last modification timestamp |
bbox |
Bounding box (auto-calculated) |
srid |
Spatial Reference ID |
Updating a Layer¶
To update layer data:
- Go to the layer in admin
- Upload a new file
- The old data will be replaced
Warning
Updating a layer replaces all existing features. Consider creating a new layer version instead.
Deleting a Layer¶
- Select the layer(s) in the admin list
- Choose "Delete selected layers" from the action dropdown
- Confirm deletion
Danger
Layer deletion is permanent and cannot be undone.
Tile Serving¶
Vector Tiles (MVT)¶
Vector layers are served as Mapbox Vector Tiles:
Raster Tiles¶
Raster layers support multiple formats:
# PNG tiles
/api/v1/layer/{layer_id}/tile/{z}/{x}/{y}.png
# JPEG tiles
/api/v1/layer/{layer_id}/tile/{z}/{x}/{y}.jpg
PMTiles¶
For PMTiles layers, use the direct PMTile endpoint:
Layer Attributes¶
Viewing Attributes¶
Each vector layer has associated attributes that can be:
- Viewed in the admin interface
- Queried via the API
- Used for styling rules
Attribute Types¶
| Type | Description |
|---|---|
string |
Text values |
integer |
Whole numbers |
float |
Decimal numbers |
boolean |
True/False values |
date |
Date values |
datetime |
Date and time values |
Best Practices¶
- Use descriptive names: Choose clear, meaningful layer names
- Optimize data: Simplify geometries for web display
- Set appropriate zoom levels: Configure min/max zoom for performance
- Apply styles: Create styles to enhance visualization
- Document layers: Add descriptions and metadata