[UMN_MAPSERVER-USERS] Question re: PostGIS and MapScript
getExtent() function
Paul Ramsey
pramsey at REFRACTIONS.NET
Wed Jul 13 10:18:29 EDT 2005
(a) The head rectangle of the index is not the real extents, it is an
approximation, particularly after some deletes. It is, however, at
least always a superset of the real extents.
(b) Not every table has a spatial index.
(c) Every version of PostgreSQL has a different API into the index
(OK, that's not a reason that's just laziness:)
(d) Even if we added that function, the mass of PostGIS users would
not have the new function for a long time, so the underlying problem
would remain for Mapserver.
Probably we will end up adding this stuff, but the real issue is that
not all datasets can return fast extents, and the use cases for
extents can be broken into "fast and approximate" and "slow and
accurate" so there really should be a couple of methods, not just the
one.
Paul
On 13-Jul-05, at 6:52 AM, Daniel Morissette wrote:
> Paul Ramsey wrote:
>
>> Steve,
>> Try it on a 20M record table in Oracle. Both implementations,
>> Oracle's and your uncommented PostGIS one, do the same functional
>> thing, which is a full table scan. It is possible that Oracle is
>> slightly smarter about reading the index for the AGGR_MBR case,
>> which might make it work better on large tables: one for the
>> testing range.
>>
>
> Since you guys wrote all the indexing code in postgis, would you
> not be able to add a function to fetch the real data extents from
> the index somehow? That would give fast and accurate responses all
> the time. Is this information not available in the data structures
> somewhere?
>
> Daniel
> --
> ------------------------------------------------------------
> Daniel Morissette dmorissette at dmsolutions.ca
> DM Solutions Group http://www.dmsolutions.ca/
> ------------------------------------------------------------
>
More information about the mapserver-dev
mailing list