I am using a NTv2-grid for transformation of geodata. The grid can be found here:

gsb-file: https://www.lgl-bw.de/lgl-internet/web/sites/default/de/05_Geoinformation/Galerien/Dokumente/BWTA2017.zip

gsa-file: https://www.lgl-bw.de/lgl-internet/web/sites/default/de/05_Geoinformation/Galerien/Dokumente/BWTA2017_gsa.zip

I set up a directory watch with an automatic transformation workflow so workmates can just drop a shapefile in my input-folder and get the transformed geodata saved in the output-folder.

In order to prevent transformation of data which lies outside the NTv2-grid-extent I would like to get the extent of the NTv-2-grid so I can do a Within-Check before transforming the data.

Does anyone know a way to extract the points of the grid to calculate a convex hull? The given extent in the header is way too imprecise and using the polygon of the federal state for which the grid was set up is also not accurate enough for a within check.

  • Have you determined whether the offset values outside the state are zeroes? If they aren't and the grid is just smoothed out, you may have to look at the accuracy values. Convert the data into rasters with the cell values equal to the accuracies? It might be easier to find a better quality state boundary file.
    – mkennedy
    Feb 26, 2018 at 20:33
  • Is there a way to convert the ntv2-grid into a raster file like a geotiff to have a look at the offset values
    – Thomas B
    Feb 28, 2018 at 19:29
  • I translated the gsb file now with gdal_translate BWTA2017.gsb bwta.tif
    – Thomas B
    Mar 6, 2018 at 7:26

1 Answer 1


NTv2 is a raster format, which you can read with GDAL and related tools.

You may want to organise your gridshift files in PROJ_LIB. (E.g. on my Windows computer this is C:\OSGeo4W64\share\proj).

You can get individual extents from files with gdalinfo BWTA2017.gsb, or if you have rasterio:

$ rio bounds BWTA2017.gsb
{"bbox": [7.482986111111111, 47.49979019165039, 10.517013888888888, 49.83770833333333], "features": [{"bbox": [7.482986111111111, 47.49979019165039, 10.517013888888888, 49.83770833333333], "geometry": {"coordinates": [[[7.482986111111111, 47.49979019165039], [10.517013888888888, 47.49979019165039], [10.517013888888888, 49.83770833333333], [7.482986111111111, 49.83770833333333], [7.482986111111111, 47.49979019165039]]], "type": "Polygon"}, "properties": {"filename": "BWTA2017.gsb", "id": "0", "title": "BWTA2017.gsb"}, "type": "Feature"}], "type": "FeatureCollection"}

Or just bring them into QGIS to see what they look like:


As a bonus, you can build a shapefile index of PROJ_LIB with gdaltindex:

$ gdaltindex proj_lib.shp $PROJ_LIB/*

(modify $PROJ_LIB as needed). Here is how it looks on a global scale, where null is the largest "catch all" grid, and *.gtx files are vertical datums:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.