Tabular Interface

ArchGDAL now brings in greater flexibilty in terms of vector data handling via the Tables.jl API. In general, tables are modelled based on feature layers and support multiple geometries per layer. Namely, the layer(s) of a dataset can be converted to DataFrame(s) to perform miscellaneous spatial operations.

Here is a quick example based on the data/point.geojson dataset:

dataset ="data/point.geojson")

DataFrames.DataFrame(ArchGDAL.getlayer(dataset, 0))

4 rows × 3 columns

1Geometry: wkbPoint2.0point-a
2Geometry: wkbPoint3.0point-b
3Geometry: wkbPoint0.0a
4Geometry: wkbPoint3.0b

To illustrate multiple geometries, here is a second example based on the data/multi_geom.csv dataset:

dataset1 ="data/multi_geom.csv", options = ["GEOM_POSSIBLE_NAMES=point,linestring", "KEEP_GEOM_COLUMNS=NO"])

DataFrames.DataFrame(ArchGDAL.getlayer(dataset1, 0))

2 rows × 5 columns

1Geometry: wkbUnknownGeometry: wkbUnknown5.11.0Mumbai
2Geometry: wkbUnknownGeometry: wkbUnknown5.22.0New Delhi