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×3 DataFrame
RowFIDpointname
IGeometr…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×5 DataFrame
Rowpointlinestringidzoomlocation
IGeometr…IGeometr…StringStringString
1Geometry: wkbPointGeometry: wkbLineString5.11.0Mumbai
2Geometry: wkbPointGeometry: wkbLineString5.22.0New Delhi