[Mapserver-users] default extent

Jan Hartmann jhart at frw.uva.nl
Sat Mar 22 03:01:26 PST 2003


I put a request in Bugzilla to let a mapfile's extent default to the 
bounding box of all layers combined. This would come in very handy for 
peaple starting with a bunch of GIS- and raster-files they are not 
acquainted with. Setting a false extent will generally produce a blank 
map. When one could leave out extent altogether, something would be 
visible in any case (provided STATUS DEFAULT is set of course -:) ), 
though probably not at the expected position or scale.

Jan

BTW I saw that some items in Bugzilla were put in a language vaguely 
reminiscent of French, e.g:

"J'ai roule mapserver 3.5 (avec la getgeatureinfo) et voici les memory
leaks reportes" (bug 42)

Is this native Canadian?

Steve Lime wrote:
> Who wrote that documentation? It's wrong so it was probably me... ;-)
> The extent given in the map file IS the default extent. So, if you
> access the application and don't specifiy and extent (via a myriad of
> means) then that value will be used. There is no magic way to create it
> in absence of setting it. The default is something like -1,-1,-1,-1 and
> the scale computation code checks for a degenerate extent and reports
> the error you mention.
> 
> The code *should* (in absence of an extent) examine all layers and come
> up with a minimum bounding box. You can add this as a feature request to
> bugzilla but it's not a high priority... 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();).
> 
> Steve
> 
> Stephen Lime
> Data & Applications Manager
> 
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937
> 
> 
>>>>Jan Hartmann <jhart at frw.uva.nl> 03/21/03 10:04AM >>>
> 
> The MS3.7 MapFile doc says under the MAP heading:
> 
> -------------------------------------
> EXTENT [minx] [miny] [maxx] [maxy]
> 
>      The spatial extent of the map to be created. Most often you will 
> want to specify this, although mapserver will extrapolate one if none
> is 
> specified.
> ---------------------------------------
> 
> It would be nice if EXTENT had some sort of default, but I always get
> an 
> error-message when I don't specify it:
> 
> (msCalculateScale(): General error message. Invalid image extent).
> 
> What exactly does this mean?
> 
> Jan
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu 
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 

Jan Hartmann
Department of Geography
University of Amsterdam
jhart at frw.uva.nl




More information about the MapServer-users mailing list