Where are grid shift files saved? #90
-
Hi, I'm under the suspicion that a grid shift file is missing, more specifically uk_os_OSTN15_NTv2_OSGBtoETRS.tif. This is due to coordinates being projected incorrectly from EPSG:27700 and to others (such as 4326 & 4979) using GDAL Net, but correct when using the gdal command line tool - gdaltransform along with other tools (epsg, fme, ordanance survey) which produce the correct result. Is there a way to import the gridshift file into Gdal NET to see if this is causing the issue? Or can we specify Gdal to point to a directory to use these shift files by default? I can't seem to find where these files are saved, so I'm not sure where to place the tif file. Thanks for your time, EDITAdding the below to the proj grid shift files did the trick. Do we know if these are meant to be included with the Gdal Net install?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
If you have a different directory for the proj data (grid shifts), you can include it when configuring PROJ search paths. You can ensure that proj CRS is set by checking the output of var targetCrs = new SpatialReference(string.Empty);
var isSet = targetCrs.SetWellKnownGeogCS("EPSG:27700");
if (isSet == 0) {
// your projection
} else {
// this CRS is not defined
} But you can import a CRS from WKT (EPSG source). gdal.netcore/tests/MaxRev.Gdal.Core.Tests.XUnit/ProjTests.cs Lines 22 to 28 in d877176 |
Beta Was this translation helpful? Give feedback.
If you have a different directory for the proj data (grid shifts), you can include it when configuring PROJ search paths.
Of course, you can specify your proj data with
Proj.Configure(@"C:\OSGeo4W\share\proj");
.By default, I do package only a small
proj.db
file from proj build folder.To keep packages neater and more concise other projections or newer proj-datumgrid are omitted.
You can ensure that proj CRS is set by checking the output of
But you can import a CRS from WKT (EPSG source).
gdal.netcore/tes…