Opened 15 years ago

Closed 15 years ago

#2635 closed defect (invalid)

gdalwarp with -tps crash

Reported by: moggy Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

Using GDAL 1.6.0dev, FWTools 2.0.6, released 2008/02/03 on x86 linux

When I use the -tps option to gdalwarp I get this error:

/opt/FWTOOLS/bin/gdalwarp -of GTiff -co COMPRESS=PACKBITS -r near -tps -s_srs EPSG:4326 -t_srs EPSG:4326 -te 171 -46 172 -44 /tmp/GeoRef.4754.5 /home/wayne/test.tif Copying color table from /tmp/GeoRef.4754.5 to new file. Creating output file that is 0P x 0L. ERROR 1: Attempt to create 0x0 dataset is illegal,sizes must be larger than zero.

Command works fine if the -tps option is dropped.

gdalinfo on the input image gives: gdalinfo /tmp/GeoRef.4754.5 Driver: VRT/Virtual Raster Files: /tmp/GeoRef.4754.5 Size is 10100, 13743 Coordinate System is `' GCP Projection = GCP[ 0]: Id=, Info=

(1749,935) -> (171,-44,0)

GCP[ 1]: Id=, Info=

(5602,845) -> (172,-44,0)

GCP[ 2]: Id=, Info=

(9462,851) -> (173,-44,0)

GCP[ 3]: Id=, Info=

(9395,6139) -> (173,-45,0)

GCP[ 4]: Id=, Info=

(5659,6118) -> (172,-45,0)

GCP[ 5]: Id=, Info=

(1934,6207) -> (171,-45,0)

GCP[ 6]: Id=, Info=

(2121,11479) -> (171,-46,0)

GCP[ 7]: Id=, Info=

(5705,11392) -> (172,-46,0)

GCP[ 8]: Id=, Info=

(9347,8781) -> (173,-45.5,0)

GCP[ 9]: Id=, Info=

(7502,11396) -> (172.5,-46,0)

GCP[ 10]: Id=, Info=

(1842,3567) -> (171,-44.5,0)

GCP[ 11]: Id=, Info=

(2028,8840) -> (171,-45.5,0)

GCP[ 12]: Id=, Info=

(9430,3486) -> (173,-44.5,0)

GCP[ 13]: Id=, Info=

(3914,11422) -> (171.5,-46,0)

Metadata:

AREA_OR_POINT=Area

Corner Coordinates: Upper Left ( 0.0, 0.0) Lower Left ( 0.0,13743.0) Upper Right (10100.0, 0.0) Lower Right (10100.0,13743.0) Center ( 5050.0, 6871.5) Band 1 Block=128x128 Type=Byte, ColorInterp=Palette

Color Table (RGB with 256 entries)

0: 255,255,255,255 1: 0,0,0,255 2: 0,0,0,255

...

255: 0,0,0,255

Change History (3)

comment:1 by Even Rouault, 15 years ago

moggy,

I see that your GCP have negative latitudes. I encountered a very simular issue and commited a fix just a few days ago.

If you are in a position to compile GDAL by yourself, could you retest with GDAL SVN trunk and confirm that it fixes your issue ? You can find daily snapshots at http://download.osgeo.org/gdal/daily/

comment:2 by moggy, 15 years ago

rouault,

Yes the problem doesn't exist with the curretn daily build.

Thanks

comment:3 by Even Rouault, 15 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.