Retrieving vector data

We will use WFS to get vector data encoded in GML. In case you disabled it, as we did in Chapter 11, Tuning GeoServer in a Production Environment, you will need to enable the WFS in GeoServer. Open your command-line console; we will use curl to send requests:

  1. The first operation that we will use is GetCapabilities. It describes which feature types and operations are available on the server:
      $ curl -XGET "http://localhost/geoserver/wfs?        service=wfs&version=1.0.0&request=GetCapabilities"        -o getCapabilities.xml
  1. The XML returned is quite huge; apart from a standard part describing the WFS service and the supported operation, it contains a description for any FeatureType configured on GeoServer. The total length of the ...

Get GeoServer Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.