How is scale computed?
Assefa Yewondwossen
assefa at dmsolutions.on.ca
Tue Nov 14 11:22:37 PST 2000
Just a note related to MIN/MAXSCALE on php/mapscript :
For those using php/mapscript, there is a function ms_getscale that is available. I
find it personnaly very usufull to quickly find the scale values before setting the
MIN/MAXSCALE in the map file.
$dfScale = ms_getscale($gpoMap->extent, $gpoMap->width,
$gpoMap->height, $gpoMap->units);
Later,
kenboss wrote:
> There may be an easier way to accomplish what you're after. If there is an
> attribute in your shapefile that can be used to determine priority for display,
> then you can use the sortshp utility from your mapserver distribution to
> physically sort the shapefile on that attribute. Use the output from that
> process as the DATA element in your layer, and set MAXFEATURES for the layer to
> an appropriate number. The number of shapes drawn for that layer will then not
> be allowed to exceed the MAXFEATURES setting, while the sorting ensures that
> only the most important shapes are drawn when the users are zoomed out at
> smaller scales.
>
> Hope this helps. Otherwise, Steve did recently submit a post concerning scale
> calculation. It's at
> http://mapserver.gis.umn.edu/majordom_lists/archives/mapserver-users/html/0010/m
> sg00138.html
>
> Ken Boss
>
> > X-Authentication-Warning: green.edi.uk.mids.org: ksibson owned process doing
> -bs
> > Date: Tue, 14 Nov 2000 16:37:04 +0000 (GMT)
> > From: Keith Sibson <ksibson at matrix.net>
> > X-Sender: ksibson at green
> > To: mapserver-users at lists.gis.umn.edu
> > Subject: How is scale computed?
> > MIME-Version: 1.0
> >
> >
> > Hi,
> >
> > I can't find anything in the archives about this so here goes...
> >
> > I'm using map server to display a very large amount of data points, so
> > what I'm doing is to automatically generate shapefiles across several
> > layers. The top level layers are heavily clustered and the lowest layer
> > not clustered at all. Since these layers show the same data, their
> > display is mutually exclusive. In this way, I intend only 50-100 points to
> > be visible at any one time. This can be done by setting an appropriate
> > MINSCALE and MAXSCALE for each of them in the map file.
> >
> > The problem is that I need to automatically determine MINSCALE and
> > MAXSCALE.
> >
> > If I know the initial map extent and the zoom factor per level of detail,
> > how do I go about computing the scales at which the layer divisions occur.
> > Assuming that the layer division will be at the mid point between zoom
> > levels.
> >
> > I'm using DD as my shapefile metric, and I understand that scale is
> > affected by this. However, I'm willing to tolerate even a rough
> > approximation here.
> >
> > Thanks for your help,
> >
> > Keith.
> >
> >
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa at dmsolutions.on.ca
http://www.dmsolutions.on.ca
Phone: (613) 565-5056
----------------------------------------------------------------
More information about the MapServer-users
mailing list