[postgis-devel] WKTRaster ST_MapAlgebra

David Zwarg dzwarg at avencia.com
Fri Feb 19 08:05:10 PST 2010


Ok, I've come to the conclusion that rasters in the same coordinate system
have the same rotation (in ArcGIS), since I can't seem to rotate a raster
without processing it into a set of new cells on the same grid.

I also found/confirmed that the *larger* cell size always wins.  The output
ends up with the cell size of the largest of all the inputs.

As for alignment: the alignment of the grid starts at the intersecting
boundary.  This is true for the *left and bottom* coordinates -- the right
and top coordinates are constrained by the new cell size * intersection
width/height.  It's possible that the grid in the intersection *does not
cover the entire intersecting area* if there is an odd remainder.

Example:

   - raster A : cell size: 4, width: 8 cells (32 units), height: 8 cells (32
   units)
   - raster B : cell size: 9, width: 10 cells, height: 10 cells
   - raster A's envelope is completely inside of raster B

I would assume that under those conditions, the output raster would have the
same envelope as A.  What actually happens is that the output cell size is
set to 9, and the closet dimension that fits inside of A's envelope is 9
units X 3 cells = 27. There is a difference of 5 units between the envelope
of the output raster and raster A.  The grid starts at raster A's bottom
left coordinate, so the 5 units of data lost are the topmost and rightmost
cells in raster A.

So it would appear that the resample operation does imply a realignment (I
can confirm translation only, not rotation), and that it is not possible to
resample without realignment.

Zwarg

On Thu, Feb 18, 2010 at 6:25 PM, David Zwarg <dzwarg at avencia.com> wrote:

>
>
>> What append when they have the same CS and pixel size but the intersecting
>> area have different alignment (or rotation)? Does the resample operation
>> imply realignment? Is it possible to resample without realigning (I want to
>> transform to the same pixel size but keep my alignment)?
>>
>>
> I'm looking into these scenarios.
>
> Zwarg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20100219/d3057d0d/attachment.html>


More information about the postgis-devel mailing list