Opened 21 years ago

Last modified 21 years ago

#299 assigned enhancement

Request for default EXTENT

Reported by: jhart@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer CGI Version: 4.1
Severity: minor Keywords:
Cc:

Description

When no extent is set, MapServer now crashes. A default extent, based on the
bounding box of all layers combined, would prevent this. Also, overviews of
unknown maps and rasters could be generated very quickly. This would be
especially handy in cases when people "don't see anything" as a result of
setting the EXTENT wrong.

From Steve Lime's posting 22-3-2003:

Interestingly the tool (i.e. msLayerGetExtent() function) to get that value has
already been written and just needs to be hooked up in the CGI version and
perhaps as a method for MapScript (eg. $map->setDefaultExtent();).

Jan Hartmann

Change History (3)

comment:1 by dmorissette, 21 years ago

Cc: morissette@… added
Summary: Request for default EXTENT Request for default EXTENT
Note that this feature will come with a performance cost, which may be
huge for some layer types... so the documentation should be clear on the
fact that setting explicit extents in the mapfile is still very strongly
recommended.  (I would personally have opted for creating a command-line
utility that would scan all layers in a mapfile and report the extents.)

For instance, this will be very slow with OGR CONNECTIONs to ASCII file
formats, or even some binary formats that don't carry any extents
information in the file header.  It will also be slow with connections
to spatial databases since the databases will have to evaluate the SQL
query in order to return the extents.  Finally, I'm not even sure how
this lack of extents would/should be handled in the case of WMS or WFS
layers.

comment:2 by dmorissette, 21 years ago

Version: 4.04.1
Won't be done in 4.0 ... maybe in 4.1?

comment:3 by sdlime, 21 years ago

Status: newassigned
A good idea, but low priority since there's a very workable solution- set an 
EXTENT! I *could* quickly modify the map file loader to throw an error if there 
isn't a default set though. That won't fix MapScript which allows you to build 
map files from scratch.
Note: See TracTickets for help on using tickets.