Application Example¶
The following example was created to showcase how ETHOS.GeoKit can be used to answer real-world questions in the field of energy system analysis. It demonstrates how the ocean depth at offshore wind turbine locations in the North Sea can be determined. This kind of information is important for estimating the investment required to install these turbines and for assessing future electricity costs and prices.
Code-length comparison: GeoKit vs. GDAL vs. GeoPandas + Rasterio¶
The same end-to-end workflow — estimating the seabed depth at plausible 2050 offshore-wind turbine locations in the North Sea by combining the IHO sea-area vector boundaries, the GEBCO bathymetry raster, and the turbine point dataset — is implemented two additional times using other geospatial Python tools to showcase the boilerplate reduction:
- GeoPandas + Rasterio (
_3_..._geopandas_rasterio.ipynb) - Pure GDAL/OGR (
_2_..._gdal.ipynb)
The two non-GeoKit notebooks require rasterio/geopandas, which are not
dependencies of GeoKit; they are therefore excluded from the documentation build
and shown here only as a transparency reference.
How the lines of code are counted¶
Every code cell in each notebook carries exactly one category tag in its cell metadata:
| Tag | Meaning | Counted as |
|---|---|---|
loc-setup |
library imports / path configuration | excluded |
loc-download |
data-download boilerplate (identical across all three) | excluded |
loc-workflow |
the actual data-processing workflow | data processing |
loc-plotting |
visualization / plotting | plotting |
A line of code is a physical source line that is neither blank nor a comment-only line. We report data processing and plotting separately, plus their total. Imports and the (identical) data-download boilerplate are excluded because they are identical across all three implementations and would only add noise; excluding them is conservative rather than flattering to GeoKit.
Reporting processing and plotting separately makes the comparison honest: it shows that GeoKit's advantage is concentrated in the data-processing code — the core geospatial work — rather than in plotting helpers.
Summary¶
| Implementation | Data processing | Plotting | Total | Processing vs GeoKit | Total vs GeoKit |
|---|---|---|---|---|---|
| ETHOS.GeoKit | 28 | 52 | 80 | 1.00× | 1.00× |
| GeoPandas + Rasterio | 80 | 30 | 110 | 2.86× | 1.38× |
| Pure GDAL/OGR | 102 | 61 | 163 | 3.64× | 2.04× |