Manual/Reference

Field Sync

Field Sync connects a Field Collection layer to a GeoServer WFS. It loads the server’s full feature set into the collection layer, preserves unpublished local captures during refresh, and inserts those captures through WFS-T.

GeoServer requirements

  • WFS 2.0 with GetCapabilities, DescribeFeatureType, GetFeature, and transactional Insert enabled.
  • GeoJSON output from GetFeature in EPSG:4326.
  • A point, line, or polygon feature type. The plugin builds the collection form from non-geometry properties in DescribeFeatureType.
  • Browser access to the WFS endpoint, including CORS when it is on another origin. Credentials entered in the panel stay in memory and are not saved in the project.

Open Plugins → Field Sync, enter the WFS endpoint, discover its layers, then create a new collection layer or link an existing one. Refresh everyone’s features replaces the server-owned snapshot while keeping local unpublished features. Publish inserts only those local features and reloads the layer.

Photo service contract

WFS does not define binary attachment storage. Photo publishing is therefore an optional, separate boundary. Configure both a photo upload URL and a string property from the WFS feature type.

The plugin sends one multipart/form-data request per image:

  • file: the image bytes and original filename
  • photoId: the stable id assigned during capture
  • typeName: the WFS feature type, such as survey:trees

The service returns:

{ "url": "https://assets.example/field/photo-a.jpg" }

After all photos succeed, the WFS property receives a JSON string containing the returned URL array. The upload service should treat photoId as an idempotency key, because a later WFS failure may cause the client to retry the photo step.

GeoServer Basic credentials are never forwarded to the photo URL. Deployments that protect the photo service should use a same-origin authenticated gateway or another service-owned browser session.

Field Collection accepts up to ten photos and 10 MB of encoded photo data per feature, with a 2 MB encoded limit per photo. Until both photo settings exist, a photo-bearing feature remains pending instead of sending inline base64 data to GeoServer.