[mapserver-users] Fwd: RE: mapserver issues...(new user)
Stephen Woodbridge
woodbri at swoodbridge.com
Fri Mar 15 17:28:06 PDT 2013
Keep posts on the list, there are lots of people the can help.
Also have you asked the QGIS list for help? Also since QGIS is
generating an OWS compliant mapfile, you might be able to just add the
new srs to the list:
'ows_srs' 'EPSG:4326 EPSG:XXXX'
where XXXX is for your new projection.
-Steve W
-------- Original Message --------
Subject: RE: [mapserver-users] mapserver issues...(new user)
Date: Fri, 15 Mar 2013 19:41:08 -0400
From: Mark Mirrlees <mmirrlees at hotmail.com>
To: Stephen Woodbridge <woodbri at swoodbridge.com>
Hi Steve
Thanks for the help! can you send me a revised map file to show me what
needs to be changed as I'm still a bit confused on where the changes
need to be made on the map file!
Thanks
Mark
> Date: Fri, 15 Mar 2013 19:06:09 -0400
> From: woodbri at swoodbridge.com
> To: mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] mapserver issues...(new user)
>
> If you change the project in the MAP section of the mapfile you also
> need to change the UNITS and EXTENT to be consistent with the projection
> units.
>
> You current mapfile has proj=longlat which should have UNITS DD (for
> decimal degrees) and you EXTENT is consistent with that.
>
> -Steve W
>
> On 3/15/2013 5:58 PM, Mark Mirrlees wrote:
> > Hi all,
> >
> > I'm a new user to mapserver and having some issues with the mapfile
that
> > I have created from QGIS.
> >
> > Basically I am trying to create a map of Canada with major cities,
> > highways, expressways, province names. The map outputs fine but when I
> > change anything in the mapfile it doesnt work. I need to change the
> > projection to a Lambert Conformal Conic, be able to display the
highways
> > if the layer is visible, the highways being only visible if zoomed in
> > past 1:2500000, provinces labeled with the calibri font. For the major
> > cities, I want to use a S3 symbol (green star) found in a symbol
folder
> > where all of the data is located while using the symbols.sty style
sheet
> > while only visible past 1:2500000 and labeled when zoomed in past
> > 1:1000000. When I click any of the checkboxes that I created to help
> > zoom in or out they work fine but when I click any of the
checkboxes for
> > the cities, provinces, roads etc it doesnt load.
> >
> > Here is my mapfile in green so I can seperate the text better.
> >
> > # Map file created from QGIS project file
> > C:/wwwroot/M_Mirrlees_Assign3/markassign3.qgs
> > # Edit this file to customize for your map interface
> > # (Created with PyQgis MapServer Export plugin)
> > MAP
> > NAME "QGIS-MAP"
> > # Map image size
> > SIZE 500 500
> > UNITS meters
> > EXTENT -143.210462 39.001401 -50.461045 85.911094
> > FONTSET "/wwwroot/fonts/fontset.txt"
> > SYMBOLSET "/wwwroot/symbols/symbols.sty"
> > PROJECTION
> > 'proj=longlat'
> > 'datum=WGS84'
> > 'no_defs'
> > END
> > # Background color for the map canvas -- change as desired
> > IMAGECOLOR 0 0 255
> > IMAGEQUALITY 95
> > IMAGETYPE agg
> > OUTPUTFORMAT
> > NAME agg
> > DRIVER AGG/PNG
> > IMAGEMODE RGB
> > END
> > # Legend
> > LEGEND
> > IMAGECOLOR 255 255 255
> > STATUS ON
> > KEYSIZE 18 12
> > LABEL
> > TYPE BITMAP
> > SIZE MEDIUM
> > COLOR 0 0 89
> > END
> > END
> > # Web interface definition. Only the template parameter
> > # is required to display a map. See MapServer documentation
> > WEB
> > # Set IMAGEPATH to the path where MapServer should
> > # write its output.
> > IMAGEPATH "/ms4w/tmp/ms_tmp/"
> > # Set IMAGEURL to the url that points to IMAGEPATH
> > # as defined in your web server configuration
> > IMAGEURL "/ms_tmp/"
> > # WMS server settings
> > METADATA
> > 'ows_title' 'QGIS-MAP'
> > 'ows_onlineresource'
> >
'localhost.com/cgi-bin/mapserv.exe?map=C:/wwwroot/M_Mirrlees_Assign3/global.map'
> > 'ows_srs' 'EPSG:4326'
> > END
> > #Scale range at which web interface will operate
> > # Template and header/footer settings
> > # Only the template parameter is required to display a map. See
> > MapServer documentation
> > TEMPLATE 'C:/wwwroot/M_Mirrlees_Assign3/global.html'
> > END
> >
> > SCALEBAR
> > STATUS EMBED
> > UNITS KILOMETERS
> > INTERVALS 3
> > TRANSPARENT TRUE
> > OUTLINECOLOR 0 0 0
> > END # End for scalebar
> >
> > LAYER
> > NAME 'province_dd'
> > TYPE POLYGON
> > DUMP false
> > EXTENT -143.210462 39.001401 -50.461045 85.911094
> > DATA '../data/province_dd.shp'
> > METADATA
> > 'ows_title' 'province_dd'
> > END
> > STATUS DEFAULT
> > TRANSPARENCY 100
> > PROJECTION
> > 'proj=longlat'
> > 'datum=WGS84'
> > 'no_defs'
> > END
> > CLASSITEM 'NAME_ENG'
> > CLASS
> > NAME "default"
> > EXPRESSION ""
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 30 158 173
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = Alberta"
> > EXPRESSION "Alberta"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 103 48 123
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = British Columbia"
> > EXPRESSION "British Columbia"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 157 204 18
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = Manitoba"
> > EXPRESSION "Manitoba"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 132 187 236
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = New Brunswick"
> > EXPRESSION "New Brunswick"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 190 235 139
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = Newfoundland"
> > EXPRESSION "Newfoundland"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 135 148 47
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = Northwest Territories"
> > EXPRESSION "Northwest Territories"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 73 51 112
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = Nova Scotia"
> > EXPRESSION "Nova Scotia"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 94 79 203
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = Nunavut"
> > EXPRESSION "Nunavut"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 116 114 31
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = Ontario"
> > EXPRESSION "Ontario"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 254 137 86
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = Prince Edward Island"
> > EXPRESSION "Prince Edward Island"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 117 170 97
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = Quebec"
> > EXPRESSION "Quebec"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 150 81 98
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = Saskatchewan"
> > EXPRESSION "Saskatchewan"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 6 73 91
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > CLASS
> > NAME "NAME_ENG = Yukon Territory"
> > EXPRESSION "Yukon Territory"
> > STYLE
> > WIDTH 0.91
> > OUTLINECOLOR 0 0 0
> > COLOR 223 168 55
> > END
> > LABEL
> > FONT arial
> > TYPE truetype
> > SIZE 8
> > COLOR 0 0 0
> > ANGLE 0
> > POSITION cc
> > FORCE false
> > ANTIALIAS false
> > PARTIALS false
> > END
> > END
> > END
> > LAYER
> > NAME 'mjrroads'
> > TYPE LINE
> > DUMP false
> > EXTENT -143.210462 39.001401 -50.461045 85.911094
> > DATA '../data/mjrroads.shp'
> > METADATA
> > 'ows_title' 'mjrroads'
> > END
> > STATUS DEFAULT
> > TRANSPARENCY 100
> > PROJECTION
> > 'proj=longlat'
> > 'datum=WGS84'
> > 'no_defs'
> > END
> > CLASSITEM 'TYPE'
> > CLASS
> > NAME "default"
> > EXPRESSION ""
> > STYLE
> > WIDTH 0.91
> > COLOR 201 157 32
> > END
> > END
> > CLASS
> > NAME "TYPE = Expressway"
> > EXPRESSION "Expressway"
> > STYLE
> > WIDTH 7.0
> > COLOR 255 0 0
> > END
> > END
> > CLASS
> > NAME "TYPE = Primary Highway"
> > EXPRESSION "Primary Highway"
> > STYLE
> > WIDTH 3.5
> > COLOR 0 0 0
> > END
> > END
> > END
> > LAYER
> > NAME 'mjcities'
> > TYPE POINT
> > DUMP false
> > EXTENT -143.210462 39.001401 -50.461045 85.911094
> > DATA '../data/mjcities.shp'
> > METADATA
> > 'ows_title' 'mjcities'
> > END
> > STATUS OFF
> > TRANSPARENCY 100
> > PROJECTION
> > 'proj=longlat'
> > 'datum=WGS84'
> > 'no_defs'
> > END
> > CLASS
> > NAME 'mjcities'
> > STYLE
> > SYMBOL "circle"
> > SIZE 7.0
> > OUTLINECOLOR 0 0 0
> > COLOR 182 109 194
> > END
> > END
> > END
> > END
> >
> > As mentioned before I am fairly new at this (but want to learn the
> > process) but not sure what to do as everytime I change something
the map
> > doesnt display correctly! Any help would be greatly appreciated.
> >
> > Thanks,
> > Mark
> >
> >
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list