Opened 11 years ago

Closed 11 years ago

#4961 closed defect (fixed)

gdalwarp error when reprojecting EPSG 4326 to EPSG 3575

Reported by: maxkoenig72 Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.8.1
Severity: normal Keywords: gdalwarp
Cc:

Description

Hi,

I have been for days trying to find a mistake and start wondering if this is a bug. Trying to use gdalwarp to convert from EPSG:4326 to EPSG:3575, the result does not match (see attached image ). Reprojecting in ESA NEST Toolbox gives the correct result, but not gdalwarp.

gdalinfo from the input file:

Coordinate System is `'
GCP Projection =
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
GCP[  0]: Id=1, Info=
          (0.5,0.5) -> (12.4717730153928,83.5485137009004,0)
GCP[  1]: Id=2, Info=
          (10529.5,0.5) -> (43.3648486806421,81.0968389616588,0)
GCP[  2]: Id=3, Info=
          (10529.5,9971.5) -> (28.2126603736841,77.5379579950479,0)
GCP[  3]: Id=4, Info=
          (0.5,9971.5) -> (6.16297932562466,79.2200973523723,0)
Metadata:
  TIFFTAG_IMAGEDESCRIPTION={
  bandList =
  [
    1;
  ]
}
  TIFFTAG_DATETIME=2013:01:07 06:17:31
  TIFFTAG_MINSAMPLEVALUE=0
  TIFFTAG_MAXSAMPLEVALUE=65535
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 9972.0)
Upper Right (10530.0,    0.0)
Lower Right (10530.0, 9972.0)
Center      ( 5265.0, 4986.0)
Band 1 Block=10530x49 Type=UInt16, ColorInterp=Gray

and using

gdalwarp -t_srs "+proj=laea +lat_0=90 +lon_0=10 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" gdalsourcefile outputfilename

also tried (with or without giving -s_srs; no difference)

gdalwarp -t_srs "EPSG:3575" gdalsourcefile outputfilename

Attachments (1)

gdalwarp.png (405.1 KB ) - added by maxkoenig72 11 years ago.
gdalwarp EPSG 4326 to 3575

Download all attachments as: .zip

Change History (3)

by maxkoenig72, 11 years ago

Attachment: gdalwarp.png added

gdalwarp EPSG 4326 to 3575

comment:1 by Even Rouault, 11 years ago

There are not so many GCP to do the reprojection. With only 4 GCPs, 1st order polynomial warping has been applied. Perhaps try adding the -tps option to select the Thin Plate Spline algorithm.

comment:2 by maxkoenig72, 11 years ago

Resolution: fixed
Status: newclosed

I found the answer actually. The Radarsat imagery_HH.tif file alone does not access the geolocation grid in the data. I can actually give the product.xml file as input to gdalwarp. And then the result using the whole geolocation grid is perfect.

So no bug. But your comment put me on the right track

Note: See TracTickets for help on using tickets.