[postgis-users] Transform

Bborie Park bkpark at ucdavis.edu
Tue Feb 28 09:35:07 PST 2012


You could always use ST_Resample from the get-go as ST_Transform is just 
a simplification of ST_Resample.

You'll want to pass a reference raster with the appropriate attributes 
to ST_Resample when you're transforming the rasters.

-bborie

On 02/28/2012 08:56 AM, Pierre Racine wrote:
> Bborie,
>
> Is there any way to force ST_Transform(rast, srid) to produce rasters with a specific, identical alignment?
>
> Or we have to ST_Resample them afterward?
>
> Pierre
>
>> -----Original Message-----
>> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
>> bounces at postgis.refractions.net] On Behalf Of Stephen Crawford
>> Sent: Tuesday, February 28, 2012 11:51 AM
>> To: postgis-users at postgis.refractions.net
>> Subject: Re: [postgis-users] Transform
>>
>> ScaleX and ScaleY are identical for each tile in the original table, and are all
>> different in the transformed table, which I guess should make sense on a
>> transform?
>>
>> I actually now think my output problem is in GDAL.  I have been outputting
>> AAIGrids which I then use in geoserver.  The values are between 0 and 1, and I
>> think GDAL is auto-detecting the table as int and giving me all 0.  At least I think
>> that is what is happening :-)  I will try the process with another table.
>>
>> Steve
>>
>> On 2/28/2012 11:27 AM, Pierre Racine wrote:
>>>> OK, it seems ST_Transform is working for me, but I'm a bit confused
>>>> about the "raster_columns" table. The original (pre-transform) raster
>>>> table is a set of 187 tiles.  In raster_columns 'scale_x', 'scale_y',
>>>> 'blocksize_x', 'blocksize_y' are all defined, and 'same_alignment'=t.
>>>> Then when I run AddRasterConstraints(output_table, 'rast'), these
>>>> value are either null or f.  Do I need to do anything else to use the
>>>> reprojected data, like re-tile it or something?
>>> What if you display their extents (rast::geometry) in OpenJump or another
>> display tool? Do they align properly?
>>>
>>> Are the scalex and scaley, just to mention them, identical for every tile?
>>>
>>> Pierre
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>> --
>> Stephen Crawford
>> Center for Environmental Informatics
>> The Pennsylvania State University
>> src176 at psu.edu
>> 814.865.9905
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>

-- 
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkpark at ucdavis.edu



More information about the postgis-users mailing list