Documentation → How-to guides
Import data from a service
A lot of public spatial data is published through an ArcGIS REST or WFS endpoint rather than as a file. mapbench can fetch from these endpoints directly, so you don't need to download a Shapefile, unzip it and upload it again. It can also fetch again later to pick up changes the publisher has made.
Before you start
- You need the service URL. For ArcGIS, that is a layer URL such as
…/FeatureServer/3or…/MapServer/3, or the service root ending in/FeatureServer. For WFS, it is the base endpoint you would callGetCapabilitieson. - The service must be on the public internet and must not require a sign-in. mapbench doesn't send any credentials, and it won't fetch from private or internal addresses.
Import one ArcGIS layer
- Open Datasets → New → From ArcGIS.
- Paste the URL and choose Load layers. mapbench reads the service's metadata and lists the layers it publishes.
- Pick the layer you want. The name and layer name are filled in from the service. You can change the display Name, but choose the Layer name carefully: it is stored in the tiles and can't be changed later.
- Choose Fetch & Queue.
The dataset then queues and tiles like any other, and its status changes to Ready when it's done. If you paste a layer URL, mapbench skips the layer list and loads that layer.
Import a whole ArcGIS service
Paste the service root instead of a layer URL, and mapbench lists all the feature layers in the service with a checkbox next to each. Select the ones you want and import them together. Each layer becomes a separate dataset, named from the service, and the new datasets are put in a folder together.
There is a limit on how many layers you can import at once. If a service has more layers than that, mapbench refuses the import instead of queuing hundreds of tiling jobs. Formats, limits and quotas gives the limit for this deployment. If you reach it, import the layers in batches.
Import from WFS
- Open Datasets → New → From WFS.
- Paste the base endpoint URL (rather than a full
GetFeaturerequest) and load its capabilities. - Pick a feature type from the list, name it, and choose Fetch & Queue.
If you paste an ArcGIS URL into the WFS box, mapbench recognises it, switches to From ArcGIS and loads it there.
Attribution from ArcGIS layers
When you import an ArcGIS layer, mapbench reads its copyrightText and
copies it into the dataset's attribution. That way any credit you
are required to show is recorded before you build on the data. mapbench only fills
in attribution that is empty, so a reimport won't overwrite anything you typed.
WFS has no equivalent field. For WFS imports, and for uploaded files, record the attribution and licence yourself under Edit dataset. The share page shows the credit in three places, but it can only show a credit you've entered.
Refreshing an imported dataset
Choose Reprocess in the processing panel, or Save & Reprocess in Edit dataset. For a dataset imported from a service, this fetches the data from the source again and rebuilds the tiles in place.
The dataset keeps its id and styling, and it stays in any maps that use it. Published share links keep working and show the new data. Reprocessing never runs on a schedule; it happens only when you start it.
Already-tiled PMTiles cannot be reprocessed. The file you uploaded is itself the tiles, so there is no source to fetch again. Upload a new file instead.
Importing part of a layer
You can import a subset of a large ArcGIS layer instead of the whole thing, using an attribute filter, a selection of fields, a bounding box, or a maximum number of features. You can also change these filters later and fetch the data again in place, so you can fix a wrongly filtered dataset without creating a new one.
These options aren't in the web form. They are available through the API and to
a connected agent: for example, ask Claude to "import only the features where
STATUS = 'Active'". See
Connect Claude to mapbench.
When an import fails
- “Not a feature layer”
- The URL points to a service root, a map image layer or a raster. mapbench imports vector feature layers. Load the service root and pick a layer from the list instead of guessing the URL.
- The service answered with an error
- mapbench reports these two cases separately. If the message says your URL is wrong, fix the URL. If it says the service is unreachable or returned an error, the problem is on the publisher's side, so try again later rather than trying other variations of the URL.
- “Response too large”
- The service's metadata response was larger than mapbench will read. This usually happens with a service root that lists a very large number of layers. Use a specific layer URL instead.
- The import worked but the dataset is empty
- Check the layer in the publisher's own viewer. If a layer is filtered to show nothing, or the service behind it is broken, the import succeeds with zero features. mapbench tiles whatever the service returns.
- It refuses to fetch my internal URL
- mapbench won't fetch private, loopback or link-local addresses, and this can't be changed for individual users. Without this rule, someone could use mapbench to read data from the server's own network. Publish the data somewhere public, or upload it as a file.
See also
- Your first map: from upload to a published map.
- Formats, limits and quotas: the limits mentioned on this page.
- Query and model data with SQL: working with the layers once you've imported them.