I am serving several raster images with Geoserver using ImageMosaic and PostgreSQL to index data. The files are stored in the file system in GeoTiff format with EPSG:4326 and a pixel size of 2.7e-5 x 2.7e-5 arcsecond/pixel.

When I open this file in QGis with its vector shape definition, they match up perfectly in any OTF configuration, as it can be seen here:

File in QGis

The problem is that when the image gets served in Geoserver it seems to get skewed or shortened in the vertical axis, as seen here:

File served by Geoserver

Here's another example. The raster image has a 1.5 pixel buffer that is why it should overflow the boundary, but the reprojection is just wrong.

Wrong Reprojection

  • where is the background image from? are you sure it is correct? does it line up with the vector outline? – Ian Turton Nov 11 '17 at 12:19
  • 2
    Are you reprojecting in GeoServer? What are the source and target coordinate reference systems? And what are the ones in QGIS? – Andrea Aime Nov 11 '17 at 13:26
  • Hi @IanTurton, The background image is from Bing. The vector boundary matches ok the bing image, but not the reprojected overlay raster. I'm very confident on the boundary, as several boundaries we loaded on the application where from GPS coordinates taken in field and they lined up perfectly. – luckyshonway Nov 12 '17 at 5:11
  • Hi @AndreaAime. The source CRS is EPSG:4326 and it is being converted to EPSG:3857 as it is being shown in a web app with openlayers. In QGIS no matter how i set up OTF reprojection (4326 or 3857) it gets lined up perfectly. – luckyshonway Nov 12 '17 at 5:16
  • 3
    What's truly weird is that in the "just wrong" image the roads are still lining up with the ones on the background. We should have a look at sample data, an image and a vector footprint, to understand what is going on. Reprojection from 4326 to 3857 is done daily by many GeoServer users, yet haven't seen reports of that kind. – Andrea Aime Nov 12 '17 at 7:33

Your Answer

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

Browse other questions tagged or ask your own question.