Feature Data

In this section, we revisit the data/point.geojson dataset.

dataset = ArchGDAL.read("data/point.geojson")
GDAL Dataset (Driver: GeoJSON/GeoJSON)

Number of feature layers: 1
  Layer 0: point (wkbPoint)

Feature Layers

Retrieve a layer from a dataset using ArchGDAL.getlayer

layer = ArchGDAL.getlayer(dataset, 0)
Layer: point
  Geometry 0 (): [wkbPoint], POINT (100 0), POINT (100.2785 0.0893), ...
     Field 0 (FID): [OFTReal], 2.0, 3.0, 0.0, 3.0
     Field 1 (pointname): [OFTString], point-a, point-b, a, b

The display provides

  • the name of the feature layer (point)
  • the geometries in the dataset, and their brief summary.
  • the fields in the dataset, and their brief summary.

You can also programmatically retrieve them using

Field Definitions

Each fielddefn defines an attribute of a feature, and supports the following:

Each geomdefn defines an attribute of a geometry, and supports the following:

Individual Features

We can examine an individual feature

ArchGDAL.getfeature(layer, 2) do feature
  (index 0) geom => POINT
  (index 0) FID => 0.0
  (index 1) pointname => a

You can programmatically retrieve the information using

More information on geometries can be found in Geometric Operations.