0

I have a shapefile (green point layer below) in which I use gdal_grid to grid it into raster and then gdalwarp to transform from the source reference system (EPSG:27700) to the destination reference system (EPSG:3857).

However, as you can see the below, once gridded it moves position and becomes misaligned.

How can I fix this?

enter image description here

userhelp
  • 13
  • 5

1 Answers1

0

It's usually best to transform a vector instead of a raster, whenever possible. So I would first transform then grid, instead of the other way around.

It would probably be good to check in between the two steps your taking, is it the coordinate transformation introducing the shift, or the gridding?

You could verify the coordinate transformation using something like pyproj (both still use proj of course, so not fully independent.)

And for the gridding, if that turns out to be the issue, you could consider using gdal_rasterize as an alternative.

In the end it might indeed just be due to the projection used, as mentioned by @Micha in the comments.

Rutger Kassies
  • 61,630
  • 17
  • 112
  • 97