# Fryslân Province geoportal (ArcGIS REST)

The ArcGIS server of the province of Fryslân, with services in the root and in the folders Themas, ProvinciaalGeoRegister, GOG and Basemaps. On 16 October 2026 our index held 563 layers, together almost 9 million features. They include large survey files (3,646,306 water depth measurements in lakes, 2019 to 2021), the nature management plans per year since 2019, nitrogen deposition per hexagon and 6,694 buildings from the inventory of recent architecture (1850-1940). About one in ten layers is also in the National Georegister.

- Publisher: Provincie Fryslân
- Area: Netherlands · Finest detail: feature (province of Fryslân)
- Period: actuele stand, plus jaargangen (Natuurbeheerplannen 2019 – 2026) · Refreshed: yearly
- Access: Open · Licence: niet vastgesteld
- Join keys: map/dienst + laagnaam, OBJECTID, vaarwegnummer en profielnummer (waterdieptemetingen), RD-coördinaten (EPSG:28992)
- Status: grijs · 39 diensten in 7 mappen · ArcGIS 11.5
- URL: https://geoportaal.fryslan.nl/arcgis/rest/services

## What can you do with it?
- **How deep is the lake?.** Waterdieptemetingen meren (folder Themas, service water) has 3,646,306 survey points with depth relative to NAP and a survey date between January 2019 and September 2021. Fetch one lake and draw a depth map.
- **Heritage from 1850-1940.** The layer Jongere bouwkunst 1850-1940 (Provincial GeoRegister) has 6,694 buildings and objects with function, date and address; over half are houses.
- **Nature management over the years.** The natuurbeheerplannen service has the management area, ambition and search areas per year (2019 to 2025); the Provincial GeoRegister already has 2026. Compare years to see where nature was added.

## How to process it
1. **Browse by folder.** Themas has one service per theme (general, soil, cultural history, agriculture, environment, nature, water …), each with dozens of layers.
   `https://geoportaal.fryslan.nl/arcgis/rest/services/Themas?f=json`
2. **Fetch features as GeoJSON.** Filter with where and request degrees with outSR=4326. maxRecordCount differs per layer (1,000 to 20,000).
   `https://geoportaal.fryslan.nl/arcgis/rest/services/ProvinciaalGeoRegister/PGR2/MapServer/80/query?where=PLAATS%3D%27Leeuwarden%27&outFields=NAAM,FUNCTIE,DATERING,STRAAT&outSR=4326&resultRecordCount=5&f=geojson`
3. **Count per category.** Statistics work; one call returns the number of buildings per main category.
   `https://geoportaal.fryslan.nl/arcgis/rest/services/ProvinciaalGeoRegister/PGR2/MapServer/80/query?where=1%3D1&outStatistics=%5B%7B%22statisticType%22%3A%22count%22%2C%22onStatisticField%22%3A%22OBJECTID%22%2C%22outStatisticFieldName%22%3A%22n%22%7D%5D&groupByFieldsForStatistics=HOOFDCAT&f=json`
4. **Large layers in chunks.** With millions of points (water depth), filter on a waterway or area first and page with resultOffset; only request the fields you need.
   `https://geoportaal.fryslan.nl/arcgis/rest/services/Themas/water/MapServer/53/query?where=1%3D1&outFields=diepteNAP,peildatum,vaarwegnr&returnGeometry=false&orderByFields=OBJECTID&resultOffset=0&resultRecordCount=5&f=json`

## Interesting combinations
- Which soil sites are there in Fryslân? → [bodemloket](https://www.opendataindex.nl/en/bron/bodemloket.md) via locatiecode. The Bodematlas on this server shows information from the Bodemloket per site; the national source has the current state.
- Habitat types per Natura 2000 site → [natura2000](https://www.opendataindex.nl/en/bron/natura2000.md) via geometrie. The layer Natura 2000 Habitattypen (folder Themas, service natuur) gives habitat type and quality per polygon; aggregate per site.

## Similar sources
- [data-overheid](https://www.opendataindex.nl/en/bron/data-overheid.md): Fryslân lists 88 datasets on data.overheid.nl, all public domain, and as many records in the NGR.
- [geoservices-noord-holland](https://www.opendataindex.nl/en/bron/geoservices-noord-holland.md): A larger provincial ArcGIS server, with the same kind of yearly nature management plans.

## What to watch out for
- **Licence not established.** The server says nothing about reuse. Fryslân publishes on data.overheid.nl and in the NGR as public domain, but that is not stated with the layers here.
- **Some layers are for internal use.** The metadata of the asbestos roofs layer (533,994 polygons, 2019 inventory) says 'for internal use only', while the layer can be queried publicly. Read the metadata before publishing anything.
- **Metadata links do not always work.** Many layers only have 'Bekijk metadata' with a link as description; the one for the water depth measurements returned 404 (16 Oct 2026).
- **Duplicate layers and yearly versions.** AFS and AFS_WGS hold the same layers in two projections; nature management plans sit side by side per year. Choose deliberately; layers carry no dates.

## API (ArcGIS REST)

- Base: https://geoportaal.fryslan.nl/arcgis/rest/services
- Access: No key or token: the directory and all calls below worked anonymously. (tested)
- Formats: json, geojson, pbf, png (export, WMS), xml/geojson (WFS)
- Size: 581 leaf layers in 39 queryable services (492 unique names), plus 19 raster layers (tested)
- Filtering: SQL-like where clause on the layer's fields, plus an optional spatial filter (geometry). Group and count with outStatistics.; =, <>, >, >=, <, <=, LIKE, IN, IS NULL, BETWEEN, AND, OR, NOT

### Endpoints
- `GET ?f=json`: Directory: version, folders and services (name + type).
- `GET /{map}?f=json`: Services in one folder.
- `GET /{dienst}/MapServer?f=json`: Service: layers and tables (id, name, group layer or not), maxRecordCount, capabilities, projection, description.
- `GET /{dienst}/MapServer/{laag}?f=json`: Layer: fields (name, type, alias, length), geometry type, maxRecordCount, supportedQueryFormats and advancedQueryCapabilities (pagination, statistics, orderBy, distinct).
- `GET /{dienst}/MapServer/{laag}/query`: Query features with a where clause or spatial filter; also count (returnCountOnly) and group (outStatistics). Response in JSON, GeoJSON or PBF.
- `GET /{dienst}/MapServer/legend?f=json`: Legend per layer: labels and symbols (PNG as base64).
- `GET /{dienst}/MapServer/export?bbox=…&bboxSR=4326&size=600,400&format=png&f=image`: Map image as PNG for a rectangle; with f=json you get a link to the image. Without bbox: error 'bbox must be specified'.
- `GET https://geoportaal.fryslan.nl/arcgis/services/{map}/{dienst}/MapServer/WMSServer?request=GetCapabilities&service=WMS`: WMS 1.3.0 of the same MapServer: path without /rest/ and with /WMSServer. Only for services whose supportedExtensions lists WMSServer.
- `GET https://geoportaal.fryslan.nl/arcgis/services/{map}/{dienst}/MapServer/WFSServer?service=WFS&request=GetCapabilities`: WFS 2.0 of the same MapServer (only if supportedExtensions lists WFSServer); GetFeature with outputFormat=GEOJSON.

### Parameters
- `where`: Condition in SQL-92 style: 1=1 for everything, text in single quotes (GEMEENTE='Zwolle'), LIKE with %, AND/OR, dates as DATE 'YYYY-MM-DD'. Required when there is no other filter. (tested)
- `outFields`: Fields in the response, comma-separated, or * for all fields. (tested)
- `returnGeometry`: false = attributes only (much smaller response). (tested)
- `outSR`: Projection of the geometry in the response; 4326 = degrees (WGS84). Default is the layer's projection, here RD (28992). (tested)
- `f`: Format: json (Esri JSON), geojson, pbf (protobuf), pjson (indented) or html (browse in the browser). (tested)
- `resultOffset`: Pagination: number of features to skip (from 0). Use together with orderByFields for a stable order. (tested)
- `resultRecordCount`: Maximum number of features in this response (capped at the layer's maxRecordCount). (tested)
- `orderByFields`: Sort order, e.g. 'OBJECTID' or 'n DESC' (also on a statistics field). (tested)
- `returnCountOnly`: true = only the number of features matching where: {"count": …}. (tested)
- `outStatistics`: Server-side statistics: list of {statisticType, onStatisticField, outStatisticFieldName}; statisticType count, sum, min, max, avg, stddev or var. URL-encode it. (tested)
- `groupByFieldsForStatistics`: Fields to group by with outStatistics (like GROUP BY). (tested)
- `returnDistinctValues`: true with outFields and returnGeometry=false: the unique values of those fields. (tested)
- `geometry`: Spatial filter: a point 'x,y' or envelope 'xmin,ymin,xmax,ymax', with geometryType (esriGeometryPoint, esriGeometryEnvelope), inSR (input projection), spatialRel (esriSpatialRelIntersects) and optionally distance + units (esriSRUnit_Meter) for a radius. (platform)

### Fields of the example layer (12)
`OBJECTID` OID, `MIPCODE` String, `NAAM` String, `HOOFDCAT` String, `SUBCAT` String, `FUNCTIE` String, `DATERING` String, `STRAAT` String, `HUISNR` String, `POSTCODE` String, `PLAATS` String, `GEMEENTE` String

### Limits and pitfalls
- At most 2.000 features per response (the layer's maxRecordCount; varies per layer, see /{layer}?f=json). If there are more, the response has exceededTransferLimit: true: fetch the rest with resultOffset and resultRecordCount. (tested)
- No key and no documented rate limit. Take it easy (a few requests per second) and prefer statistics or counts over fetching all features. (experience)
- Errors come back with HTTP 200 and a JSON object {"error": {"code": 400, …}} ('Failed to execute query.' for an unknown field in where). Always check for an error field, not just the status code. (tested)
- Besides the REST API, PGR2 also has a WFS 2.0 with 81 feature types (PGR:…). Type names differ from layer names: 'Jongere bouwkunst 1850-1940' is PGR:Jongere_bouwkunst_1850-1940. outputFormat=GEOJSON works. (tested)
- Accented characters are broken in the data itself: FUNCTIE 'café' is stored as 'caf¿', the same in REST and WFS. (tested)
- The asbestos roofs layer (533,994 polygons) can be queried publicly, but the metadata says 'For internal use only'. Read the layer description before publishing; layer descriptions often only say ' Bekijk metadata '. (experience)
- Group layers (with subLayerIds) have no query; query the leaf layers below them. Raster layers have no fields and no count. (platform)
- The server gives no modification date per service or layer (no editingInfo). How current a layer is, is not stated. (tested)
- maxRecordCount differs per service (1,000 to 20,000); three services only support f=json. (experience)

### Example
```
https://geoportaal.fryslan.nl/arcgis/rest/services/ProvinciaalGeoRegister/PGR2/MapServer/80/query?where=1%3D1&outStatistics=%5B%7B%22statisticType%22%3A%22count%22%2C%22onStatisticField%22%3A%22OBJECTID%22%2C%22outStatisticFieldName%22%3A%22n%22%7D%5D&groupByFieldsForStatistics=HOOFDCAT&orderByFields=n%20DESC&f=json
```

## How to fetch it

### curl
```bash
curl "https://geoportaal.fryslan.nl/arcgis/rest/services/ProvinciaalGeoRegister/PGR2/MapServer/80/query?where=PLAATS%3D%27Sneek%27&outFields=NAAM,FUNCTIE,DATERING&outSR=4326&f=geojson"
```

### python
```python
import requests

laag = "https://geoportaal.fryslan.nl/arcgis/rest/services/ProvinciaalGeoRegister/PGR2/MapServer/80/query"
r = requests.get(laag, params={"where": "PLAATS='Leeuwarden'", "outFields": "FUNCTIE,DATERING,STRAAT",
                               "returnGeometry": "false", "f": "json"})
for f in r.json()["features"][:10]:
    a = f["attributes"]
    print(a["DATERING"], a["FUNCTIE"], a["STRAAT"])
```

## Who uses it
- [Nationaal Georegister](https://www.nationaalgeoregister.nl): Metadata for some of these layers (86 NGR records mention this server)


## What is in it: 563 map layers

All services and layers on this ArcGIS server, fetched every night. Every layer has its own page with fields, geometry and a query call.

- Kinds: kaartlaag 538, raster 19, tabel 6
- With an API call on the dataset page: 563
- Search: https://www.opendataindex.nl/api/catalogus/arcgis-fryslan?q=… or the MCP function zoek_datasets with herkomst=arcgis-fryslan
- Every row has its own page: https://www.opendataindex.nl/en/dataset/arcgis-fryslan/<key>

### Folders
- AFS (28)
- AFS WGS (28)
- Basemaps (3): luchtfoto (1), luchtfoto1950 (1), Map1 (1)
- Bodematlas (45)
- CHK2 (42)
- Circulair projecten (3)
- Elfstedentocht (5)
- friese klimaatatlas hitte (1)
- gebiedsontwikkeling (2)
- GOG (7): Map (7)
- gripOpGrond publiek (4)
- KernRegistratie Natuur Natuurontwikkeling (16)
- Map (2)
- natuurbeheerplannen (49)
- ProvinciaalGeoRegister (91): Map2 (9), PGR (82)
- Stikstof Aerius (7)
- Themas (209): Algemeen (5), bodem (7), Cultuurhistorie (3), Industrie (2), Maatschappij (10), Map (16), Map4 (56), Milieu (28) …
- vaarroutes wvdv (10)
- waddenfonds (1)
- WOO vegetatiekarteringen (10)

## Examples with real figures (1)

For each example the finding, the reference date and the call that fetches exactly these figures.

- **Recent architecture (1850-1940) in Fryslân by category: most houses and housing complexes (3,666 buildings and objects), then farms, mills and businesses and religious buildings** (november 2026). Table https://geoportaal.fryslan.nl/arcgis/rest/services/ProvinciaalGeoRegister/PGR2/MapServer/80. [Example](https://www.opendataindex.nl/en/voorbeeld/geoportaal-fryslan-jongere-bouwkunst)
  - `https://geoportaal.fryslan.nl/arcgis/rest/services/ProvinciaalGeoRegister/PGR2/MapServer/80/query?where=1%3D1&outStatistics=%5B%7B%22statisticType%22%3A%22count%22%2C%22onStatisticField%22%3A%22OBJECTID%22%2C%22outStatisticFieldName%22%3A%22n%22%7D%5D&groupByFieldsForStatistics=HOOFDCAT&orderByFields=n%20DESC&f=json`
  - `https://geoportaal.fryslan.nl/arcgis/rest/services/ProvinciaalGeoRegister/PGR2/MapServer/80/query?where=1%3D1&returnCountOnly=true&f=json`
