[Mapserver-users] MAXSCALE MINSCALE

Ed McNierney ed at topozone.com
Mon Feb 23 06:04:10 PST 2004


Daniel -

200 meters at what latitude and in which direction?

MINSCALE and MAXSCALE must of necessity refer to the UNITs of your map.
Since data in a "geographic" projection is in units of degrees, so must
the MINSCALE and MAXSCALE values.  At 50 degrees North, for example, one
degree of longitude is only 65% the length of one degree of latitude, so
if you use a "geographic" projection where they're shown as equal, a
2,000-meters line running east-west will be displayed 50% longer than
the same line running north-south.

You need to convert your scale values to degrees and you should be fine.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com
-----Original Message-----
From: Mills, Daniel [mailto:Mills_D at wrcplc.co.uk] 
Sent: Monday, February 23, 2004 8:35 AM
To: 'mapserver-users at lists.gis.umn.edu'
Subject: [Mapserver-users] MAXSCALE MINSCALE

I am having real problems understanding the value required for this
layer parameter.  All of my data is in lat/long.  I wish some layers to
be turned off when the user has zoomed into appoax 2000 meters.  Here is
a definition of my mapfile.

NAME "Europe in purple"
SIZE 600 400
PROJECTION
	"proj=latlong"
	"units=m"
END

STATUS ON
#SYMBOLSET /var/www/html/ms_teleco/symbols/symbols.sym

#SYMBOLSET "/var/www/html/maps/symbols/symbols.sym"
#EXTENT 424000 321200 424200 321400
EXTENT -23.27 66.34 -22.64 66.48
IMAGETYPE PNG
UNITS DD
#SHAPEPATH "D:/oracle/ora92/Apache/Apache/htdocs/maps/data/ccm"
			
WEB
    IMAGEPATH "/var/www/html/maps/tmp/"
    IMAGEURL "/maps/tmp/"
END

QUERYMAP
    COLOR 255 255 255
    SIZE 600 400
    STATUS ON
    STYLE HILITE
END

SCALEBAR
    IMAGECOLOR 222 222 222
    #IMAGECOLOR 172 202 236
    LABEL
	COLOR 0 0 0
	SIZE SMALL
    END  #LABEL
    SIZE 350 5
    COLOR 255 255 255
    BACKGROUNDCOLOR 0 0 0
    OUTLINECOLOR 0 0 0
    UNITS meters
    INTERVALS 3
    STATUS ON
END   #SCALEBAR

LAYER
    NAME "ccm catchments"
    TYPE polygon
    STATUS ON
    TEMPLATE "../templates/catchments.html"

    PROJECTION
	"proj=latlong"
	"units=m"
    END

    METADATA
	ATTRIBUTES_VIEW "VWCATCHMENTS"
	SPATIAL_VIEW "VWCATCHMENTS_SPATIAL"
    END
#    MINSCALE  2000
#    MAXSCALE 400000
    CONNECTIONTYPE oraclespatial
    CONNECTION "******/**********@hern"
    DATA "POLYGON FROM CMTPRD.CATCHMENTS"
	# WHERE ROWNUM < 100)"
    #DATA ccm_catchments
    CLASS
    	
	   COLOR 100 100 100
	   #colours the polygon outline
	   OUTLINECOLOR 0 0 0 
	   SYMBOL 0
    END
    HEADER "../templates/catchments_header.html"
    FOOTER "../templates/catchments_footer.html"
END

LAYER
    NAME "ccm rivers"
    TYPE LINE
    STATUS ON
    CONNECTIONTYPE oraclespatial
    CONNECTION "*******/********@hern"

    PROJECTION
     "proj=latlong"
     "units=m"
    END

	MAXSCALE 1540000
	MINSCALE 2000
    METADATA
	ATTRIBUTES_VIEW "VWRIVERS"
	SPATIAL_VIEW "VWRIVERS_SPATIAL"
    END


    DATA "DIRECTEDLINE FROM CMTPRD.RIVERSEGMENTS"
	# WHERE ROWNUM < 100)"
    #DATA ccm_riversegments
    CLASS
	#STYLE
	   COLOR 255 255 255
	   #colours the polygon outline
	   OUTLINECOLOR 0 0 0 
	   SYMBOL 0
             #Name landlines
             #   COLOR 128 128 128
              #  OUTLINECOLOR 0 0 0

	#END
    END	
END

END
------------------------------------------------------------------------
------------------------------------------------------------------------
-
Visit our websites www.wrcplc.co.uk, www.wrcnsf.com and www.nsf.org, as
well as www.waterportfolio.com for collaborative research projects.
------------------------------------------------------------------------
------------------------------------------------------------------------
-

The Information in this e-mail is confidential and is intended solely
for the addressee. Access to this e-mail by any other party is
unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken in reliance on information
contained in this e-mail is prohibited and maybe unlawful. When
addressed to WRc clients, any opinions or advice contained in this
e-mail are subject to the terms and conditions expressed in the
governing WRc client Agreement.
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users





More information about the MapServer-users mailing list