Simple GML at last!

October 2, 2011

Geography Markup Language (GML) 3.3 is now out for public comment. Not to say that this isn’t exciting on its own merits, but there’s an incredibly new feature in it — compact encodings! Clause 7 (page 16 in the PDF) has a great little section called “Compact Encodings of Commonly Used GML Geometries.” It finally defines a concise encoding for describing simple points, lines and polygons (and a few other shapes as well). For example, here’s a picture of the lineage of the new <SimplePolygon>, which compresses the old <Polygon> from 7 elements to 2.

201110022340.jpg

In short, here are example points, lines and polygons that are now legal GML.

<Point>
   <posList>42.3 -71.9</posList>
</Point>
<LineString>
   <posList>42.3 -71.9 42.4 -71.8</posList>
</LineString>
<SimplePolygon>
   <posList>42.3 -71.9 42.5 -72.2 42.4 -72.1 42.4 -72.0</posList>
</SimplePolygon>

Download the standard here.

Tags: ,

Comments are closed.

Archives