[postgis-devel] PostGIS Raster problem

Jorge Arévalo jorge.arevalo at deimos-space.com
Thu Oct 20 08:25:55 PDT 2011


Hi,

Mmm... just checked. Yes, GDAL driver uses ST_Metadata, when opening
the raster. Sorry.

Anyway, looks like a ST_Metadata function problem, not related with
the driver, yes.

Best regards,
Jorge

On Thu, Oct 20, 2011 at 4:36 PM, David B�langer <belanger_david at live.ca> wrote:
> Hi,
> I understand what you said but Is it possible that the GDAL driver uses the
> ST_MetaData() function of PostGIS ? I’m using GDAL 1.8. I don’t think that
> the problem is the version of GDAL because when I'm using gdal_translate
> with an old version of PostGIS I'm having a good result but when I'm using
> the version r7616 there is a problem. Like I said the x and y of the upper
> left corner and the resolution of the data extracted are rounded. It is
> exactly the same result of the ST_MetaData() function executed in an SQL
> API. It is why I have suspected the problem in the ST_MetaData() function.
> Do you think there is an other possibility ? Anyway I will intall the new
> version of PostGIS and I will see.
>
>
> Thanks
>
>
>
> David
>
>
>> From: jorge.arevalo at deimos-space.com
>> Date: Thu, 20 Oct 2011 10:05:19 +0200
>> To: postgis-devel at postgis.refractions.net
>> Subject: Re: [postgis-devel] PostGIS Raster problem
>>
>> I think it may be a confussion here. If you are using the ST_Metadata
>> function, you're NOT using GDAL PostGIS Raster driver. The driver is
>> used to read raster data from database without using the SQL API. For
>> example, with gdalinfo, or gdal_translate.
>>
>> Anyway, which GDAL version are you using?
>>
>> On Wed, Oct 19, 2011 at 10:00 PM, David B�langer <belanger_david at live.ca>
>> wrote:
>> > Thank you ! I'm using the revision r7616. I will use
>> > the current revision.
>> >
>> > David
>> >
>> >> Date: Wed, 19 Oct 2011 12:36:46 -0700
>> >> From: dustymugs at gmail.com
>> >> To: postgis-devel at postgis.refractions.net
>> >> Subject: Re: [postgis-devel] PostGIS Raster problem
>> >>
>> >> On 10/19/2011 12:21 PM, David B�langer wrote:
>> >> >
>> >> > Hi,
>> >> > I use the GDAL driver to extract a raster from PostGIS 2.0 but I got
>> >> > bad
>> >> > results. The x and y of the upper left corner and the resolution are
>> >> > bad. It
>> >> > seems that these properties have been rounded. This problem has
>> >> > appeared
>> >> > since the summer version of PostGIS 2.0. I didn't have this problem
>> >> > before.
>> >> > I think the problem is in the ST_MetaData() function which is used by
>> >> > the
>> >> > GDAL driver. I know that this function was modified this summer. The
>> >> > others
>> >> > functions (eg. ST_ScaleX, ST_ScaleY, ST_UpperLeftX...) give good
>> >> > results.
>> >> >
>> >> > I have compared the result of the summer version of PostGIS with the
>> >> > old
>> >> > version.
>> >> > The results:
>> >> > select ST_MetaData(rast)…:
>> >> > Old version of database:
>> >> > "(-71.7501041666667,45.5001041666667,1200,1200,0.000208333333333333,
>> >> > 0.000208333333333333,0,0,4269,1)"
>> >> > Database Since this summer:
>> >> > "(-71.750104,45.500104,1200,1200,0.000208,
>> >> > -0.000208,0,0,4269,1)"
>> >> > The result of the old version of the database is the truth.
>> >> >
>> >> > Does anyone know this problem and can you help me?
>> >> >
>> >> > Thanks !
>> >> > David
>> >> >
>> >> >
>> >>
>> >> What revisions of PostGIS trunk are you using? I rewrote the
>> >> ST_Metadata function over the summer and had to tweak it some time
>> >> afterwards due to how the values were getting rounded depending on how
>> >> the C function returned (Datums vs. CStrings).
>> >>
>> >> After digging through the logs, you'll want to be using r7638
>> >> (7/14/2011) or more recent to ensure that your answers are correct.
>> >>
>> >> -bborie
>> >> _______________________________________________
>> >> postgis-devel mailing list
>> >> postgis-devel at postgis.refractions.net
>> >> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>> >
>> > _______________________________________________
>> > postgis-devel mailing list
>> > postgis-devel at postgis.refractions.net
>> > http://postgis.refractions.net/mailman/listinfo/postgis-devel
>> >
>> >
>>
>>
>>
>> --
>> Jorge Arévalo
>> Internet & Mobility Division, DEIMOS
>> jorge.arevalo at deimos-space.com
>> http://es.linkedin.com/in/jorgearevalo80
>> http://mobility.grupodeimos.com/
>> http://gis4free.wordpress.com
>> http://geohash.org/ezjqgrgzz0g
>> _______________________________________________
>> postgis-devel mailing list
>> postgis-devel at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>



-- 
Jorge Arévalo
Internet & Mobility Division, DEIMOS
jorge.arevalo at deimos-space.com
http://es.linkedin.com/in/jorgearevalo80
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g



More information about the postgis-devel mailing list