Manipulating Spatial Data using Open Source Tools
A common way to manipulate spatial data is through the use of GIS, which is not without its drawbacks.
- Limited process memory
- Batch processing is difficult
- May require licensed extensions
- Requires use of proprietary formats
- Limited options
What do you really need?
Geospatial Data Abstraction Library (GDAL)
OpenGIS Simple Features Reference Implementation (OGR)
In late 1998, Frank Warmerdam started work on the GDAL/OGR library
Why use these tools?
import gdal, ogr, osr
Tools are driven from the command line, there is no user interface! Now this might take some getting used to.
Create a VRT from XYZ
<OGRVRTDataSource> <OGRVRTLayer name="dem"> <SrcDataSource>dem.csv</SrcDataSource> <GeometryType>wkbPoint</GeometryType> <GeometryField encoding="PointFromColumns" x="X" y="Y" z="Z"/> </OGRVRTLayer> </OGRVRTDataSource>
gdalbuildvrt dem.txt dem.vrt
XYZ Soundings to GRID
gdal_grid -l dem dem.vrt dem.tif
GRID to Contour Model
gdal_contour -f "GML" -a DEPCNT -i 0.5 -nln data dem.tif contours.gml
Applying the technology
How OceanWise harness GDAL/OGR tools
By embedding the GDAL/OGR drivers into our internal data processing tools we are able to save time and money whilst supporting a huge variety of Raster/Vector formats and the entire proj4 coordinate reference system library!
Processing large datasets
Bathymetric datasets are an example of Maritime data which is constantly increasing in size. Most programs, GIS included, won't allow you to load more than 4GB of data.
What do you do when you're handed a large bathymetric dataset to build with a contour model?
Raster Charts XL
- QGIS - An open source GIS that uses the OGR and GDAL libraries to view several vector and raster formats, and includes support for PostGIS tables and GRASS digitizing.
- Shapely - Python package for manipulation and analysis of planar geometric objects.
Thank you for listening.
Drive Your Data - The Easy Way