[postgis-devel] [PostGIS] #1174: [raster] C-level index-to-geocoordinate functions
PostGIS
trac at osgeo.org
Tue Sep 27 11:37:59 PDT 2011
#1174: [raster] C-level index-to-geocoordinate functions
-----------------------------+----------------------------------------------
Reporter: bnordgren | Owner: pracine
Type: enhancement | Status: reopened
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis raster | Version: 1.5.X
Resolution: | Keywords:
-----------------------------+----------------------------------------------
Comment(by dustymugs):
Replying to [comment:3 bnordgren]:
> With respect, r7884 does two potentially important things differently:
>
> 1. It recomputes the matrix inverse of the affine transform on every
single call (as opposed to only when the transform changes.) As this is a
per-pixel operation, whatever small penalty this may incur could well be
multiplied by a factor of several hundred million.
Only the commented-out validation code generates the matrix inverse. At
minimum, the active code only calculates the denominator of the rearranged
equation for division by zero. That denominator could be cached...
> 1. There's a strange mix of delegating the operation to GDAL for the
cell-to-geopoint direction, but implementing it ourselves for the
geopoint-to-cell operation. Worse, neither the comments nor the error
messages indicate that this is a matrix inverse operation and there's no
mention of where the equation comes from. (Or that "d" is the matrix
determinant instead of the scale.) If the commented-out-test-code ever
gets deleted, someone could well spend a very long time just trying to
figure out what this code is intending to do when investigating some
random future problem.
>
Neither geopoint_to_cell or cell_to_geopoint use GDAL. "d" is just the
denominator and processed prior to everything else just to test for
divisiion by zero.
> Can we at least add a comment with a link to here:
http://mathworld.wolfram.com/MatrixInverse.html ?
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1174#comment:4>
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