[Geoserver-devel] WCS generating coverages with the wrong geometry (GeoServer 1.5.1)

Hi,

I'm running into problems with GeoServer 1.5.1 WCS returning coverages (GeoTIFFs) with different dimensions (1 pixel larger in both width and height) to what I request. I assume that the problem is creeping in somewhere in the crop/resample/transform chain.

When I send the request

http://www.preagro.de/geoserver/wcs?SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&COVERAGE=preagro:2003&CRS=EPSG:31468&RESPONSE_CRS=EPSG:31468&BBOX=4428336.3286009,5800831.4255015,4428985.3286009,5801314.9255015&WIDTH=260&HEIGHT=194&FORMAT=GEOTIFF

The result I get has the following GridGeometry (261 x 195 pixels and not 260 x 194 as requested):

GridGeometry2D[GeneralGridRange[0..261, 0..195], PARAM_MT["Affine",
   PARAMETER["num_row", 3],
   PARAMETER["num_col", 3],
   PARAMETER["elt_0_0", 2.4961538461547246],
   PARAMETER["elt_0_2", 4428337.576677823],
   PARAMETER["elt_1_1", -2.49226804123475],
   PARAMETER["elt_1_2", 5801313.67936748]]]

Attached is a quickly-hacked-together test case that demonstrates the problem, and shows that the problem seems to be dependent on the source data since the coverage being tested (kamp_umriss) gets the correct grid geometry.

I can supply the source coverage(s) (ARCGRID) if someone wants to try and replicate the problem on their own GeoServer.

Cheers,

Edward

--
preagro TP7 - Geodateninfrastruktur
http://www.preagro.de

Universität Rostock
Agrar- und Umweltwissenschaftliche Fakultät
Professur für Geodäsie und Geoinformatik
Justus-von-Liebig-Weg 6
18059 Rostock

Tel: +49 381 498 3212
Fax: +49 381 498 3202
Web: http://www.auf.uni-rostock.de/gg

(attachments)

CoverageTest.java (3.06 KB)

Edward Nash ha scritto:

Hi,

I'm running into problems with GeoServer 1.5.1 WCS returning coverages (GeoTIFFs) with different dimensions (1 pixel larger in both width and height) to what I request. I assume that the problem is creeping in somewhere in the crop/resample/transform chain.

When I send the request

http://www.preagro.de/geoserver/wcs?SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&COVERAGE=preagro:2003&CRS=EPSG:31468&RESPONSE_CRS=EPSG:31468&BBOX=4428336.3286009,5800831.4255015,4428985.3286009,5801314.9255015&WIDTH=260&HEIGHT=194&FORMAT=GEOTIFF

The result I get has the following GridGeometry (261 x 195 pixels and not 260 x 194 as requested):

GridGeometry2D[GeneralGridRange[0..261, 0..195], PARAM_MT["Affine",
  PARAMETER["num_row", 3],
  PARAMETER["num_col", 3],
  PARAMETER["elt_0_0", 2.4961538461547246],
  PARAMETER["elt_0_2", 4428337.576677823],
  PARAMETER["elt_1_1", -2.49226804123475],
  PARAMETER["elt_1_2", 5801313.67936748]]]

Attached is a quickly-hacked-together test case that demonstrates the problem, and shows that the problem seems to be dependent on the source data since the coverage being tested (kamp_umriss) gets the correct grid geometry.

I can supply the source coverage(s) (ARCGRID) if someone wants to try and replicate the problem on their own GeoServer.

The best would be you to open a jira issue, schedule it for 1.5.2, and
attach the (compressed) sample file to it. This way we won't forget
to handle it and when the time comes we'll have all the required information to reproduce and fix.

Cheers
Andrea