Ticket #299 (assigned enhancement)

Opened 5 years ago

Last modified 5 years ago

Request for default EXTENT

Reported by: jhart@frw.uva.nl Assigned to: sdlime (accepted)
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

03/22/03 14:47:40 changed by dmorissette

  • cc set to morissette@dmsolutions.ca.
  • summary changed from Request for default EXTENT to 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.

06/30/03 15:40:31 changed by dmorissette

  • version changed from 4.0 to 4.1.
Won't be done in 4.0 ... maybe in 4.1?

06/30/03 16:52:13 changed by sdlime

  • status changed from new to assigned.
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.