: gml = gmlread (fname, dots)

Read a .gml (Geographic Markup Language) file.

gmlread only reads coordinates, no attributes.

Required input argument fname is the name of a .gml file. If no other arguments are specified all features in the entire .gml file will be read.

The following optional property/value pairs (all case-insensitive) can be specified to select only some feature types and/or features limited to a certain area:

  • "FeatureType" (Just one "f" will do) Only read a certain feature type; the value can be one of "Points", "LineStrings" or "Polygons" (only the first three characters matter). Multiple feature types can be selected by specifying multiple FeatureType property/value pairs.
  • BoundingBox (just one "b" suffices) Only read features that lie entirely within a coordinate rectangle specified as a 2x2 matrix containing [minX minY; maxX maxY].

In addition verbose output can be obtained by specifying the following property/value pair:

  • Debug (a "d" will do) followed by a numeric value of 1 (or true) specifies verbose output; a numeric value of 0 (or false) suppresses verbose output.

The output of gmlread comprises a struct containing up to three mapstructs (MultiPoint and/or Polyline and/or Polygon mapstructs), depending on optional featuretype selection.

See also: shaperead.

Package: mapping