TransWikia.com

How to read a shapefile using Julia?

Geographic Information Systems Asked by Marcelo Villa-Piñeros on July 24, 2021

I am starting to learn Julia and I am wondering how to read a shapefile? Is it as straightforward as with other languages (e.g. Python or R)?

One Answer

First, add the ArchGDAL.jl package by pressing ] inside a julia environment and typing:

add ArchGDAL

Then, to read a Shapefile:

using ArchGDAL

dataset = ArchGDAL.read("test.shp")
layer = ArchGDAL.getlayer(dataset, 0)

Then, you will be able to access individual features and their respective attributes and geometries (very similar to the GDAL Python bindings). Documentation can be found on: http://yeesian.com/ArchGDAL.jl/latest/features/

Answered by Marcelo Villa-Piñeros on July 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP