Geometries
The first thing we need to look at is how geometries are represented in GML documents. You have already seen some of these as responses from GeoServer in Lesson 3. Later in this lesson, we will study these in greater detail. As GeoServer is a WFS 1.0 server, it returns GML2 so you will see Points, Polygons and LineStrings (and multipoints, multipolygons, and multilinestrings - but we'll get to them later).GML2 GML3
- Point: represents a single point in geographic space which can optionally include an elevation.
- Polygon: represents a closed area of geographic space, again the coordinates can optionally have elevations. A polygon may have holes within it and islands within those holes (and so on) but the hole cannot touch the outside of the polygon.
- LineString: represents a linear geographic feature, the coordinates can have elevations if required. The line is represented as a series of points joined by lines.
GML3 defines a lot more geometries in addition to the GML2 geometries:
- Curve: this is a more general linear feature which now includes LineStrings but also smooth curves such as: Arc CubicSpline Bezier
- Surface: a more general polygon type feature which also includes: Patches (polygons with curves) Rectangles Triangles
- Coverages (grids): a way of representing rasters in GML