[postgis-devel] [PostGIS] #1267: [raster] Add manual height/weight support to ST_Resample
PostGIS
trac at osgeo.org
Mon Nov 7 11:48:59 PST 2011
#1267: [raster] Add manual height/weight support to ST_Resample
----------------------------+-----------------------------------------------
Reporter: serveralex | Owner: dustymugs
Type: enhancement | Status: assigned
Priority: medium | Milestone: PostGIS Raster Future
Component: postgis raster | Version: trunk
Keywords: |
----------------------------+-----------------------------------------------
Comment(by bnordgren):
Replying to [comment:1 dustymugs]:
>The assumption that you're making about the resulting raster having the
exact same parameters as the reference raster is incorrect if the two
rasters are different (such as where the extent of one is larger than that
of the other).
Is there a solid justification for this? What does it matter if the
requested output grid is smaller or larger than the input? All you need to
do is iterate over every cell in the requested grid and perform the
resample operation. In any case, the output and input grid definitions
will never be identical (why resample to the same grid? you already have
it!)
Replying to [comment:2 pracine]:
> You might want to align a raster to another one in which case you need
to borrow its scales, its skew and its upperleft corner to determine the
new grid on which to align the new resampled raster. We offer the
possibility to borrow them from another raster because they are generally
cumbersome to write by hand. You may also want to explicitly pass those
parameters.
I agree. The unit of borrowing should be the entire grid definition
(width, height, and the affine transform to the geopoint). Note that this
also requires that the target raster "borrow" the SRID, as the affine
transform is tied to a particular geospatial CRS.
However, I don't see why it should be necessary to alter the signature in
order to do this. The user can construct a raster with no bands, configure
its grid definition to their heart's content, then require that the
resampling operation respect the grid definition specified in the "ref"
raster. If they want to resample many sources to a common grid, they just
keep specifying the same "ref" raster over and over again.
> I would prefer the addition of a new signature accepting width and
height than having one borrowing of dimensions from another raster.
Again, width and height alone are not useful without all of the other
contextual information provided in a grid definition. All or nothing! :)
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1267#comment:5>
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