Automatic extent derivation

Paul Ramsey pramsey at REFRACTIONS.NET
Tue Feb 8 18:19:00 EST 2005


If you have a fixed number of combinations, make a metadata table that
maps feature type name to extent. You still have to do two queries (you
always will) but the first one is a lot cheaper.

P

Steve Hall wrote:

> Hi all,
>
> I'm doing some R & D for a system that is going need to produce as many
> as 40 maps per second for a busy web site.  The mapdata is going come
> from either PostGIS or Oracle Spatial.  Each map will be different and
> should immediately zoom to the full extent "defined" by one of the
> layers which will be a spatial query "defining" the results of the users
> request.
>
> My question is about the best way of deriving that extent.  I could
> (effectively) run the spatial query twice - once myself in PHP/MapScript
> (or whatever language is used to create the map) to get the extent (and
> hence set it "into" the MapServer request) and then MapServer itself
> will perform a very similar query to actually draw the map.  As
> performance is of paramount importance i'd like to remove this
> "duplication" if at all possible.
>
> I may be missing something obvious but is there an easy way to do this?
> Ideally i'd just like to specify that the map should always zoom to the
> extent "implied" by a particular layers features.
>
> Many thanks for your thoughts,
>
> Steve H



More information about the mapserver-users mailing list