GeoServer WFS
We host an OGC Web Feature Service, available under https://ows-demo.terrestris.de/geoserver/osm/wfs , that serves several OSM datasets you can test and check out. Currently available are the following featuretypes:
- Country borders
- Busstops
- Gas stations
Have a look at the capabilities-document for details:
Country borders WFS
The country borders of this WFS are served as polygons.
Example request for country borders (whitespace and linebreaks have been added for better readability):
1 2 3 4 5 6 7 |
https://ows-demo.terrestris.de/geoserver/osm/wfs ? service = WFS & version = 1.1.0 & request = GetFeature & typeName = osm:osm-country-borders & maxFeatures = 2 & outputFormat = text/xml;%20subtype=gml/3.1.1 |
Calling the …
… leads to the following output (whitespace and linebreaks have been added for better readability):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
<?xml version="1.0" encoding="UTF-8"?> <wfs:FeatureCollection xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ows="http://www.opengis.net/ows" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:osm="http://terrestris" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" numberOfFeatures="2" <gml:featureMembers> <osm:osm-country-borders gml:id="osm-country-borders.fid-3283c54a_14310594d86_-5661"> <gml:name>Nederland — Belgique / België / Belgien</gml:name> <osm:id>150452</osm:id> <osm:osm_id>27963051</osm:osm_id> <osm:type>administrative</osm:type> <osm:admin_level>2</osm:admin_level> <osm:geometry> <gml:Polygon srsDimension="2" srsName="urn:x-ogc:def:crs:EPSG:3857"> <gml:exterior> <gml:LinearRing srsDimension="2"> <gml:posList>538881.7913834592 6695471.29291937 ...</gml:posList> </gml:LinearRing> </gml:exterior> </gml:Polygon> </osm:geometry> </osm:osm-country-borders> <osm:osm-country-borders gml:id="osm-country-borders.fid-3283c54a_14310594d86_-5660"> <gml:name>Nederland — Belgique / België / Belgien</gml:name> <osm:id>150453</osm:id> <osm:osm_id>27963381</osm:osm_id> <osm:type>administrative</osm:type> <osm:admin_level>2</osm:admin_level> <osm:geometry> <gml:Polygon srsDimension="2" srsName="urn:x-ogc:def:crs:EPSG:3857"> <gml:exterior> <gml:LinearRing srsDimension="2"> <gml:posList>548750.13644548 6701203.549915504 ...</gml:posList> </gml:LinearRing> </gml:exterior> </gml:Polygon> </osm:geometry> </osm:osm-country-borders> </gml:featureMembers> </wfs:FeatureCollection> |
Busstops and Gas stations WFS
This WFS serves busstops and gas stations based on OpenStreetMap, the geometry is of type point.
Example request for busstops (whitespace and linebreaks have been added for better readability):
1 2 3 4 5 6 7 |
https://ows-demo.terrestris.de/geoserver/osm/wfs ? service = WFS & version = 1.0.0 & request = GetFeature & typeName = osm:osm-busstops & maxFeatures = 2 & outputFormat = text/xml;%20subtype=gml/3.2 |
Calling the …
… leads to the following output (whitespace and linebreaks have been added for better readability):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
<?xml version="1.0" encoding="UTF-8"?> <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:osm="http://terrestris" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <wfs:boundedBy> <gml:Envelope srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#3857"> <gml:lowerCorner>1877532.06162444 1.05485402126577E7</gml:lowerCorner> <gml:upperCorner>1884855.58176113 1.05511545404925E7</gml:upperCorner> </gml:Envelope> </wfs:boundedBy> <wfs:member> <osm:osm-busstops gml:id="osm-busstops.fid-3283c54a_14310594d86_-5669"> <gml:name /> <gml:boundedBy> <gml:Envelope srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#3857"> <gml:lowerCorner>1877532.0616244355 1.0548540212657677E7</gml:lowerCorner> <gml:upperCorner>1877532.0616244355 1.0548540212657677E7</gml:upperCorner> </gml:Envelope> </gml:boundedBy> <osm:id>1</osm:id> <osm:osm_id>1146</osm:osm_id> <osm:type>bus_stop</osm:type> <osm:ref /> <osm:geometry> <gml:Point srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#3857"> <gml:pos>1877532.0616244355 1.0548540212657677E7</gml:pos> </gml:Point> </osm:geometry> </osm:osm-busstops> </wfs:member> <wfs:member> <osm:osm-busstops gml:id="osm-busstops.fid-3283c54a_14310594d86_-5668"> <gml:name /> <gml:boundedBy> <gml:Envelope srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#3857"> <gml:lowerCorner>1884855.5817611255 1.0551154540492514E7</gml:lowerCorner> <gml:upperCorner>1884855.5817611255 1.0551154540492514E7</gml:upperCorner> </gml:Envelope> </gml:boundedBy> <osm:id>2</osm:id> <osm:osm_id>1191</osm:osm_id> <osm:type>bus_stop</osm:type> <osm:ref /> <osm:geometry> <gml:Point srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#3857"> <gml:pos>1884855.5817611255 1.0551154540492514E7</gml:pos> </gml:Point> </osm:geometry> </osm:osm-busstops> </wfs:member> </wfs:FeatureCollection> |
Example request for gas stations (whitespace and linebreaks have been added for better readability):
1 2 3 4 5 6 7 |
https://ows-demo.terrestris.de/geoserver/osm/wfs ? service = WFS & version = 1.0.0 & request = GetFeature & typeName = osm:osm-fuel & maxFeatures = 2 & outputFormat = json |
Calling the …
… leads to the following output (whitespace and linebreaks have been added for better readability):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "id": "osm-fuel.fid-3283c54a_14310594d86_-5665", "geometry": { "type": "Point", "coordinates": [ 1190769.64078071, 8649472.769036802 ] }, "geometry_name": "geometry", "properties": { "id": 173770, "osm_id": 1714763033, "name": "Mesnali Bensin og Anlegg DA", "type": "fuel" } }, { "type": "Feature", "id": "osm-fuel.fid-3283c54a_14310594d86_-5664", "geometry": { "type": "Point", "coordinates": [ 1481027.051217014, 6912900.67461981 ] }, "geometry_name": "geometry", "properties": { "id": 173787, "osm_id": 1714848015, "name": "SPREVES", "type": "fuel" } } ], "crs": { "type": "EPSG", "properties": { "code": "3857" } } } |