[gdal-dev] What should I expect?

2012-08-10 Thread Jorge Arevalo
Hello,

If while I'm executing gdalinfo against a raster layer I get a
positive value for pixel size Y, what of these scenarios is possible?

- The raster's map coordinate system sets the origin of the data in
the upper left corner.
- The raster is not georeferenced and its coordinates are interpreted
as image pixels, instead of map units.
- Any other situation (corrupt file?, other?)

I know this value is almost always negative. For example, in case of
UTM coordinate system. But, how common is to have a positive value for
Y coordinate?

Many thanks in advance

-- 
Jorge Arevalo
http://www.libregis.org
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] What should I expect?

2012-08-10 Thread Martin Chapman
Jorge,

It's a south up image.  If the gsd x value is negative the image is an
east to west image.  Normally a north up image will have a positive gsd x
and a negative gsd y.

Marty

-Original Message-
From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Jorge Arevalo
Sent: Friday, August 10, 2012 9:39 AM
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] What should I expect?

Hello,

If while I'm executing gdalinfo against a raster layer I get a positive
value for pixel size Y, what of these scenarios is possible?

- The raster's map coordinate system sets the origin of the data in the
upper left corner.
- The raster is not georeferenced and its coordinates are interpreted as
image pixels, instead of map units.
- Any other situation (corrupt file?, other?)

I know this value is almost always negative. For example, in case of UTM
coordinate system. But, how common is to have a positive value for Y
coordinate?

Many thanks in advance

--
Jorge Arevalo
http://www.libregis.org
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] What should I expect?

2012-08-10 Thread Jorge Arevalo
Hi,

Many thanks for your response, Martin. So, it doesn't need to be a
mistake. Just a flipped image.

The doubt raised because, for example, gdalbuildvrt doesn't accept ns
positive resolution values. Looking at this old ticket
http://trac.osgeo.org/gdal/ticket/3432, seems that that kind of raster
data can't be mosaiced. You get an error. I don't understand why.

I know cartesian coordinate system sets the origin in the bottom left
corner, while images set the origin in the top left  corner. So, the
ns resolution of a georeferenced image is negative. Otherwise, you get
a south up image. But... if all the images you want to mosaic have
this "problem" (positive ns resolution), why I can't mosaic them using
gdalbuiltvrt?

Best regards,
Jorge

On Fri, Aug 10, 2012 at 6:09 PM, Martin Chapman  wrote:
> Jorge,
>
> It's a south up image.  If the gsd x value is negative the image is an
> east to west image.  Normally a north up image will have a positive gsd x
> and a negative gsd y.
>
> Marty
>
> -Original Message-
> From: gdal-dev-boun...@lists.osgeo.org
> [mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Jorge Arevalo
> Sent: Friday, August 10, 2012 9:39 AM
> To: gdal-dev@lists.osgeo.org
> Subject: [gdal-dev] What should I expect?
>
> Hello,
>
> If while I'm executing gdalinfo against a raster layer I get a positive
> value for pixel size Y, what of these scenarios is possible?
>
> - The raster's map coordinate system sets the origin of the data in the
> upper left corner.
> - The raster is not georeferenced and its coordinates are interpreted as
> image pixels, instead of map units.
> - Any other situation (corrupt file?, other?)
>
> I know this value is almost always negative. For example, in case of UTM
> coordinate system. But, how common is to have a positive value for Y
> coordinate?
>
> Many thanks in advance
>
> --
> Jorge Arevalo
> http://www.libregis.org
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev



-- 
Jorge Arevalo
http://www.libregis.org
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] What should I expect?

2012-08-11 Thread Even Rouault
Le vendredi 10 août 2012 22:28:34, Jorge Arevalo a écrit :
> Hi,
> 
> Many thanks for your response, Martin. So, it doesn't need to be a
> mistake. Just a flipped image.
> 
> The doubt raised because, for example, gdalbuildvrt doesn't accept ns
> positive resolution values. Looking at this old ticket
> http://trac.osgeo.org/gdal/ticket/3432, seems that that kind of raster
> data can't be mosaiced. You get an error. I don't understand why.
> 
> I know cartesian coordinate system sets the origin in the bottom left
> corner, while images set the origin in the top left  corner. So, the
> ns resolution of a georeferenced image is negative. Otherwise, you get
> a south up image. But... if all the images you want to mosaic have
> this "problem" (positive ns resolution), why I can't mosaic them using
> gdalbuiltvrt?

Jorge,

You could certainly remove this limitation of gdalbuildvrt. I put it because 
I'm lazy and don't usually deal with south-up images (and because images with 
postive ns resolution are in 99% of the cases in fact ungeoreferenced images, 
which you don't want to mosaic). I suspect that just removing the test might 
make things work. I let you experiment with that.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev