[postgis-devel] [PostGIS] #1114: [raster] ST_Resample
PostGIS
trac at osgeo.org
Sat Jul 9 07:12:11 PDT 2011
#1114: [raster] ST_Resample
----------------------------+-----------------------------------------------
Reporter: dustymugs | Owner: dustymugs
Type: task | Status: new
Priority: medium | Milestone: PostGIS Raster Future
Component: postgis raster | Version: trunk
Keywords: |
----------------------------+-----------------------------------------------
Comment(by pracine):
Replying to [comment:14 dustymugs]:
> Replying to [comment:12 pracine]:
> > I don't think so. That would unwisely change the shape of the raster
footprint. I knew I described this better. It is in the ST_AsRaster()
specs where I describe how to align the desired raster. I will try to
describe it better here...
> >
> > In the ST_Resample specs, the second series of variant to not define
what should be the new upperleft corner of the raster. They define a grid
on which the raster should snap to. So it is neither of your drawings...
An alignment grid is defined by x, y and a pixelsize. The pixel size can
be defined with just 'pixelsize', meaning that scalex = scaley and skewx =
skewy = 0 of with some of those pixelsize parameters (variants 7 and 9).
This is why I did not call them ulx and uly but just x and y. Those x and
y are arbitrary upperleft corner of ANY pixel of the new grid to snap to.
You have to compute the new ulx and uly of the resampled raster
according/to snap to this grid.
> >
> > Sorry if this was not explained...
>
> I think I understand what you're describing. I'm going to have to let
this sink in for a bit to understand the calculation involved.
This is basically the same behaviour as ST_SnapToGrid... We should even
provide a set of alias to the second series of ST_Resample variants named
SnapToGrid. The first set of variant do not really 'snap to grid'. They
only change the pixel size without touching the upperleft corner.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1114#comment:16>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list