[UMN_MAPSERVER-USERS] Question re: PostGIS and MapScript getExtent() function

Daniel Morissette dmorissette at DMSOLUTIONS.CA
Wed Jul 13 10:37:44 EDT 2005


Paul Ramsey wrote:
> (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.
> 

Thanks for the answer, as you could tell I know nothing about the 
postgis implementation so I was just wondering what was possible.

This being said, I remember working with Oracle Spatial a few years ago 
and being very disapointed that it didn't provide an easy way to get 
accurate extents. I personally think this is a serious limitation that 
any serious spatial database should fix... hopefully postgis will take 
the lead and be the first spatial database to do this right.


> 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.
> 

There is already the option of setting the extent manually in the layer 
if your underlying datasource doesn't support returning extents in an 
accurate or efficient way. Isn't that enough?

I'm not yet convinced that using Fast in the WMS case and Slow+Accurate 
in all other cases will be an aceptable solution, at least not for all 
WMS users. I guess I'd need to think about the problem and our options 
some more.

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-dev mailing list