[gdal-dev] "gdalwarp -te " units of source or target srs?

Even Rouault even.rouault at mines-paris.org
Wed Nov 19 17:36:31 EST 2008


I believe that -te coordinates must be expressed in target coordinate system

And I guess that the reason for the negative height is that you have switched 
ymin and ymax in your command line (1322540.680 > 652516.412).

Le Wednesday 19 November 2008 23:27:35 Matt Wilkie, vous avez écrit :
> Hello,
>
> With regards to gdalwarp target_extent parameter, are the coords for the
> target coordinate system or the source coordinate system?
> from http://www.gdal.org/gdalwarp.html:
>
>     -te xmin ymin xmax ymax:
>         set georeferenced extents of output file to be created.
>
> I ask because I'm getting "ERROR 1: Attempt to create 11158x-7438
> dataset is illegal,sizes must be larger than zero." and I don't know
> whether it's because both the source and targe SRS have negative coords
> in their extent or my clipping coords are out of bounds or something else.
>
> gdalwarp -t_srs %dst_proj% in.tif out.tif -te -2949.031, 1322540.680
> 1002042.239,  652516.412
> Creating output file that is 11158P x -7438L.
> ERROR 1: Attempt to create 11158x-7438 dataset is illegal,sizes must be
> larger than zero.
>
> gdalinfo in.tif
> ...snip
> Upper Left  ( -500395.349, 1930874.566) (159d17'52.58"W, 69d54'34.69"N)
> Lower Left  ( -500395.349,   -6735.434) (147d27'23.12"W, 53d20'24.33"N)
> Upper Right ( 1556734.651, 1930874.566) (104d22'44.55"W, 69d41'49.51"N)
> Lower Right ( 1556734.651,   -6735.434) (116d44'4.97"W, 53d13'1.10"N)
> Center      (  528169.651,  962069.566) (131d56'26.40"W, 63d 8'54.60"N)
>
> gdalinfo out_tif_template.tif
> ...snip
> Upper Left  (   -3009.232, 1322710.243) (152d 7'23.36"W, 65d59'29.18"N)
> Lower Left  (   -3009.232,  652571.483) (150d 2'48.82"W, 60d 3'7.24"N)
> Upper Right ( 1002049.121, 1322710.243) (129d53'51.55"W, 65d59'34.53"N)
> Lower Right ( 1002049.121,  652571.483) (131d58'12.52"W, 60d 3'11.61"N)
> Center      (  499519.945,  987640.863) (141d 0'34.57"W, 63d22'43.99"N)
>
>
> thanks,




More information about the gdal-dev mailing list