Re: [mapserver-users] Mapfile displaying in red
Paul, Read the Mapserver documentation on tile indexing (http://mapserver.org/input/raster.html#rasters-and-tile-indexing). Best Regards, Brent Fraser Paul Curran wrote: Hi When i load my map file which can be seen below i can view the outline of map but the actual map displays as red. I am viewing the map via the mapserver.exe (e.g.http://localhost/cgi-bin/mapserv.exe?mode=mapmap=c:/ms4w/apps/openlayers-2.5/data/test.maplayer='map' http://localhost/cgi-bin/mapserv.exe?mode=mapmap=c:/ms4w/apps/openlayers-2.5/data/test.maplayer='map') Here is my map file, Can anyone spot were i am going wrong? any help greatly appreciated. The uk.shp file i am attempting to load consists of .tiff images amd was put together using FWTools MAP NAME test # Map image size SIZE 400 600 IMAGECOLOR 249 245 186 IMAGETYPE PNG24 OUTPUTFORMAT NAME PNG24 DRIVER 'GD/PNG' MIMETYPE 'image/PNG' #IMAGEMODE PC256 EXTENSION 'png' END EXTENT -888385.321101 -31000.00 1548385.321101 1271000.00 WEB IMAGEPATH \ms4w\tmp\ms_tmp\ IMAGEURL \ms_tmp\ METADATA WMS_SRS EPSG:4326 EPSG:900913 END END LAYER NAME 'map' DATA 'C:\ms4w\apps\openlayers-2.5\data\map.shp' TYPE polygon STATUS DEFAULT TRANSPARENCY 100 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' '' END CLASS NAME 'map' STYLE COLOR 255 0 0 END LABEL TYPE bitmap END END END END Upgrade to Internet Explorer 8 Optimised for MSN. Download Now http://extras.uk.msn.com/internet-explorer-8/?ocid=T010MSN07A0716U ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Mapfile displaying in red
Paul, Your polygon data is red because you are telling MapServer to color it red. In the class in your layer 'map' (probably not a great layer or class name), you are using a style to color your polygons. CLASS NAME 'map' STYLE COLOR 255 0 0 END LABEL TYPE bitmap END END You have set the value of the color property to be 255 0 0. Colors are set as RGB (Red Green Blue) triplets. In that line, you are saying, 'color it with the full amount of red and don't use any green or blue'. If you change the value to 0 0 255, you will see blue polygons. For an easy way to come up with prettier colors, take a look at ColorBrewer: http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer_intro.html David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Paul Curran Sent: Wednesday, July 15, 2009 5:20 AM To: mapser all users Subject: [mapserver-users] Mapfile displaying in red Hi When i load my map file which can be seen below i can view the outline of map but the actual map displays as red. I am viewing the map via the mapserver.exe (e.g.http://localhost/cgi-bin/mapserv.exe?mode=mapmap=c:/ms4w/apps/open layers-2.5/data/test.maplayer='map') Here is my map file, Can anyone spot were i am going wrong? any help greatly appreciated. The uk.shp file i am attempting to load consists of .tiff images amd was put together using FWTools MAP NAME test # Map image size SIZE 400 600 IMAGECOLOR 249 245 186 IMAGETYPE PNG24 OUTPUTFORMAT NAME PNG24 DRIVER 'GD/PNG' MIMETYPE 'image/PNG' #IMAGEMODE PC256 EXTENSION 'png' END EXTENT -888385.321101 -31000.00 1548385.321101 1271000.00 WEB IMAGEPATH \ms4w\tmp\ms_tmp\ IMAGEURL \ms_tmp\ METADATA WMS_SRS EPSG:4326 EPSG:900913 END END LAYER NAME 'map' DATA 'C:\ms4w\apps\openlayers-2.5\data\map.shp' TYPE polygon STATUS DEFAULT TRANSPARENCY 100 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' '' END CLASS NAME 'map' STYLE COLOR 255 0 0 END LABEL TYPE bitmap END END END END Upgrade to Internet Explorer 8 Optimised for MSN. Download Now http://extras.uk.msn.com/internet-explorer-8/?ocid=T010MSN07A0716U ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapfile displaying in red
Hello Paul, Comments inline below: Paul Curran wrote: Hi When i load my map file which can be seen below i can view the outline of map but the actual map displays as red. I am viewing the map via the mapserver.exe (e.g.http://localhost/cgi-bin/mapserv.exe?mode=mapmap=c:/ms4w/apps/openlayers-2.5/data/test.maplayer='map' http://localhost/cgi-bin/mapserv.exe?mode=mapmap=c:/ms4w/apps/openlayers-2.5/data/test.maplayer='map') For testing your mapfile, just use the shp2img commandline utility, included in MS4W (http://www.mapserver.org/utilities/shp2img.html). Here is my map file, Can anyone spot were i am going wrong? any help greatly appreciated. The uk.shp file i am attempting to load consists of .tiff images amd was put together using FWTools Make sure the EXTENT parameter is set to the extents of your shapefile - you can use the ogrinfo utility (also included in MS4W) to grab the shp's extents. I would also remove all projection objects, if you only have one layer. Also, I don't understand what data your layer consists of. Are you saying that the shapefile is an indexfile of the extents of the tiffs? (if yes, note that all the tools you needed to create it are also included in MS4W) If you have any questions about the tools in MS4W feel free to fire an email to its mailing list: http://lists.maptools.org/mailman/listinfo/ms4w-users -jeff -- Jeff McKenna FOSS4G Consulting and Training Services http://www.gatewaygeomatics.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users