Not Easy!
Using Windows Subsystem 4 Linux (WSL):
sudo apt-get install gdal-bin
sudo apt-get install libgdal-dev
sudo apt-get install python3-gdal
# create virtualenv
python3 -m virtualenv gdal_ve
source gdal_ve/bin/activate
pip install pygdal=="`gdal-config --version`.*"
- Installing on Windoze is a Pain Part1.
- Never tried conda, but potentially an easier option
Bottom line, getting it installed on Windoze is a PAIN
- opensource ETL Tool
- Currently supports around 100 vector formats and 150 raster
- GDAL = Geospatial Data Abstraction Library, Raster
- OGR = OpenGIS Simple Features Reference Implementation?? Vector
- GDAL 2.0 sees GDAL and OGR components integrated together, used to be separate
Programming flow / object hierarchy
- Driver (Defines data type, ex, FGDB, shape file, postgis etc)
- Data Source (Defines source, path, db connection params etc)
- Layer (A collection of features)
- Feature (individual row in a table with a geometry)
- Attributes - tabular goodness
- Geometry - where?
- Feature (individual row in a table with a geometry)
- Layer (A collection of features)
- Data Source (Defines source, path, db connection params etc)
comparison of opensource vs esri driver
dataPath = r'./data/BCTS_OPERATING_AREAS_SP.gdb'
# proprietary ESRI driver, read only, requires separate install
#driver = ogr.GetDriverByName("FileGDB")
# opensource driver, use this!
driver = ogr.GetDriverByName("OpenFileGDB")
ds = driver.Open(dsath, 0)