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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.