[mapserver-users] Scalebar label
Andrew
ahaigh@ic24.net
Tue, 5 Feb 2002 12:57:26 -0000
This is a multi-part message in MIME format.
------=_NextPart_000_0083_01C1AE44.A9261920
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I'm relatively new to Mapserver and I'm attempting to implement =
Mapserver as on OGC WMS. I have two problems, so any help would be =
greatly appreciated. I've attached my mapfile definition at the bottom =
of the e-mail.
1. I have defined a scalebar, which I'd like to embed in the map. =
This works fine however, I want to place some text (a copyright notice) =
next to the scalebar (i.e. along the bottom of the map). To do this I =
think I need to include a label entry in my scalebar definition, but I =
can't work out how to set the text I want to display.
2. I have a vector layer which contains 136 polygons (name: =
'boarders'). I'd like to make these semi-transparent, so you can still =
see the raster data in the layer below. Can you do this with Mapserver?
I'm using Mapserver 3.5 on Windows 2000.
Thanks in advance,
Andrew
Map file follows:
NAME EMS
STATUS ON
SIZE 500 350
EXTENT 380000 400000 450000 450000
UNITS METERS
IMAGETYPE gif
PROJECTION
"init=3Depsg:27700"
END
WEB
METADATA
"wms_title" "Enviroport Map Server"
"wms_onlineresource" =
"http://plasma/cgi-bin/mapserv.exe?map=3Dc:\demo.map"
"wms_srs" "epsg:27700"
END
END
# Definitions for map symbols
SYMBOL
NAME 'circle'
TYPE ELLIPSE
POINTS 1 1 END
FILLED TRUE
END
# End of map symbol definitions
# Start of Map Layers, The first layer in this list is displayed at the =
bottom, etc.
# Raster Data - Using shapefile index
LAYER
NAME "rst50k"
TYPE raster
STATUS ON
TRANSFORM true
TILEINDEX "H:\data\50k\tiff\poly"
PROJECTION
"init=3Depsg:27700"
END
METADATA
WMS_TITLE "1:50,000 Colour Raster"
WMS_ABSTRACT "Add info here"
WMS_SRS "EPSG:27700"
END # End of Metadata tag
END # End of 50k raster
# Ward Data - shapefile
LAYER
NAME "boarders"
TYPE polygon
DATA "H:\data\UKBoarders\947"
STATUS OFF
TRANSFORM true
PROJECTION
"init=3Depsg:27700"
END
CLASSITEM "Name"
CLASS
EXPRESSION 'Bolton'
TEMPLATE "somepage.html"
OUTLINECOLOR 0 0 0
COLOR 0 255 0
END # End of class Bolton
CLASS
EXPRESSION 'Birkby'
TEMPLATE "somepage.html"
OUTLINECOLOR 0 0 0
COLOR 255 0 0
END # End of class Bolton
CLASS
EXPRESSION /./
TEMPLATE "somepage.html"
OUTLINECOLOR 0 0 0
COLOR 190 253 190
END
TOLERANCE 3
METADATA
WMS_TITLE "Wards"
WMS_ABSTRACT "Ward boundary information."
WMS_SRS "EPSG:27700"
END # End of Metadata tag
END # End of layer
# Test POI Layer
LAYER
NAME "poi"
TYPE point
DATA "H:\data\testInfo\poi"
STATUS ON
TRANSFORM true
PROJECTION
"init=3Depsg:27700"
END
=20
CLASS
SYMBOL 'circle'
SIZE 2
NAME 'Townships'
OUTLINECOLOR 100 40 40
END
=20
METADATA
WMS_TITLE "Point of Interest Data"
WMS_ABSTRACT "Test Point of Interest Data for Muckenbrough County =
Council"
WMS_SRS "EPSG:27700"
END # End of Metadata tag
END # End of layer
# Test for scalebar
MAP
SCALEBAR
BACKGROUNDCOLOR 0 0 0
COLOR 255 255 255
INTERVALS 3
OUTLINECOLOR 255 0 0
POSITION lr
POSTLABELCACHE true
SIZE 500 15
STATUS embed
TRANSPARENT off
STYLE 0
UNITS meters
LABEL
COLOR 0 0 0
SIZE tiny
END # END of label
END # END of scalebar
END # End of map object
END # End of file
------=_NextPart_000_0083_01C1AE44.A9261920
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I'm relatively new to Mapserver and I'm =
attempting=20
to implement Mapserver as on OGC WMS. I have two problems, so any help =
would be=20
greatly appreciated. I've attached my mapfile definition at the bottom =
of the=20
e-mail.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> 1. I have defined a =
scalebar,=20
which I'd like to embed in the map. This works fine however, I want to =
place=20
some text (a copyright notice) next to the scalebar (i.e. along the =
bottom of=20
the map). To do this I think I need to include a label entry in my =
scalebar=20
definition, but I can't work out how to set the text I want to=20
display.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> 2. I have a vector =
layer which=20
contains 136 polygons (name: 'boarders'). I'd like to make these=20
semi-transparent, so you can still see the raster data in the layer =
below. Can=20
you do this with Mapserver?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm using Mapserver 3.5 on Windows=20
2000.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Andrew</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Map file follows:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>NAME EMS<BR>STATUS ON<BR>SIZE 500 =
350<BR>EXTENT=20
380000 400000 450000 450000<BR>UNITS METERS<BR>IMAGETYPE =
gif</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial=20
size=3D2>PROJECTION<BR> "init=3Depsg:27700"<BR>END</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial=20
size=3D2>WEB<BR> METADATA<BR> "wms_title" "Env=
iroport=20
Map Server"<BR> "wms_onlineresource" "<A=20
href=3D"http://plasma/cgi-bin/mapserv.exe?map=3Dc:\demo.map">http://plasm=
a/cgi-bin/mapserv.exe?map=3Dc:\demo.map</A>"<BR> "wms_srs"&nbs=
p; "epsg:27700"<BR> END<BR>END</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2># Definitions for map =
symbols</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>SYMBOL<BR> NAME =
'circle'<BR> TYPE=20
ELLIPSE<BR> POINTS 1 1 END<BR> FILLED =
TRUE<BR>END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2># End of map symbol =
definitions</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2># Start of Map Layers, The first layer =
in this list=20
is displayed at the bottom, etc.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2># Raster Data - Using shapefile=20
index<BR>LAYER<BR> NAME "rst50k"<BR> TYPE=20
raster<BR> STATUS ON<BR> TRANSFORM =
true<BR> =20
TILEINDEX "H:\data\50k\tiff\poly"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> =20
PROJECTION<BR> "init=3Depsg:27700"<BR> END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> =
METADATA<BR> =20
WMS_TITLE "1:50,000 Colour Raster"<BR> WMS_ABSTRACT =
"Add info=20
here"<BR> WMS_SRS "EPSG:27700"<BR> END # =
End of=20
Metadata tag<BR>END # End of 50k raster</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2># Ward Data - =
shapefile<BR>LAYER<BR> =20
NAME "boarders"<BR> TYPE polygon<BR> DATA=20
"H:\data\UKBoarders\947"<BR> STATUS OFF<BR> =
TRANSFORM=20
true</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> =20
PROJECTION<BR> "init=3Depsg:27700"<BR> END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> CLASSITEM =
"Name"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
CLASS<BR> EXPRESSION=20
'Bolton'<BR> TEMPLATE =
"somepage.html"<BR> =20
OUTLINECOLOR 0 0 0<BR> COLOR 0 255 0<BR> =
END # End=20
of class Bolton<BR> CLASS<BR> EXPRESSION=20
'Birkby'<BR> TEMPLATE =
"somepage.html"<BR> =20
OUTLINECOLOR 0 0 0<BR> COLOR 255 0 0<BR> =
END # End=20
of class Bolton<BR> CLASS<BR> EXPRESSION=20
/./<BR> TEMPLATE "somepage.html"<BR> =
OUTLINECOLOR 0 0 0<BR> COLOR 190 253 =
190<BR> =20
END</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> TOLERANCE 3</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> =
METADATA<BR> =20
WMS_TITLE "Wards"<BR> WMS_ABSTRACT "Ward boundary=20
information."<BR> WMS_SRS "EPSG:27700"<BR> =
END #=20
End of Metadata tag<BR>END # End of layer</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2># Test POI =
Layer<BR>LAYER<BR> NAME=20
"poi"<BR> TYPE point<BR> DATA=20
"H:\data\testInfo\poi"<BR> STATUS ON<BR> =
TRANSFORM=20
true</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> =20
PROJECTION<BR> "init=3Depsg:27700"<BR> =
END<BR> =20
<BR> CLASS<BR> SYMBOL=20
'circle'<BR> SIZE 2<BR> NAME=20
'Townships'<BR> OUTLINECOLOR 100 40 40<BR> =
END<BR> <BR> METADATA<BR> WMS_TITLE =
"Point of=20
Interest Data"<BR> WMS_ABSTRACT "Test Point of =
Interest Data=20
for Muckenbrough County Council"<BR> WMS_SRS=20
"EPSG:27700"<BR> END # End of Metadata tag<BR>END # End of=20
layer</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2># Test for=20
scalebar<BR>MAP<BR> SCALEBAR<BR> BACKGROUNDCOLOR 0 0=20
0<BR> COLOR 255 255 255<BR> INTERVALS=20
3<BR> OUTLINECOLOR 255 0 0<BR> POSITION=20
lr<BR> POSTLABELCACHE true<BR> SIZE 500=20
15<BR> STATUS embed<BR> TRANSPARENT=20
off<BR> STYLE 0<BR> UNITS=20
meters<BR> LABEL<BR> COLOR 0 0=20
0<BR> SIZE tiny<BR> END # END of=20
label<BR> END # END of scalebar<BR>END # End of map =
object</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>END # End of =
file<BR></FONT></DIV></BODY></HTML>
------=_NextPart_000_0083_01C1AE44.A9261920--