[Geoserver-devel] WMS + Geotiff oddity

Hi,
I'm trying to generate a "whole world" map in geotiff to make
some wcs tests related to bboxes crossing the date line (yes,
the wcs 1.1.1 specification allows for such king of bbox).

To make such a geotiff I took a world shapefile (whose
longitude really spans from -180 to 180) and did the following
getMap:

http://localhost:8080/geoserver/wms?HEIGHT=360&WIDTH=720&LAYERS=topp%3Aworld&STYLES=&SRS=EPSG%3A4326&FORMAT=image%2Fgeotiff&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=-180,-90,180,90

As you can see the number of pixels is twice the number of deegrees,
so I expected a resolution of 0.5 straight.

Unfortunately the result is not what I expected. The resulting
GeoTiff has the following metadata (as reported by gdalinfo):

Driver: GTiff/GeoTIFF
Files: world.tiff
Size is 720, 360
Coordinate System is:
GEOGCS["WGS 84",
     DATUM["WGS_1984",
         SPHEROID["WGS 84",6378137,298.2572235630016,
             AUTHORITY["EPSG","7030"]],
         AUTHORITY["EPSG","6326"]],
     PRIMEM["Greenwich",0],
     UNIT["degree",0.0174532925199433],
     AUTHORITY["EPSG","4326"]]
Origin = (-179.750000000000000,89.750000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Metadata:
   AREA_OR_POINT=Point
   TIFFTAG_XRESOLUTION=1
   TIFFTAG_YRESOLUTION=1
   TIFFTAG_RESOLUTIONUNIT=1 (unitless)
Image Structure Metadata:
   INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left (-179.7500000, 89.7500000) (179d45'0.00"W, 89d45'0.00"N)
Lower Left (-179.7500000, -90.2500000) (179d45'0.00"W, 90d15'0.00"S)
Upper Right ( 180.2500000, 89.7500000) (180d15'0.00"E, 89d45'0.00"N)
Lower Right ( 180.2500000, -90.2500000) (180d15'0.00"E, 90d15'0.00"S)
Center ( 0.2500000, -0.2500000) ( 0d15'0.00"E, 0d15'0.00"S)
Band 1 Block=720x8 Type=Byte, ColorInterp=Red
Band 2 Block=720x8 Type=Byte, ColorInterp=Green
Band 3 Block=720x8 Type=Byte, ColorInterp=Blue

Sigh... is this a bug or is it due to pixel interpretation (point vs
area, center vs corner) that I'm missing?

Cheers
Andrea

Andrea Aime ha scritto:
....

Unfortunately the result is not what I expected. The resulting
GeoTiff has the following metadata (as reported by gdalinfo):

Hum, I better clarify. The resolution is ok, but the upper left corner
is not:

Upper Left (-179.7500000, 89.7500000) (179d45'0.00"W, 89d45'0.00"N)
Lower Left (-179.7500000, -90.2500000) (179d45'0.00"W, 90d15'0.00"S)
Upper Right ( 180.2500000, 89.7500000) (180d15'0.00"E, 89d45'0.00"N)
Lower Right ( 180.2500000, -90.2500000) (180d15'0.00"E, 90d15'0.00"S)

Cheers
Andrea