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 = ArchGDAL.read("data/point.geojson")

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

4 rows × 3 columns

FIDpointname
IGeomet…Float64String
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 = ArchGDAL.read("data/multi_geom.csv", options = ["GEOM_POSSIBLE_NAMES=point,linestring", "KEEP_GEOM_COLUMNS=NO"])

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

2 rows × 5 columns

pointlinestringidzoomlocation
IGeomet…IGeomet…StringStringString
1Geometry: wkbUnknownGeometry: wkbUnknown5.11.0Mumbai
2Geometry: wkbUnknownGeometry: wkbUnknown5.22.0New Delhi