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.

Note: Layer indexing is automatically generated for vector data. Raster datasets benefit from pyramiding and cloud-optimized formats like COG. Always enable tile caching for high-traffic workloads.

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
GeoPackageRecommended default for mobile & web
GeoTIFF / COGCloud-optimized tiles required for S3/GCS
PostGIS / SpatiaLiteACID compliance, complex queries
ShapefileLegacy support, limited encoding
GeoJSON / TopoJSONLightweight, streaming friendly
Parquet / GeoParquetColumnar 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
Warning: Disabling caching on frequently accessed layers may cause backend database overload. Always monitor query execution time and connection pooling.

Configuration Example

Below is a minimal layer configuration block for a vector dataset with caching and SRS projection enabled:

layer-config.json
{
  "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.