3

I am having issues with QGIS 2.0.1 working between local projected coordinate systems (such as OSGB36, NAD83) and Geographic systems (such as WGS84).

The stock answer I have been provided is 'load the data and "save as"' - this doesn't cut it, the files are always 50m out. The data requires a Helmert or NTV2 transformation but I cannot see how to appy this in QGIS 2.0

Unfortunately I have gone back to ArcGIS and QGIS 1.9 (using the transformation tool plugin), but I cannot be alone in my issues, so has anyone else had this issue and what is the work -around?

4
  • 1
    Could you include some more detail about the issue you're encountering? What exactly are you trying to do (project data that's in geographic coordinates, or transform projected coordinates back to geographic)? What projection parameters are you using? In what way are the files 50m out (constant offset, or more complicated)? Could you provide a small sample dataset of the problematic data? – Jake Nov 4 '13 at 16:41
  • 1
    This issue isn't specific to one particular data, this is an issue related to the geographic engine used by QGIS. This can be seen by bringing in any data of both WGS84 (epsg 4326) & OSGB36 (27700) or a combination of NAD83 & WGS84 in any format – Nicholas Duggan Nov 4 '13 at 16:51
  • It would be great if you could find a more descriptive title for this question. Half the QGIS questions are some projections "issues" ;-) – underdark Nov 5 '13 at 17:49
1

Helmert transformation is done using the +towgs84 value in the proj definition, and ntv2 requires to specify the .gsb transformation file (except for NAD27). If your data comes with a less accurate CRS transformation definition, you have to assign (and not reproject with Save As ...) a user CRS to it.

Any CRS using NAD83 should not have any offsets, as this geodetic CRS uses the same ellipsoid and datum as WGS84 (unless you are using the NA2011 or similar methods which are not yet supported in QGIS).

For NAD27, the ntv2 adjustment is built-in in GDAL and QGIS.

For OSGB 36, you have to create a custom CRS. A ntv2 grid file can be downloaded from Ordnance Surveys website See also the questions here:

Raster incorrectly reprojected to OSGB(27700)

How to reproject a raster file in QGIS with datum transformation?

I had no problem doing that in QGIS 1.8.0 Lisboa, without using the transformation tool plugin at all.

If you encounter problems in QGIS 2.0, you could reproject your data in QGIS 1.8.0 to another CRS like UTM based on WGS84, and work with that in QGIS 2.0.

7
  • Thanks Andre, I am currently working with QGIS 1.9 & QGIS 2 opened simultaneously. I've tried creating a custom CRS for OSGB36 but it is very time consuming when there are mulitple areas needing consideration. – Nicholas Duggan Nov 5 '13 at 9:15
  • The NAD83 ellipsoid is GRS80 and the WGS84 ellipsoid is WGS84, although close, they obviously differ. Many of the projects I work on have a stipulation of "Better than 2m" which requires me to use either the 14 parameter transformation or the more accurate NTV2 solution – Nicholas Duggan Nov 5 '13 at 9:18
  • Have you tried the OSGB36 ntv2 grid file? I added the current link in my answer. – AndreJ Nov 5 '13 at 9:54
  • I have got the OSTN02 gsb from Ordnance Survey and currently trying to get gdalwarp to transform the file I have as shapefile....fingers crossed!! Thanks :) – Nicholas Duggan Nov 5 '13 at 10:24
  • 1
    gdalwarp is intended for raster files. For shapefiles, use ogr2ogr. But keep in mind that your source should use the ntv2 instead of the less accurate towgs84 parameters using the -s_srs option. – AndreJ Nov 5 '13 at 10:32
1

The key to an answer seems to be the nadgrids parameter according to proj's documentation. This should involve copying the grid file to the correct folder and creating some custom CRS definitions.

The Transformation tools plugin (which has not been ported to 2.0 yet) was written as a solution for the lack of direct NTV2 transform support. (There are multiple enhancement requests (1,2) in the OGR/GDAL bug tracker.)

3
  • Having researched this and getting some advice, it would appear that (unless someone else can show a way) that the proj.4 method using nadgrids only works for points, for this there are much better tools out there. There is no documentation I can find which relates to transformation of polygon or polyline data. – Nicholas Duggan Nov 5 '13 at 8:30
  • I have been in discussion with the developer of the QGIS Transformation Tool Plugin and currently there is no intention of updating it unless funded and the cost exceeds anything that myself or my company could afford. – Nicholas Duggan Nov 5 '13 at 8:32
  • 1
    For polygons and polylines, QGIS does nothing more than reprojecting the coordinates of every vertex using the same methods as for point layers. – AndreJ Nov 5 '13 at 9:09
1

Not sure if it helps. But, You Can use nadgrids to reproject shapefile polygons to KML using (eg. OSTN02_Ntv2.gsb -> OSGB36 to ETRS89\ETRF2000):

ogr2ogr -s_srs "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" -t_srs "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601 +x_0=400000 +y_0=-100000 +ellps=airy +nadgrids=c:\OSTN02_NTv2.gsb +units=m +no_defs" -f "kml" new_projection.kml original_projection.shp

Then I believe use ogr2ogr to convert the KML back to shapefile. It should convert the polygons, but you might loose some attributes?

I used Ogr2ogr from within FWTools. I think NTv2 support came to Proj in version 4.8.0, so check you are using a recent build.

[edit: Actually, I think i got my sources and targets wrong. The nadgrids one should be the source, and the target should be an ETRS89 proj string. Might then do "Esri Shapefile" reprojection directly.]

1
  • 1
    gisinternals.com/sdk offers latest GDAL builds for Windows. So there is no reason for sticking to the outdated FWtools anymore. – AndreJ Dec 5 '13 at 12:20
1

I've just tested Shapefile Reprojection using Ogr2ogr using Nadgrids Heres how for OSGB36 to ETRS89/ITRF2000:

ogr2ogr -s_srs "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601 +x_0=400000 +y_0=-100000 +ellps=airy +nadgrids=c:\OSTN02_NTv2.gsb +units=m +no_defs" -t_srs "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs" -f "Esri Shapefile" new_projection.shp original_projection.shp

If you want to be really cleaver you can then do Helmert transformations to GPS coordinates.

[Edit, actually, strictly by definition those towgs84 parameters should not be zeros. So the projection file produced will be Wgs84 rather than the time dependant ETRS89 parameters. But you could always edit it.]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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