0

I am using a shape of Austria from gadm.org which I want to overlay with a netCDF file in R. As the netCDF has projected coordinates in EPSG:31287, I have reprojected the shape using FWtools and the .proj4-string from spatialreference.org.

Unfortunately the shape does not fit the raster data: The best fit is in the west, and the error grows in eastern direction (shape has a bigger extent in eastern direction than the raster). The north/south extent is correct. Any ideas what could be wrong? I already tried to play around with lon_0 values, but as far I am informed correctly, this causes only a general shift.

enter image description here

1

How much offset have you got?

If it is about 100m, you might experience a datum shift. It might be that the netcdf file does not have towgs84 parameters, while your reprojected shapefile might have. There are different towgs84 parameters for MGI available.

By the way, FWtools is outdated by now. For Windows, use the latest GDAL builds from http://www.gisinternals.com/release.php

  • Thanks for your comment! The offset is unfortunately way more than 100m, so I fear it is not the towgs84. I have added an image for illustration purposes. Thanks also for your gdal update! – countryman Jun 1 '15 at 16:00
  • I just tested it with QGIS, and the reprojected GADM shapefile does not exceed 700000 for me. So please try gisinternals for the reprojection too. You don't have to add the proj string, just t_srs epsg:31287 will do. – AndreJ Jun 1 '15 at 19:06
  • I have tried to load it in QGIS and it doesn't exceed 700000 for me neither. Comparing it to the shapefile from Statistics Austria my projected shape also fits really good. I still can't figure out what the error is. Meanwhile I did the figure in Python and the projection using Basemap works fine. – countryman Jun 2 '15 at 16:31
  • It must be related to the plotting in R. Maybe you test on that, and ask a new question with more details on how you plot it. Nothing I could help you with ... – AndreJ Jun 2 '15 at 17:13
  • I fear so, too. Thanks anyway for your effort and the gisinternals tip again! – countryman Jun 3 '15 at 6:08

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.