Overview
GeoServer's layer engine supports dynamic rendering, spatial filtering, and multi-format data ingestion. Each layer is bound to a data store and exposed via standard OGC protocols (WMS, WFS, WCS, and WMTS). Proper layer configuration is critical for query performance and rendering latency.
Supported Layer Types
GeoServer v4 supports four primary layer categories, each optimized for specific use cases and rendering pipelines:
| Type | Use Case | Protocols | Performance |
|---|---|---|---|
| Vector | Boundaries, infrastructure, points of interest | WFS, GeoJSON, TopoJSON | Fast with spatial index |
| Raster | Satellite imagery, DEM, terrain analysis | WMS, WCS, WMTS | Optimized with overviews |
| Real-time | IoT sensors, tracking, live feeds | WFS-T, WebSocket, MQTT | Sub-second with streaming |
| 3D/Terrain | Mesh data, elevation models, BIM | 3D Tiles, I3S, glTF | GPU-accelerated rendering |
Data Format Matrix
Supported ingestion and export formats. Read/write capabilities vary by plugin and storage backend.
| Format | Read | Write | Notes |
|---|---|---|---|
| GeoPackage | ✓ | ✓ | Recommended default for mobile & web |
| GeoTIFF / COG | ✓ | ✓ | Cloud-optimized tiles required for S3/GCS |
| PostGIS / SpatiaLite | ✓ | ✓ | ACID compliance, complex queries |
| Shapefile | ✓ | ✓ | Legacy support, limited encoding |
| GeoJSON / TopoJSON | ✓ | ✓ | Lightweight, streaming friendly |
| Parquet / GeoParquet | ✓ | ✓ | Columnar storage, analytics optimized |
Performance & Caching
Layer performance depends on data structure, indexing strategy, and cache configuration. Follow these guidelines to minimize render latency:
- Enable tile caching (GeoWebCache) for static or semi-static layers
- Use spatial indexes (GiST/RTree) on vector feature classes
- Apply pyramids/overviews to raster datasets before ingestion
- Limit feature count per request using BBOX and SRS constraints
- Configure async rendering for high-concurrency environments
Configuration Example
Below is a minimal layer configuration block for a vector dataset with caching and SRS projection enabled:
{
"layer_id": "us_census_tracts_v4",
"type": "vector",
"data_store": {
"provider": "postgis",
"connection": "postgresql://geo-db:5432/census_db",
"table": "tracts_2020"
},
"rendering": {
"srs": "EPSG:3857",
"native_bbox": [-179.15, 24.96, -66.96, 49.38],
"styles": ["default_poly", "population_gradient"]
},
"cache": {
"enabled": true,
"tile_size": 256,
"min_zoom": 3,
"max_zoom": 18,
"gridsets": ["EPSG:900913"]
},
"query": {
"max_features": 5000,
"index_enabled": true,
"async_render": true
}
}
Apply this configuration via the REST API or Admin Console. The layer will automatically generate tile seeds and expose WMS/WFS endpoints.
Frequently Asked Questions
How do I migrate legacy layers to v4?
Use the geoserver migrate CLI tool. It validates schemas, updates SRS references, and regenerates tile caches automatically.
Can I serve real-time vector updates?
Yes. Enable WFS-T transactions or use the WebSocket streaming plugin. Ensure your backend supports concurrent writes and index locking.
What's the maximum supported file size?
Vector: Limited by database constraints. Raster: COG files up to 50GB are supported with chunked streaming. Always use cloud-optimized formats for large datasets.