GeoCzech API
MapServer
Turn any data file on the web into a map service (WMS and WFS) — and show it in QGIS, Leaflet, OpenLayers or any GIS, without installing a map server.
What it does
MapServer reads a data file from a URL and serves it on the fly through the standard OGC interfaces:
- WMS — map images (PNG/JPEG) for any area and size, with a legend,
- WFS — the features themselves (GeoJSON, CSV, GML), with attributes,
- GetFeatureInfo — "what is here?" when someone clicks the map,
- SLD — your own colours and symbols.
It works with vector data (Shapefile, GeoPackage, GeoJSON, KML …) and rasters (GeoTIFF and more). Nothing is uploaded or pre-processed: MapServer fetches the file when the first map is requested and keeps it in a short-lived cache.
Typical uses
- Show a GeoTIFF or Shapefile from your storage as a layer in QGIS or ArcGIS.
- Add your data as an overlay to a web map (Leaflet, OpenLayers, MapLibre).
- Let users click on the map and see feature attributes.
- Provide a quick preview image of a dataset.
- Give partners a map service of your data without running GeoServer.
Preview
MapServer for API customers is in preview. Access is granted with a map key (see below); map keys are being rolled out. Map rendering is charged by rendering time — see Credits.
At a glance
- Map service:
https://maps.geoczech.dev/ - Access: a map key in the URL —
KEY=gcz_map_…(create one) - Protocols: WMS 1.3.0 (and 1.1.1), WFS 2.0.0, SLD 1.0/1.1
- Data: any public
http(s)URL of a vector or raster file (ZIP is fine) - Default map CRS:
EPSG:3857; also EPSG:4326, 5514, 4258, 32633, 32634 …
How it works
Every MapServer request is a plain GET URL. The URL says which file to show
(FILE_URL), what you want (SERVICE, REQUEST …) and carries your map key
(KEY), which says whose credits pay for the map.
https://maps.geoczech.dev/?KEY=gcz_map_…&FILE_URL=<your data>&SERVICE=WMS&REQUEST=GetMap&…
- Create a map key in the Console under Developers → API keys → Create map key and restrict it to your data (see below).
- Build the service URL:
https://maps.geoczech.dev/?KEY=<map key>&FILE_URL=<data URL>. - Use it in any WMS/WFS client — QGIS, a web map, your script. The URL keeps working until you rotate, pause or delete the key.
Map keys
A map key (it starts with gcz_map_) is a key made for map URLs. Unlike an API
key it is not secret — it is part of every map request, so anyone who sees your map
(or your QGIS project) can read it. That is why a map key:
- works only for MapServer — it cannot run any other API tool, and an API key
(
gcz_live_…) is never accepted in a map URL, - should be restricted so that a copied key is useless for anybody else:
| Restriction | What it does | Recommended |
|---|---|---|
| Allowed data URLs | MapServer renders only files whose FILE_URL starts with one of these prefixes, e.g. https://my-bucket.s3.eu-central-1.amazonaws.com/maps/ (a whole folder) or the URL of a single file. |
Yes, always. Without it, anyone with the key can render any data from the internet on your credits. |
| Monthly credit limit | The key stops working for the rest of the month after spending this many credits. | Yes. |
| Allowed domains | Only web maps on these domains can use the key (checked via Origin/Referer). |
For web maps. Desktop GIS sends no Referer — use a separate key for QGIS. |
| Allowed IP addresses | Only these addresses or ranges. | For QGIS in your office network or your own servers. |
| Expiry date | The key stops working after this date. | For temporary access. |
Map keys count towards the number of keys in your plan, together with API keys.
Sending the key: add KEY=<map key> to the URL (works in every client). Clients
that can set HTTP headers may send X-API-Key: <map key> instead. Desktop GIS can log
in with HTTP Basic — any user name and the map key as the password (in QGIS
Authentication → Basic); the key then stays out of the URL and the project file. A
request without a usable key answers HTTP 401 with WWW-Authenticate: Basic, so these
clients ask for the login.
Never put an API key into a map URL
API keys (gcz_live_…) are secret. MapServer rejects them with
secret_key_in_url — if that happens, rotate the API key in the Console, because it
may have ended up in logs or browser history.
Maps from the Map Viewer
A map saved in the MyGeodata Map Viewer can be published as a map service: one WMS (1.3.0 and 1.1.1) with all layers of the map, drawn with the map's styles, labels, opacity and scale limits. The owner gets its address in Share → Map service (WMS):
https://maps.geoczech.dev/m/<map service>/?KEY=gcz_map_…&SERVICE=WMS&REQUEST=GetCapabilities
- The first layer of the capabilities is the whole map; groups and layers of the map
follow under it.
LAYERSmay name any of them — a group or the whole map draws its visible layers in the map's order. GetMap(image/png,image/jpeg,image/webp,image/vnd.jpeg-png,image/vnd.jpeg-webp),GetLegendGraphicand — when the owner allows it —GetFeatureInfo(text/html,text/plain,application/json). NoFILE_URL, no WFS and no own styles: the service draws what the map shows.- The key must belong to the owner of the map and allow it (a key restricted to other
maps answers
map_service_not_allowed). The images are billed to the owner like any MapServer rendering. - The service follows the last saved version of the map; switched off it answers
map_service_disabled, an unknown addressmap_service_not_found(HTTP 404).
Access errors
When a request is not allowed, MapServer answers with an OGC ServiceExceptionReport
(XML) whose code tells you why — QGIS and web map libraries show it as the layer error.
| HTTP | code |
Meaning |
|---|---|---|
| 401 | missing_map_key |
No KEY in the URL. |
| 401 | invalid_api_key |
The key does not exist (typo? copied only part of it?). |
| 401 | api_key_expired, api_key_revoked, api_key_paused, api_key_rotated |
The key exists but is not active. |
| 403 | secret_key_in_url |
An API key was used instead of a map key — rotate that API key. |
| 403 | file_url_not_allowed |
FILE_URL is not within the key's allowed data URLs, or the key works only for published maps. |
| 403 | map_service_not_allowed |
The key belongs to another account than the published map, or it is restricted to other maps. |
| 404 | map_service_not_found, map_service_disabled |
The published map does not exist or its owner switched it off. |
| 403 | ip_not_allowed, domain_not_allowed |
The request comes from an address/page the key is not allowed for. |
| 403 | api_access_denied, account_inactive |
The plan has no API access, or the account is suspended. |
| 402 | insufficient_credits, api_key_monthly_limit |
No credits left, or the key reached its monthly limit. |
| 429 | rate_limited |
Too many requests at once — slow down. |
Changes made in the Console (pausing a key, new restrictions) take effect within about a minute.
An answer larger than the service can send (about 4.5 MB of image) is HTTP 413
response_too_large and costs no credits: ask for a smaller WIDTH / HEIGHT or a
smaller FORMAT (image/vnd.jpeg-webp, image/jpeg).
What is in the service? (GetCapabilities)
GetCapabilities returns an XML description of the service: the layer names,
their extent and the coordinate systems you can ask for. GIS programs call it
automatically when you add the service.
Layer names come from the file (or the layers inside it): only letters, digits
and underscores are kept, so st-helena-places.geojson becomes sthelenaplaces
and st-helena-dem.tif becomes sthelenadem. A GeoPackage with several layers gives
several WMS layers.
curl -G "https://maps.geoczech.dev/" \
--data-urlencode "FILE_URL=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson" \
--data-urlencode "KEY=YOUR_MAP_KEY" \
--data-urlencode "SERVICE=WMS" \
--data-urlencode "VERSION=1.3.0" \
--data-urlencode "REQUEST=GetCapabilities"
import requests
response = requests.get(
"https://maps.geoczech.dev/",
params={
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"KEY": "YOUR_MAP_KEY",
"SERVICE": "WMS",
"VERSION": "1.3.0",
"REQUEST": "GetCapabilities",
},
timeout=120,
)
response.raise_for_status()
print(response.text)
const url = new URL("https://maps.geoczech.dev/");
url.search = new URLSearchParams({
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"KEY": "YOUR_MAP_KEY",
"SERVICE": "WMS",
"VERSION": "1.3.0",
"REQUEST": "GetCapabilities",
});
const response = await fetch(url);
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.text());
<?php
$query = http_build_query([
"FILE_URL" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"KEY" => "YOUR_MAP_KEY",
"SERVICE" => "WMS",
"VERSION" => "1.3.0",
"REQUEST" => "GetCapabilities",
]);
$curl = curl_init("https://maps.geoczech.dev/" . "?" . $query);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
echo $response;
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
var query = new Dictionary<string, string>
{
["FILE_URL"] = "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
["KEY"] = "YOUR_MAP_KEY",
["SERVICE"] = "WMS",
["VERSION"] = "1.3.0",
["REQUEST"] = "GetCapabilities",
};
var url = "https://maps.geoczech.dev/?" + string.Join("&", query.Select(p => $"{p.Key}={Uri.EscapeDataString(p.Value)}"));
var response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
<WMS_Capabilities version="1.3.0" …>
<Capability>
<Layer>
<Name>geoczech_wms</Name>
<Layer queryable="1">
<Name>sthelenaplaces</Name>
<Title>st-helena-places</Title>
<EX_GeographicBoundingBox>
<westBoundLongitude>-5.772174</westBoundLongitude>
<eastBoundLongitude>-5.638883</eastBoundLongitude>
<southBoundLatitude>-16.008899</southBoundLatitude>
<northBoundLatitude>-15.906601</northBoundLatitude>
</EX_GeographicBoundingBox>
…
A map image (GetMap)
Ask for a picture of the map. If you leave out BBOX, MapServer shows the whole
dataset; WIDTH/HEIGHT default to 512 px (max. 4096).
Default styling: vector data that carry their own drawing style (KML/KMZ, MapInfo,
DXF, DGN, or an OGR_STYLE attribute in any format) are drawn with it; other vector
features in blue. Rasters with their own colour table are drawn in those colours,
RGB images in colour, single-band rasters (like elevation) in grey with automatic
contrast. No-data areas are transparent. The raster parameters below (BANDS,
STRETCH, RANGE, COLORMAP) change that without writing a style.
Query parameters
-
FILE_URLstring (URL) required -
The data file — public
http(s)URL within the key's allowed data URLs. -
KEYstring required -
Your map key (
gcz_map_…). Alternatively theX-API-Keyheader. -
SERVICEstring defaultWMS -
Allowed values:
WMS·WFS -
REQUESTstring defaultGetCapabilities -
Allowed values:
GetCapabilities·GetMap·GetFeatureInfo·GetLegendGraphic·GetFeature·DescribeFeatureType·DescribeData -
VERSIONstring default1.3.0 -
WMS
1.3.0(or1.1.1); WFS2.0.0. -
LAYERSstring -
Comma-separated layer names. All layers when left out.
-
CRSstring defaultEPSG:3857 -
Coordinate system of
BBOXand of the image (SRSin WMS 1.1.1). -
BBOXstring -
Area to show:
minX,minY,maxX,maxYinCRS. Calculated from the data when left out. Note: in WMS 1.3.0 withEPSG:4326the order isminLat,minLon,maxLat,maxLon. -
WIDTH, HEIGHTinteger (px) default512 -
Image size, max. 4096 × 4096.
-
FORMATstring defaultimage/png -
image/png— PNG with transparency, full colours. The default.image/png; mode=24bit— always the full-colour PNG.image/png; mode=8bit— PNG with a palette of 256 colours, transparency kept. About 60 % smaller for a vector map, but the colour of small symbols may shift.image/jpeg— JPEG, no transparency.image/vnd.jpeg-png— best for aerial images and scanned maps laid over a basemap: a JPEG when the whole image is opaque, a PNG as soon as any pixel is transparent (the edge of the raster, a rotated image, nodata). An opaque image is five to ten times smaller and comes faster;Content-Typeof the response says which of the two you got.image/webp— lossy WebP with transparency.image/vnd.jpeg-webp— the same JPEG for an opaque image, a WebP with transparency otherwise. Best for photos in a web map: a photo with a transparent edge is many times smaller as WebP than as PNG. Desktop GIS may not read WebP — useimage/vnd.jpeg-pngthere.
Allowed values:
image/png·image/png; mode=24bit·image/png; mode=8bit·image/jpeg·image/webp·image/vnd.jpeg-png·image/vnd.jpeg-webp -
TRANSPARENTboolean -
Transparent background (PNG only) — use
TRUEfor overlays.Allowed values:
TRUE·FALSE -
FILE_CRSstring -
Coordinate system of the data, when the file does not contain it (e.g.
EPSG:32730). -
BANDSstring -
Raster bands to draw: three numbers = red, green, blue (
BANDS=4,3,2for a false-colour satellite image), one number = that band in grey or with aCOLORMAP. -
STRETCHstring -
Contrast stretch of the drawn bands: two percentiles (
STRETCH=2,98),minmaxornone.GRAY_CLIP=low,highis the older name of the percentile form. -
RANGEstring -
Lowest and highest drawn value instead of a stretch computed from the data, e.g.
RANGE=0,2500. -
NODATAnumber -
Cell value drawn transparent — instead of (or in place of a missing) no-data value of the file, e.g.
NODATA=0for the black border of a scan. -
COLORMAPstring -
Colours of a single band: a name (
gray,terrain,viridis,magma,turbo,blues,greens,ylorrd,rdylgn,spectral) or your own stopsvalue:colour(COLORMAP=0:#2f7d4f,500:#f4e285,1000:#ffffff).
Advanced parameters (2)
-
FEATURE_STYLESstring -
offdraws vector layers with the default style even when the data carry their own.Allowed values:
off -
STYLES, BGCOLORstring -
Standard WMS parameters.
curl -G "https://maps.geoczech.dev/" \
--data-urlencode "FILE_URL=https://cdn.geoczech.dev/docs-samples/v1/st-helena-dem.tif" \
--data-urlencode "KEY=YOUR_MAP_KEY" \
--data-urlencode "SERVICE=WMS" \
--data-urlencode "VERSION=1.3.0" \
--data-urlencode "REQUEST=GetMap" \
--data-urlencode "LAYERS=sthelenadem" \
--data-urlencode "CRS=EPSG:3857" \
--data-urlencode "WIDTH=800" \
--data-urlencode "HEIGHT=600" \
--data-urlencode "FORMAT=image/png" \
-o terrain.png
import requests
response = requests.get(
"https://maps.geoczech.dev/",
params={
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-dem.tif",
"KEY": "YOUR_MAP_KEY",
"SERVICE": "WMS",
"VERSION": "1.3.0",
"REQUEST": "GetMap",
"LAYERS": "sthelenadem",
"CRS": "EPSG:3857",
"WIDTH": "800",
"HEIGHT": "600",
"FORMAT": "image/png",
},
timeout=120,
)
response.raise_for_status()
with open("terrain.png", "wb") as fh:
fh.write(response.content)
import { writeFile } from "node:fs/promises";
const url = new URL("https://maps.geoczech.dev/");
url.search = new URLSearchParams({
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-dem.tif",
"KEY": "YOUR_MAP_KEY",
"SERVICE": "WMS",
"VERSION": "1.3.0",
"REQUEST": "GetMap",
"LAYERS": "sthelenadem",
"CRS": "EPSG:3857",
"WIDTH": "800",
"HEIGHT": "600",
"FORMAT": "image/png",
});
const response = await fetch(url);
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
await writeFile("terrain.png", Buffer.from(await response.arrayBuffer()));
<?php
$query = http_build_query([
"FILE_URL" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-dem.tif",
"KEY" => "YOUR_MAP_KEY",
"SERVICE" => "WMS",
"VERSION" => "1.3.0",
"REQUEST" => "GetMap",
"LAYERS" => "sthelenadem",
"CRS" => "EPSG:3857",
"WIDTH" => "800",
"HEIGHT" => "600",
"FORMAT" => "image/png",
]);
$curl = curl_init("https://maps.geoczech.dev/" . "?" . $query);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
file_put_contents("terrain.png", $response);
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
var query = new Dictionary<string, string>
{
["FILE_URL"] = "https://cdn.geoczech.dev/docs-samples/v1/st-helena-dem.tif",
["KEY"] = "YOUR_MAP_KEY",
["SERVICE"] = "WMS",
["VERSION"] = "1.3.0",
["REQUEST"] = "GetMap",
["LAYERS"] = "sthelenadem",
["CRS"] = "EPSG:3857",
["WIDTH"] = "800",
["HEIGHT"] = "600",
["FORMAT"] = "image/png",
};
var url = "https://maps.geoczech.dev/?" + string.Join("&", query.Select(p => $"{p.Key}={Uri.EscapeDataString(p.Value)}"));
var response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
await File.WriteAllBytesAsync("terrain.png", await response.Content.ReadAsByteArrayAsync());
In QGIS and web maps
Any software that speaks WMS can show the layer. Use the service URL with your map
key as the address — https://maps.geoczech.dev/?KEY=<map key>&FILE_URL=<data URL>. The
capabilities returned by MapServer carry the key and the data URL, so the client sends
them with every map request automatically.
1. Layer → Add Layer → Add WMS/WMTS Layer…
2. Click "New", give the connection a name (e.g. "St Helena elevation")
and paste as the URL:
https://maps.geoczech.dev/?KEY=YOUR_MAP_KEY&FILE_URL=https://cdn.geoczech.dev/docs-samples/v1/st-helena-dem.tif
3. Click "Connect", select the layer "sthelenadem" and click "Add".
The connection keeps working until you rotate, pause or delete the map key.
Use a map key without a domain allowlist — QGIS sends no Referer.
<div id="map" style="height: 400px"></div>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script>
const map = L.map("map").setView([-15.96, -5.71], 12);
L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution: "© OpenStreetMap contributors",
}).addTo(map);
// A map key is meant for web pages — restrict it to your domain and data
// in the Console. Never put an API key (gcz_live_…) into a web page.
L.tileLayer.wms("https://maps.geoczech.dev/", {
layers: "sthelenaplaces",
format: "image/png",
transparent: true,
version: "1.3.0",
FILE_URL: "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
KEY: "YOUR_MAP_KEY",
}).addTo(map);
</script>
import Map from "ol/Map";
import View from "ol/View";
import TileLayer from "ol/layer/Tile";
import OSM from "ol/source/OSM";
import TileWMS from "ol/source/TileWMS";
import { fromLonLat } from "ol/proj";
new Map({
target: "map",
layers: [
new TileLayer({ source: new OSM() }),
new TileLayer({
source: new TileWMS({
url: "https://maps.geoczech.dev/",
params: {
LAYERS: "sthelenaplaces",
TRANSPARENT: true,
FILE_URL: "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
KEY: "YOUR_MAP_KEY",
},
}),
}),
],
view: new View({ center: fromLonLat([-5.71, -15.96]), zoom: 12 }),
});
Clicked feature info (GetFeatureInfo)
Returns the attributes of the features at a pixel of a map image — the request your
web map sends when a user clicks. I/J are the pixel coordinates in the image
described by BBOX, WIDTH and HEIGHT; INFO_FORMAT can be application/json,
text/html (default), text/plain or GML.
curl -G "https://maps.geoczech.dev/" \
--data-urlencode "FILE_URL=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip" \
--data-urlencode "KEY=YOUR_MAP_KEY" \
--data-urlencode "SERVICE=WMS" \
--data-urlencode "VERSION=1.3.0" \
--data-urlencode "REQUEST=GetFeatureInfo" \
--data-urlencode "LAYERS=sthelenaplacesutm" \
--data-urlencode "QUERY_LAYERS=sthelenaplacesutm" \
--data-urlencode "CRS=EPSG:3857" \
--data-urlencode "BBOX=-637312,-1797355,-635312,-1795355" \
--data-urlencode "WIDTH=500" \
--data-urlencode "HEIGHT=500" \
--data-urlencode "I=250" \
--data-urlencode "J=250" \
--data-urlencode "INFO_FORMAT=application/json"
import requests
response = requests.get(
"https://maps.geoczech.dev/",
params={
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip",
"KEY": "YOUR_MAP_KEY",
"SERVICE": "WMS",
"VERSION": "1.3.0",
"REQUEST": "GetFeatureInfo",
"LAYERS": "sthelenaplacesutm",
"QUERY_LAYERS": "sthelenaplacesutm",
"CRS": "EPSG:3857",
"BBOX": "-637312,-1797355,-635312,-1795355",
"WIDTH": "500",
"HEIGHT": "500",
"I": "250",
"J": "250",
"INFO_FORMAT": "application/json",
},
timeout=120,
)
response.raise_for_status()
print(response.json())
const url = new URL("https://maps.geoczech.dev/");
url.search = new URLSearchParams({
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip",
"KEY": "YOUR_MAP_KEY",
"SERVICE": "WMS",
"VERSION": "1.3.0",
"REQUEST": "GetFeatureInfo",
"LAYERS": "sthelenaplacesutm",
"QUERY_LAYERS": "sthelenaplacesutm",
"CRS": "EPSG:3857",
"BBOX": "-637312,-1797355,-635312,-1795355",
"WIDTH": "500",
"HEIGHT": "500",
"I": "250",
"J": "250",
"INFO_FORMAT": "application/json",
});
const response = await fetch(url);
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
<?php
$query = http_build_query([
"FILE_URL" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip",
"KEY" => "YOUR_MAP_KEY",
"SERVICE" => "WMS",
"VERSION" => "1.3.0",
"REQUEST" => "GetFeatureInfo",
"LAYERS" => "sthelenaplacesutm",
"QUERY_LAYERS" => "sthelenaplacesutm",
"CRS" => "EPSG:3857",
"BBOX" => "-637312,-1797355,-635312,-1795355",
"WIDTH" => "500",
"HEIGHT" => "500",
"I" => "250",
"J" => "250",
"INFO_FORMAT" => "application/json",
]);
$curl = curl_init("https://maps.geoczech.dev/" . "?" . $query);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
print_r(json_decode($response, true));
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
var query = new Dictionary<string, string>
{
["FILE_URL"] = "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip",
["KEY"] = "YOUR_MAP_KEY",
["SERVICE"] = "WMS",
["VERSION"] = "1.3.0",
["REQUEST"] = "GetFeatureInfo",
["LAYERS"] = "sthelenaplacesutm",
["QUERY_LAYERS"] = "sthelenaplacesutm",
["CRS"] = "EPSG:3857",
["BBOX"] = "-637312,-1797355,-635312,-1795355",
["WIDTH"] = "500",
["HEIGHT"] = "500",
["I"] = "250",
["J"] = "250",
["INFO_FORMAT"] = "application/json",
};
var url = "https://maps.geoczech.dev/?" + string.Join("&", query.Select(p => $"{p.Key}={Uri.EscapeDataString(p.Value)}"));
var response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"type": "FeatureCollection",
"name": "sthelenaplacesutm",
"features": [
{"type": "Feature",
"properties": {"id": "10", "name": "Jamestown", "category": "town", "kind": "settlement", "elevation": "36"},
"geometry": {"type": "Point", "coordinates": [-636311.919, -1796354.959]}}
]
}
Legend (GetLegendGraphic)
A small image with the symbols of a layer — use LAYER (singular) and the same
SLD/SLD_BODY as for the map, if you use a custom style.
curl -G "https://maps.geoczech.dev/" \
--data-urlencode "FILE_URL=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson" \
--data-urlencode "KEY=YOUR_MAP_KEY" \
--data-urlencode "SERVICE=WMS" \
--data-urlencode "VERSION=1.3.0" \
--data-urlencode "REQUEST=GetLegendGraphic" \
--data-urlencode "LAYER=sthelenaplaces" \
--data-urlencode "FORMAT=image/png" \
-o legend.png
import requests
response = requests.get(
"https://maps.geoczech.dev/",
params={
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"KEY": "YOUR_MAP_KEY",
"SERVICE": "WMS",
"VERSION": "1.3.0",
"REQUEST": "GetLegendGraphic",
"LAYER": "sthelenaplaces",
"FORMAT": "image/png",
},
timeout=120,
)
response.raise_for_status()
with open("legend.png", "wb") as fh:
fh.write(response.content)
import { writeFile } from "node:fs/promises";
const url = new URL("https://maps.geoczech.dev/");
url.search = new URLSearchParams({
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"KEY": "YOUR_MAP_KEY",
"SERVICE": "WMS",
"VERSION": "1.3.0",
"REQUEST": "GetLegendGraphic",
"LAYER": "sthelenaplaces",
"FORMAT": "image/png",
});
const response = await fetch(url);
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
await writeFile("legend.png", Buffer.from(await response.arrayBuffer()));
<?php
$query = http_build_query([
"FILE_URL" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"KEY" => "YOUR_MAP_KEY",
"SERVICE" => "WMS",
"VERSION" => "1.3.0",
"REQUEST" => "GetLegendGraphic",
"LAYER" => "sthelenaplaces",
"FORMAT" => "image/png",
]);
$curl = curl_init("https://maps.geoczech.dev/" . "?" . $query);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
file_put_contents("legend.png", $response);
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
var query = new Dictionary<string, string>
{
["FILE_URL"] = "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
["KEY"] = "YOUR_MAP_KEY",
["SERVICE"] = "WMS",
["VERSION"] = "1.3.0",
["REQUEST"] = "GetLegendGraphic",
["LAYER"] = "sthelenaplaces",
["FORMAT"] = "image/png",
};
var url = "https://maps.geoczech.dev/?" + string.Join("&", query.Select(p => $"{p.Key}={Uri.EscapeDataString(p.Value)}"));
var response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
await File.WriteAllBytesAsync("legend.png", await response.Content.ReadAsByteArrayAsync());
What is in the file (DescribeData)
REQUEST=DescribeData returns one JSON document about the file — handy when you
build your own layer list, legend or style editor:
layersin drawing order, each with itsname(use it inLAYERS),title,kind(vector/raster), geometry, attributes (fields),featureCount,extent(longitude/latitude) and coordinate system,- for vector layers
featureStyles— whether the data carry their own drawing style and its legend — andsuggestedStyle, a ready-made style proposal when the kind of data is obvious (water, forests, contours, roads…), - for rasters the
bands, the colourpaletteandrendering— how the raster is drawn with theBANDS/STRETCH/RANGE/COLORMAPyou send along, performance— roughly how long one redraw takes (expectedSeconds) and, when the format itself is what makes it slow, anadviceto convert the data (for example a large GeoJSON to FlatGeobuf).
No SERVICE parameter is needed; FILE_URL and KEY work as everywhere else.
curl -G "https://maps.geoczech.dev/" \
--data-urlencode "FILE_URL=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson" \
--data-urlencode "KEY=YOUR_MAP_KEY" \
--data-urlencode "REQUEST=DescribeData"
import requests
response = requests.get(
"https://maps.geoczech.dev/",
params={
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"KEY": "YOUR_MAP_KEY",
"REQUEST": "DescribeData",
},
timeout=120,
)
response.raise_for_status()
print(response.json())
const url = new URL("https://maps.geoczech.dev/");
url.search = new URLSearchParams({
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"KEY": "YOUR_MAP_KEY",
"REQUEST": "DescribeData",
});
const response = await fetch(url);
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
<?php
$query = http_build_query([
"FILE_URL" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"KEY" => "YOUR_MAP_KEY",
"REQUEST" => "DescribeData",
]);
$curl = curl_init("https://maps.geoczech.dev/" . "?" . $query);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
print_r(json_decode($response, true));
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
var query = new Dictionary<string, string>
{
["FILE_URL"] = "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
["KEY"] = "YOUR_MAP_KEY",
["REQUEST"] = "DescribeData",
};
var url = "https://maps.geoczech.dev/?" + string.Join("&", query.Select(p => $"{p.Key}={Uri.EscapeDataString(p.Value)}"));
var response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"version": 1,
"extent": [-5.7721743, -16.008899, -5.638883, -15.906601],
"layers": [
{
"name": "sthelenaplaces",
"title": "st-helena-places",
"kind": "vector",
"geometry": "point",
"featureCount": 58,
"fields": [{"name": "name", "type": "String"}, …],
"extent": [-5.7721743, -16.008899, -5.638883, -15.906601],
"crs": "EPSG:4326",
"featureStyles": null,
"suggestedStyle": null
}
],
"skipped": [],
"performance": {"expectedSeconds": 0.07, "readSeconds": 0.0, "rating": "fast", …}
}
The data itself (WFS)
With SERVICE=WFS you get the features instead of a picture — for example as
GeoJSON to draw them yourself in a web map, or to download a subset of the data.
| Parameter | Meaning |
|---|---|
TYPENAMES |
Layer name (from GetCapabilities). |
OUTPUTFORMAT |
geojson (default), csv (geometry as WKT) or gml. |
COUNT |
Maximum number of features. |
SRSNAME |
Coordinate system of the returned geometries. |
BBOX |
Only features in this area. |
curl -G "https://maps.geoczech.dev/" \
--data-urlencode "FILE_URL=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip" \
--data-urlencode "KEY=YOUR_MAP_KEY" \
--data-urlencode "SERVICE=WFS" \
--data-urlencode "VERSION=2.0.0" \
--data-urlencode "REQUEST=GetFeature" \
--data-urlencode "TYPENAMES=sthelenaplacesutm" \
--data-urlencode "OUTPUTFORMAT=geojson" \
--data-urlencode "COUNT=2"
import requests
response = requests.get(
"https://maps.geoczech.dev/",
params={
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip",
"KEY": "YOUR_MAP_KEY",
"SERVICE": "WFS",
"VERSION": "2.0.0",
"REQUEST": "GetFeature",
"TYPENAMES": "sthelenaplacesutm",
"OUTPUTFORMAT": "geojson",
"COUNT": "2",
},
timeout=120,
)
response.raise_for_status()
print(response.json())
const url = new URL("https://maps.geoczech.dev/");
url.search = new URLSearchParams({
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip",
"KEY": "YOUR_MAP_KEY",
"SERVICE": "WFS",
"VERSION": "2.0.0",
"REQUEST": "GetFeature",
"TYPENAMES": "sthelenaplacesutm",
"OUTPUTFORMAT": "geojson",
"COUNT": "2",
});
const response = await fetch(url);
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
<?php
$query = http_build_query([
"FILE_URL" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip",
"KEY" => "YOUR_MAP_KEY",
"SERVICE" => "WFS",
"VERSION" => "2.0.0",
"REQUEST" => "GetFeature",
"TYPENAMES" => "sthelenaplacesutm",
"OUTPUTFORMAT" => "geojson",
"COUNT" => "2",
]);
$curl = curl_init("https://maps.geoczech.dev/" . "?" . $query);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
print_r(json_decode($response, true));
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
var query = new Dictionary<string, string>
{
["FILE_URL"] = "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip",
["KEY"] = "YOUR_MAP_KEY",
["SERVICE"] = "WFS",
["VERSION"] = "2.0.0",
["REQUEST"] = "GetFeature",
["TYPENAMES"] = "sthelenaplacesutm",
["OUTPUTFORMAT"] = "geojson",
["COUNT"] = "2",
};
var url = "https://maps.geoczech.dev/?" + string.Join("&", query.Select(p => $"{p.Key}={Uri.EscapeDataString(p.Value)}"));
var response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"type": "FeatureCollection",
"name": "sthelenaplacesutm",
"features": [
{"type": "Feature", "properties": {"id": "1", "name": "Bluemans Field", "category": "hamlet", "kind": "settlement", "elevation": "551"},
"geometry": {"type": "Point", "coordinates": [-5.735501, -15.956658]}},
{"type": "Feature", "properties": {"id": "2", "name": "Bottom Woods", "category": "hamlet", "kind": "settlement", "elevation": "455"},
"geometry": {"type": "Point", "coordinates": [-5.671312, -15.944942]}}
]
}
Your own style (SLD)
Pass a style as SLD (Styled Layer Descriptor, an XML standard that QGIS can
export): either a link to an .sld file in SLD, or the XML itself (URL-encoded)
in SLD_BODY. The NamedLayer/Name in the SLD must match the layer name.
curl -G "https://maps.geoczech.dev/" \
--data-urlencode "FILE_URL=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson" \
--data-urlencode "KEY=YOUR_MAP_KEY" \
--data-urlencode "SERVICE=WMS" \
--data-urlencode "VERSION=1.3.0" \
--data-urlencode "REQUEST=GetMap" \
--data-urlencode "LAYERS=sthelenaplaces" \
--data-urlencode "CRS=EPSG:3857" \
--data-urlencode "WIDTH=800" \
--data-urlencode "HEIGHT=600" \
--data-urlencode "FORMAT=image/png" \
--data-urlencode "TRANSPARENT=TRUE" \
--data-urlencode "SLD_BODY=<StyledLayerDescriptor version=\"1.0.0\" xmlns=\"http://www.opengis.net/sld\" xmlns:ogc=\"http://www.opengis.net/ogc\"><NamedLayer><Name>sthelenaplaces</Name><UserStyle><FeatureTypeStyle><Rule><PointSymbolizer><Graphic><Mark><WellKnownName>circle</WellKnownName><Fill><CssParameter name=\"fill\">#d7263d</CssParameter></Fill></Mark><Size>12</Size></Graphic></PointSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>" \
-o red-points.png
import requests
response = requests.get(
"https://maps.geoczech.dev/",
params={
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"KEY": "YOUR_MAP_KEY",
"SERVICE": "WMS",
"VERSION": "1.3.0",
"REQUEST": "GetMap",
"LAYERS": "sthelenaplaces",
"CRS": "EPSG:3857",
"WIDTH": "800",
"HEIGHT": "600",
"FORMAT": "image/png",
"TRANSPARENT": "TRUE",
"SLD_BODY": "<StyledLayerDescriptor version=\"1.0.0\" xmlns=\"http://www.opengis.net/sld\" xmlns:ogc=\"http://www.opengis.net/ogc\"><NamedLayer><Name>sthelenaplaces</Name><UserStyle><FeatureTypeStyle><Rule><PointSymbolizer><Graphic><Mark><WellKnownName>circle</WellKnownName><Fill><CssParameter name=\"fill\">#d7263d</CssParameter></Fill></Mark><Size>12</Size></Graphic></PointSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>",
},
timeout=120,
)
response.raise_for_status()
with open("red-points.png", "wb") as fh:
fh.write(response.content)
import { writeFile } from "node:fs/promises";
const url = new URL("https://maps.geoczech.dev/");
url.search = new URLSearchParams({
"FILE_URL": "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"KEY": "YOUR_MAP_KEY",
"SERVICE": "WMS",
"VERSION": "1.3.0",
"REQUEST": "GetMap",
"LAYERS": "sthelenaplaces",
"CRS": "EPSG:3857",
"WIDTH": "800",
"HEIGHT": "600",
"FORMAT": "image/png",
"TRANSPARENT": "TRUE",
"SLD_BODY": "<StyledLayerDescriptor version=\"1.0.0\" xmlns=\"http://www.opengis.net/sld\" xmlns:ogc=\"http://www.opengis.net/ogc\"><NamedLayer><Name>sthelenaplaces</Name><UserStyle><FeatureTypeStyle><Rule><PointSymbolizer><Graphic><Mark><WellKnownName>circle</WellKnownName><Fill><CssParameter name=\"fill\">#d7263d</CssParameter></Fill></Mark><Size>12</Size></Graphic></PointSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>",
});
const response = await fetch(url);
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
await writeFile("red-points.png", Buffer.from(await response.arrayBuffer()));
<?php
$query = http_build_query([
"FILE_URL" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"KEY" => "YOUR_MAP_KEY",
"SERVICE" => "WMS",
"VERSION" => "1.3.0",
"REQUEST" => "GetMap",
"LAYERS" => "sthelenaplaces",
"CRS" => "EPSG:3857",
"WIDTH" => "800",
"HEIGHT" => "600",
"FORMAT" => "image/png",
"TRANSPARENT" => "TRUE",
"SLD_BODY" => "<StyledLayerDescriptor version=\"1.0.0\" xmlns=\"http://www.opengis.net/sld\" xmlns:ogc=\"http://www.opengis.net/ogc\"><NamedLayer><Name>sthelenaplaces</Name><UserStyle><FeatureTypeStyle><Rule><PointSymbolizer><Graphic><Mark><WellKnownName>circle</WellKnownName><Fill><CssParameter name=\"fill\">#d7263d</CssParameter></Fill></Mark><Size>12</Size></Graphic></PointSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>",
]);
$curl = curl_init("https://maps.geoczech.dev/" . "?" . $query);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
file_put_contents("red-points.png", $response);
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
var query = new Dictionary<string, string>
{
["FILE_URL"] = "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
["KEY"] = "YOUR_MAP_KEY",
["SERVICE"] = "WMS",
["VERSION"] = "1.3.0",
["REQUEST"] = "GetMap",
["LAYERS"] = "sthelenaplaces",
["CRS"] = "EPSG:3857",
["WIDTH"] = "800",
["HEIGHT"] = "600",
["FORMAT"] = "image/png",
["TRANSPARENT"] = "TRUE",
["SLD_BODY"] = "<StyledLayerDescriptor version=\"1.0.0\" xmlns=\"http://www.opengis.net/sld\" xmlns:ogc=\"http://www.opengis.net/ogc\"><NamedLayer><Name>sthelenaplaces</Name><UserStyle><FeatureTypeStyle><Rule><PointSymbolizer><Graphic><Mark><WellKnownName>circle</WellKnownName><Fill><CssParameter name=\"fill\">#d7263d</CssParameter></Fill></Mark><Size>12</Size></Graphic></PointSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>",
};
var url = "https://maps.geoczech.dev/?" + string.Join("&", query.Select(p => $"{p.Key}={Uri.EscapeDataString(p.Value)}"));
var response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
await File.WriteAllBytesAsync("red-points.png", await response.Content.ReadAsByteArrayAsync());
Good to know
- Data URLs must be public
http(s)links (no login). Private network addresses are blocked. - Caching: the data file is cached by URL for a while, and map images may be
cached by browsers for up to an hour. When your data changes, change the URL (for
example add
?v=2) — the key's allowed data URL prefix still matches. - Time limit: each request must finish within about 60 seconds. Huge files (many GB) are better converted to an efficient format first — e.g. a tiled, compressed GeoTIFF or a GeoPackage — with the Converter.
- Speed: text formats without a spatial index (GeoJSON, GML, KML, GPX, CSV, DXF)
are read whole for every map image, however small the area is — from tens of
thousands of features that takes seconds. The same data in FlatGeobuf or
GeoPackage draw several times faster.
DescribeDatatells you when it is worth it (performance.advice). - CORS is enabled, so map images and WFS data can be loaded directly from web pages.
Last updated 2026-11-17