[mapserver-users] Rendering Problem with Polygons as TYPE LINE
Hi all Anyone stumbled over following Problem? If I define polygons as TYPE LINE, when zoomed in heavily (where only small parts of the poylgon should be shown), they disappear (only the outline is defined). If defined as TYPE POLYGON, they are shown correctly. Mit freundlichem Gruss / Best regards Flavio Hendry TYDAC Inc. - http://www.tydac.ch Web Mapping - http://www.mapserver.ch Swiss Maps - http://www.mapplus.ch Mit freundlichen Gruessen / Kind Regards Flavio Hendry, CEO - mailto:fla...@tydac.ch TYDAC AG - http://www.tydac.ch Geographic Information Solutions Optingenstrasse 27 -- CH-3013 Bern Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860 Location: http://www.mapplus.ch/adr/bern/optingenstrasse/27 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Rendering Problem with Polygons as TYPE LINE
Do you have the outline defined as a variable width? Post the layer and outputformat definitions. Worth Lutz -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Flavio Hendry Sent: Thursday, April 08, 2010 4:24 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Rendering Problem with Polygons as TYPE LINE Hi all Anyone stumbled over following Problem? If I define polygons as TYPE LINE, when zoomed in heavily (where only small parts of the poylgon should be shown), they disappear (only the outline is defined). If defined as TYPE POLYGON, they are shown correctly. Mit freundlichem Gruss / Best regards Flavio Hendry TYDAC Inc. - http://www.tydac.ch Web Mapping - http://www.mapserver.ch Swiss Maps - http://www.mapplus.ch Mit freundlichen Gruessen / Kind Regards Flavio Hendry, CEO - mailto:fla...@tydac.ch TYDAC AG - http://www.tydac.ch Geographic Information Solutions Optingenstrasse 27 -- CH-3013 Bern Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860 Location: http://www.mapplus.ch/adr/bern/optingenstrasse/27 ___ 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] WFS multiple typenames in request, only one in reply
Hi, Thank you for your response, I'm able to request data from both layers (typenames) this way, however I'd like to achieve this in OpenLayers. So I've created a small demo application which uses XMLHttp to request data from Mapserver. http://webgis.fmt.bme.hu/gfi/xml.html The requests are hard coded, please take a look at the source. How could I achieve the below described functionality with XML request(s)? Thanks in advance, BR, Attila 2010.04.06. 15:42 keltezéssel, Yewondwossen Assefa írta: The following URL on your server gives the output for the 2 typenames I believe: http://webgis.fmt.bme.hu/cgi-bin/mvmNew?SERVICE=WFSVERSION=1.1.0REQUEST=GetFeatureTYPENAME=elteresek,elteresek2Filter=%28%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3Cogc:BBOX%3E%3Cogc:PropertyName%3EmsGeometry%3C/ogc:PropertyName%3E%3Cgml:Envelope%20xmlns:gml=%22http://www.opengis.net/gml%22%20srsName=%22EPSG:23700%22%3E%3Cgml:lowerCorner%3E649971.6696%20236508.4728%3C/gml:lowerCorner%3E%3Cgml:upperCorner%3E651559.1688%20237919.5832%3C/gml:upperCorner%3E%3C/gml:Envelope%3E%3C/ogc:BBOX%3E%3C/ogc:Filter%3E%29%28%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3Cogc:BBOX%3E%3Cogc:PropertyName%3EmsGeometry%3C/ogc:PropertyName%3E%3Cgml:Envelope%20xmlns:gml=%22http://www.opengis.net/gml%22%20srsName=%22EPSG:23700%22%3E%3Cgml:lowerCorner%3E649971.6696%20236508.4728%3C/gml:lowerCorner%3E%3Cgml:upperCorner%3E651559.1688%20237919.5832%3C/gml:upperCorner%3E%3C/gml:Envelope%3E%3C/ogc:BBOX%3E%3C/ogc:Filter%3E%29 Attila BERÉNYI wrote: Thank you guys, I've tried with comma and brackets as well, no success so far :( 2010.04.06. 14:46 keltezéssel, Yewondwossen Assefa írta: bart...@osgis.nl wrote: Hi, you need to repeat your filter (comma-separated) IIRC. I believe it should be brackets instead of comma: something like ...FILTER=(Filter.../Filter)(Filter.../Filter) Best regards, Bart Dear All, I've two layers (elteresek and elteresek2), and I'd like to get features from both of them using WFS GetFeature request. If I apply one typename at a time, it works correct, but if I include two typenames in the request only the first is processed and included in the response. This works correct (note TYPENAME=elteresek): http://webgis.fmt.bme.hu/cgi-bin/mvmNew?SERVICE=WFSVERSION=1.1.0REQUEST=GetFeatureTYPENAME=elteresekFilter=ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:BBOXogc:PropertyNamemsGeometry/ogc:PropertyNamegml:Envelope xmlns:gml=http://www.opengis.net/gml; srsName=EPSG:23700gml:lowerCorner649971.6696 236508.4728/gml:lowerCornergml:upperCorner651559.1688 237919.5832/gml:upperCorner/gml:Envelope/ogc:BBOX/ogc:Filter This works correct (note TYPENAME=elteresek2) as well: http://webgis.fmt.bme.hu/cgi-bin/mvmNew?SERVICE=WFSVERSION=1.1.0REQUEST=GetFeatureTYPENAME=elteresek2Filter=ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:BBOXogc:PropertyNamemsGeometry/ogc:PropertyNamegml:Envelope xmlns:gml=http://www.opengis.net/gml; srsName=EPSG:23700gml:lowerCorner649971.6696 236508.4728/gml:lowerCornergml:upperCorner651559.1688 237919.5832/gml:upperCorner/gml:Envelope/ogc:BBOX/ogc:Filter But the reply for this link includes only the first typename (in this case elteresek): http://webgis.fmt.bme.hu/cgi-bin/mvmNew?SERVICE=WFSVERSION=1.1.0REQUEST=GetFeatureTYPENAME=elteresek,elteresek2Filter=ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:BBOXogc:PropertyNamemsGeometry/ogc:PropertyNamegml:Envelope xmlns:gml=http://www.opengis.net/gml; srsName=EPSG:23700gml:lowerCorner649971.6696 236508.4728/gml:lowerCornergml:upperCorner651559.1688 237919.5832/gml:upperCorner/gml:Envelope/ogc:BBOX/ogc:Filter What am I doing wrong? Thanks, Attila ___ 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 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Dynamically generated Raster images in mapfile
Hello Heiko, Heiko Schröter wrote: i need to create Raster images on the fly and place them on a map generated with Mapserver. The time needed for generating these images is not crucial. An external script is triggered to generate these images. 1) Is it possible to define in a mapfile a data/image source coming from a script ? I don't think, that it would work with DATA 'anyscript' because this is reading the source, not executing it. But a WMS is doing what you are asking for: create Raster images on the fly so perhaps you could use your script as WMS and call it with CONNECTIONTYPE WMS CONNECTION http://.../yourscript; you could add the parameters your script needs directly to the connection-string. CONNECTION http://.../yourscript?param1=gtfgt2=...; Regards, Jörg or 2) Is it possible to rediret the output of the script as input to mapserver ? Stepping through the docs the only solution i can think of in the moment is to generate a temp.img (and temp.tlw)and pass that filename as variable to the DATA tag inside the mapfile. Any pointer to some more infos is highly appreciated. Preprocessing is not a solution since we have dozends of options for generating the images. Thanks and Regards Heiko ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ~~~ Aufwind durch Wissen! Qualifizierte Open Source Schulungen bei der http://www.foss-akademie.de/ ~~~ _ MapMedia Kartographie und raumbezogene Informationssysteme Gillweg 3, 14193 Berlin fon: +49 30 89 06 82-70 fax: +49 30 89 09 53-21 mail: j...@mapmedia.de net: www.mapmedia.de _ Geschäftsführer: G. v. Tschirnhaus, J. Thomsen, P. Stamm Registergericht, Berlin - Amtsgericht Charlottenburg, HRB 89625, Umsatzsteuer-Identnummer: DE 813794062 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Dynamically generated Raster images in mapfile
Heiko, If you know your generated filename you also could add it as Vendorspecific parameter to the map-request: Request http:// map=/path/to/mapfile.mapparams filename=yourfile.tif In the mapfile you need sth. like that: LAYER TYPE RASTER DATA /path/to/%filename% ... I'm not quite sure, if I hit the correct syntax just from mind. See here: http://mapserver.org/mapfile/variable_sub.html Till Jörg Thomsen wrote: Hello Heiko, Heiko Schröter wrote: i need to create Raster images on the fly and place them on a map generated with Mapserver. The time needed for generating these images is not crucial. An external script is triggered to generate these images. 1) Is it possible to define in a mapfile a data/image source coming from a script ? I don't think, that it would work with DATA 'anyscript' because this is reading the source, not executing it. But a WMS is doing what you are asking for: create Raster images on the fly so perhaps you could use your script as WMS and call it with CONNECTIONTYPE WMS CONNECTION http://.../yourscript; you could add the parameters your script needs directly to the connection-string. CONNECTION http://.../yourscript?param1=gtfgt2=...; Regards, Jörg or 2) Is it possible to rediret the output of the script as input to mapserver ? Stepping through the docs the only solution i can think of in the moment is to generate a temp.img (and temp.tlw)and pass that filename as variable to the DATA tag inside the mapfile. Any pointer to some more infos is highly appreciated. Preprocessing is not a solution since we have dozends of options for generating the images. Thanks and Regards Heiko ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- - terrestris GmbH Co. KG Irmintrudisstrasse 17 53111 Bonn Germany Till Adams Geschäftsführung Tel: +49 (0)228 / 962 899-52 Fax: +49 (0)228 / 962 899-57 ad...@terrestris.de http://www.terrestris.de Amtsgericht Bonn, HRA 6835 - Komplementärin: terrestris Verwaltungs GmbH vertreten durch: Hinrich Paulsen, Till Adams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Rendering Problem with Polygons as TYPE LINE
Do you have the outline defined as a variable width? Post the layer and outputformat definitions. - output format does not matter, happens with any (AGG and GD) - it is a very simple defintion, such as SYMBOL continue, COLOR 0 0 0 and SIZE 3 (can be anything) - as said, when zoomed in heavily on i.e. a parcel, so that only a small part of the polygon is visible, the line is gone (if defined as POLYGON using OUTLINECOLOR it works) - MS 5.4 - we figured out that in 5.6 it works ... however in 5.6 it seems that there is a problem with GetResult on MapInfo Files (OGR) ... ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Strange Behaviour with getFeature using POST method and more than one typename
Hi list, I'm having a strange behaviour when receiving data from getFeature request. I prepare a request that is intended to mark some parcels from two different layers (these layers are stored in Oracle Spatial). The request looks like: ?xml version=1.0 ? wfs:GetFeature service=WFS version=1.1.0 outputFormat=text/xml; subtype=gml/3.1.1 xmlns:wfs=http://www.opengis.net/wfs; xmlns:ogc=http://www.opengis.net/ogc; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.opengis.net/wfs ../wfs/1.1.0/WFS.xsd wfs:Query typeName=RecintosSigpac ogc:Filter ogc:Or ogc:And PropertyIsEqualToPropertyNamePROVINCIA/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNameMUNICIPIO/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamePOLIGONO/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamePARCELA/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNameRECINTO/PropertyNameLiteral1/Literal/PropertyIsEqualTo /ogc:And ogc:And PropertyIsEqualToPropertyNamePROVINCIA/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNameMUNICIPIO/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamePOLIGONO/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamePARCELA/PropertyNameLiteral20/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNameRECINTO/PropertyNameLiteral1/Literal/PropertyIsEqualTo /ogc:And ogc:And PropertyIsEqualToPropertyNamePROVINCIA/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNameMUNICIPIO/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamePOLIGONO/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamePARCELA/PropertyNameLiteral24/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNameRECINTO/PropertyNameLiteral1/Literal/PropertyIsEqualTo /ogc:And /ogc:Or /ogc:Filter /wfs:Query wfs:Query typeName=ParcelasSigpac ogc:Filter ogc:Or ogc:And PropertyIsEqualToPropertyNamePROVINCIA/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNameMUNICIPIO/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamePOLIGONO/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamePARCELA/PropertyNameLiteral29/Literal/PropertyIsEqualTo /ogc:And ogc:And PropertyIsEqualToPropertyNamePROVINCIA/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNameMUNICIPIO/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamePOLIGONO/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamePARCELA/PropertyNameLiteral5/Literal/PropertyIsEqualTo /ogc:And /ogc:Or /ogc:Filter /wfs:Query /wfs:GetFeature All the features that I want to mark using these filters are unique rows in Oracle Spatial. Using my Ajax app I get the following response: ?xml version='1.0' encoding=ISO-8859-1 ? wfs:FeatureCollection xmlns:ms=http://mapserver.gis.umn.edu/mapserver; xmlns:gml=http://www.opengis.net/gml; xmlns:wfs=http://www.opengis.net/wfs; xmlns:ogc=http://www.opengis.net/ogc; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://mapserver.gis.umn.edu/mapserver http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs.mapamp;SERVICE=WFSamp;VERSION=1.1.0amp;REQUEST=DescribeFeatureTypeamp;TYPENAME=RecintosSigpac,ParcelasSigpacamp;OUTPUTFORMAT=text/xml; subtype=gml/3.1.1 http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd; gml:boundedBy gml:Envelope srsName=EPSG:23030 gml:lowerCorner538881.736860 4744342.676060/gml:lowerCorner gml:upperCorner539514.702532 4744971.618431/gml:upperCorner /gml:Envelope /gml:boundedBy gml:featureMember ms:RecintosSigpac gml:id=RecintosSigpac.752 gml:boundedBy gml:Envelope srsName=EPSG:23030 gml:lowerCorner539098.554563 4744632.941135/gml:lowerCorner gml:upperCorner539191.352464 4744726.952445/gml:upperCorner /gml:Envelope /gml:boundedBy ms:msGeometry gml:Polygon srsName=EPSG:23030 gml:exterior gml:LinearRing gml:posList srsDimension=2539146.378383 4744724.433931 539145.235158 4744724.343655 539141.209291 4744724.134593 539098.862296 4744721.948469 539098.790865 4744711.615815 539098.554563 4744677.257422 539100.133554 4744665.742677 539101.989421 4744645.274892 539102.338824 4744636.815604 539147.216698 4744634.836696 539183.793353 4744632.941135 539191.352464 4744725.909256 539176.751878 4744726.952445 539160.884500 4744725.549674 539146.378383 4744724.433931 /gml:posList /gml:LinearRing /gml:exterior /gml:Polygon /ms:msGeometry /ms:RecintosSigpac /gml:featureMember gml:featureMember ms:RecintosSigpac
RE: [mapserver-users] contours in mapfile
Oz, In looking at your layer definition, you have defined a layer extent in coordinates that don't appear to match the spatial reference system you have defined for that layer in the projection block. It looks like you have meters or feet in your extent and the units for the projection that you have defined are decimal degrees. I would suggest getting rid of your layer extent unless you really need it. Make sure that the projection that you have defined in your layer matches the projection of your data. At the map level (you didn't include this part of the map file), make sure that the units of your map extent match the projection of your map. The best approach is to simplify your map file as much as possible to get it working. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Oz Nahum Sent: Thursday, April 08, 2010 9:49 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] contours in mapfile Hi Everyone, I am trying to display an ESRI ASCII Raster with map file in a contoured form. Despite following the documentation here: http://mapserver.org/input/raster.html#how-are-rasters-added-to-a-map-file I fail, and get an empty map... Here's is what I try in the mapfile: MAP #IMAGETYPE JPEG # minx minymaxx maxy EXTENT 3366307.654280 5813354.151378 3367797.654280 5814955.151378 SIZE 640 480 IMAGECOLOR 255 255 255 FONTSET/home/oz/safira/Safira2/trunk/Safira2/DATA/fonts/fonts.list # # Background color for the map canvas -- change as desired #if another color uncomment #IMAGECOLOR 192 192 192 IMAGEQUALITY 100 IMAGETYPE jpeg OUTPUTFORMAT NAME jpeg DRIVER 'GD/JPEG' MIMETYPE 'image/jpeg' IMAGEMODE PC256 EXTENSION 'jpeg' END # Legend LEGEND STATUS embed #IMAGECOLOR 255 255 255 POSITION ll #STATUS ON KEYSIZE 10 10 LABEL TYPE truetype FONT arial COLOR 0 0 0 SIZE 8 ANTIALIAS true END END ### SCALEBAR SCALEBAR #ALIGN center INTERVALS 4 POSITION ul #ur SIZE 200 10 #Black bounding box OUTLINECOLOR 0 0 0 STATUS embed UNITS kilometers LABEL TYPE truetype FONT arial COLOR 0 0 0 SIZE 8 ANTIALIAS true END END LAYER NAME 'W_PCE_in_GW' TYPE RASTER DUMP true TEMPLATE fooOnlyForWMSGetFeatureInfo EXTENT 3365691.535626 5813306.316297 3368142.408444 5815201.783992 DATA '/home/oz/safira/Safira2/trunk/Safira2/SzenarioA/ScALayout1/W_PCE_in_GW.asc' METADATA 'ows_title' 'W_PCE_in_GW' END STATUS ON CLASSITEM [pixel] #MAXSCALE 50 CLASS NAME NO DATA EXPRESSION (([pixel] == -)) COLOR 0 0 255 STYLE #SYMBOL 0 #SIZE 4 #OUTLINECOLOR 0 0 255 #COLOR 243 162 0 END END CLASS NAME 0 - 5 EXPRESSION (([pixel] = 0 AND ([pixel] =5)) COLOR 200 0 0 STYLE SYMBOL 0 SIZE 2 OUTLINECOLOR 0 0 0 #COLOR 243 162 0 END END CLASS NAME 5 - 10 EXPRESSION (([pixel] 10 AND [pixel] =20)) COLOR 243 162 0 END CLASS NAME 2 - 50 EXPRESSION (([pixel] 20 AND [pixel] =50)) COLOR 0 200 0 END TRANSPARENCY 100 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END END END I also attach the raster file as zip. Can someone tell me what am I doing wrong ? Thanks in advance ! Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] contours in mapfile
Hi David, Thanks for your reply ! Even if I simplify the map file to the following below, I still get empty image ... I am very confused here ... MAP #IMAGETYPE JPEG # minx minymaxx maxy EXTENT 3366307.654280 5813354.151378 3367797.654280 5814955.151378 SIZE 640 480 #SHAPEPATH /home/oz/demo/data IMAGECOLOR 255 255 255 FONTSET/home/oz/safira/Safira2/trunk/Safira2/DATA/fonts/fonts.list # # Background color for the map canvas -- change as desired #if another color uncomment #IMAGECOLOR 192 192 192 IMAGEQUALITY 100 IMAGETYPE jpeg OUTPUTFORMAT NAME jpeg DRIVER 'GD/JPEG' MIMETYPE 'image/jpeg' IMAGEMODE PC256 EXTENSION 'jpeg' END # Legend LEGEND STATUS embed #IMAGECOLOR 255 255 255 POSITION ll #STATUS ON KEYSIZE 10 10 LABEL TYPE truetype FONT arial COLOR 0 0 0 SIZE 8 ANTIALIAS true END END ### SCALEBAR SCALEBAR #ALIGN center INTERVALS 4 POSITION ul #ur SIZE 200 10 #Black bounding box OUTLINECOLOR 0 0 0 STATUS embed UNITS kilometers LABEL TYPE truetype FONT arial COLOR 0 0 0 SIZE 8 ANTIALIAS true END END LAYER NAME 'W_PCE_in_GW' TYPE RASTER DATA '/home/oz/safira/Safira2/trunk/Safira2/SzenarioA/ScALayout1/W_PCE_in_GW.asc' STATUS ON CLASSITEM [pixel] MAXSCALE 50 CLASS NAME NO DATA EXPRESSION (([pixel] == -)) COLOR 0 0 255 STYLE #SYMBOL 0 #SIZE 4 #OUTLINECOLOR 0 0 255 #COLOR 243 162 0 END END CLASS NAME 0 - 5 EXPRESSION (([pixel] = 0 AND ([pixel] =5)) COLOR 200 0 0 STYLE SYMBOL 0 SIZE 2 OUTLINECOLOR 0 0 0 #COLOR 243 162 0 END END CLASS NAME 5 - 10 EXPRESSION (([pixel] 10 AND [pixel] =20)) COLOR 243 162 0 END CLASS NAME 2 - 50 EXPRESSION (([pixel] 20 AND [pixel] =50)) COLOR 0 200 0 END #TRANSPARENCY 100 END END On Thu, Apr 8, 2010 at 5:27 PM, Fawcett, David (MPCA) david.fawc...@state.mn.us wrote: Oz, In looking at your layer definition, you have defined a layer extent in coordinates that don't appear to match the spatial reference system you have defined for that layer in the projection block. It looks like you have meters or feet in your extent and the units for the projection that you have defined are decimal degrees. I would suggest getting rid of your layer extent unless you really need it. Make sure that the projection that you have defined in your layer matches the projection of your data. At the map level (you didn't include this part of the map file), make sure that the units of your map extent match the projection of your map. The best approach is to simplify your map file as much as possible to get it working. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Oz Nahum Sent: Thursday, April 08, 2010 9:49 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] contours in mapfile Hi Everyone, I am trying to display an ESRI ASCII Raster with map file in a contoured form. Despite following the documentation here: http://mapserver.org/input/raster.html#how-are-rasters-added-to-a-map-file I fail, and get an empty map... Here's is what I try in the mapfile: MAP #IMAGETYPE JPEG # minx miny maxx maxy EXTENT 3366307.654280 5813354.151378 3367797.654280 5814955.151378 SIZE 640 480 IMAGECOLOR 255 255 255 FONTSET /home/oz/safira/Safira2/trunk/Safira2/DATA/fonts/fonts.list # # Background color for the map canvas -- change as desired #if another color uncomment #IMAGECOLOR 192 192 192 IMAGEQUALITY 100 IMAGETYPE jpeg OUTPUTFORMAT NAME jpeg DRIVER 'GD/JPEG' MIMETYPE 'image/jpeg' IMAGEMODE PC256 EXTENSION 'jpeg' END # Legend LEGEND STATUS embed #IMAGECOLOR 255 255 255 POSITION ll #STATUS ON KEYSIZE 10 10 LABEL TYPE truetype FONT arial COLOR 0 0 0 SIZE 8 ANTIALIAS true END END ### SCALEBAR SCALEBAR #ALIGN center INTERVALS 4 POSITION ul #ur SIZE 200 10 #Black bounding box OUTLINECOLOR 0 0 0 STATUS embed UNITS kilometers LABEL TYPE truetype FONT arial COLOR 0 0 0 SIZE 8 ANTIALIAS true END END LAYER NAME
Re: [mapserver-users] contours in mapfile
Hello Oz, First, always test your mapfile with the shp2img commandline utility (http://www.mapserver.org/utilities/shp2img.html). This will either produce a map image, or give you an error. Next, I believe your problem is your expressions. You should follow the examples in http://www.mapserver.org/input/raster.html which states: EXPRESSION ([pixel] = 64 AND [pixel] 128) You have: EXPRESSION (([pixel] = 0 AND ([pixel] =5)) So try: EXPRESSION ([pixel] = 0 AND [pixel] =5) Also, give a read to the expression howto, just to get yourself more familiar with them: http://www.mapserver.org/mapfile/expressions.html -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ Oz Nahum wrote: Hi Everyone, I am trying to display an ESRI ASCII Raster with map file in a contoured form. Despite following the documentation here: http://mapserver.org/input/raster.html#how-are-rasters-added-to-a-map-file I fail, and get an empty map... Here's is what I try in the mapfile: MAP #IMAGETYPE JPEG # minx minymaxx maxy EXTENT 3366307.654280 5813354.151378 3367797.654280 5814955.151378 SIZE 640 480 IMAGECOLOR 255 255 255 FONTSET/home/oz/safira/Safira2/trunk/Safira2/DATA/fonts/fonts.list # # Background color for the map canvas -- change as desired #if another color uncomment #IMAGECOLOR 192 192 192 IMAGEQUALITY 100 IMAGETYPE jpeg OUTPUTFORMAT NAME jpeg DRIVER 'GD/JPEG' MIMETYPE 'image/jpeg' IMAGEMODE PC256 EXTENSION 'jpeg' END # Legend LEGEND STATUS embed #IMAGECOLOR 255 255 255 POSITION ll #STATUS ON KEYSIZE 10 10 LABEL TYPE truetype FONT arial COLOR 0 0 0 SIZE 8 ANTIALIAS true END END ### SCALEBAR SCALEBAR #ALIGN center INTERVALS 4 POSITION ul #ur SIZE 200 10 #Black bounding box OUTLINECOLOR 0 0 0 STATUS embed UNITS kilometers LABEL TYPE truetype FONT arial COLOR 0 0 0 SIZE 8 ANTIALIAS true END END LAYER NAME 'W_PCE_in_GW' TYPE RASTER DUMP true TEMPLATE fooOnlyForWMSGetFeatureInfo EXTENT 3365691.535626 5813306.316297 3368142.408444 5815201.783992 DATA '/home/oz/safira/Safira2/trunk/Safira2/SzenarioA/ScALayout1/W_PCE_in_GW.asc' METADATA 'ows_title' 'W_PCE_in_GW' END STATUS ON CLASSITEM [pixel] #MAXSCALE 50 CLASS NAME NO DATA EXPRESSION (([pixel] == -)) COLOR 0 0 255 STYLE #SYMBOL 0 #SIZE 4 #OUTLINECOLOR 0 0 255 #COLOR 243 162 0 END END CLASS NAME 0 - 5 EXPRESSION (([pixel] = 0 AND ([pixel] =5)) COLOR 200 0 0 STYLE SYMBOL 0 SIZE 2 OUTLINECOLOR 0 0 0 #COLOR 243 162 0 END END CLASS NAME 5 - 10 EXPRESSION (([pixel] 10 AND [pixel] =20)) COLOR 243 162 0 END CLASS NAME 2 - 50 EXPRESSION (([pixel] 20 AND [pixel] =50)) COLOR 0 200 0 END TRANSPARENCY 100 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END END END I also attach the raster file as zip. Can someone tell me what am I doing wrong ? ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] contours in mapfile
Oz, Between fixing the expression format as Jeff suggested and setting layer STATUS to DEFAULT, I was able to get it to draw. I simplified your map file, but I was able to get it to draw with the below map file. David. MAP EXTENT 3366307 5813354 3367797 5814955 SIZE 640 480 IMAGECOLOR 192 192 192 # LAYER NAME 'W_PCE_in_GW' TYPE RASTER DATA '/ms4w/apps/gridtest/W_PCE_in_GW.asc' STATUS DEFAULT CLASS NAME NO DATA EXPRESSION ([pixel] = -) STYLE COLOR 0 0 255 END END CLASS NAME 0 - 5 EXPRESSION ([pixel] = 0 AND [pixel] =5) COLOR 200 0 0 END CLASS NAME 5 - 10 EXPRESSION ([pixel] 10 AND [pixel] =20) COLOR 243 162 0 END CLASS NAME 2 - 50 EXPRESSION ([pixel] 20 AND [pixel] =50) COLOR 0 200 0 END CLASS NAME catchall COLOR 0 0 0 END END END -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jeff McKenna Sent: Thursday, April 08, 2010 1:00 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] contours in mapfile Hello Oz, First, always test your mapfile with the shp2img commandline utility (http://www.mapserver.org/utilities/shp2img.html). This will either produce a map image, or give you an error. Next, I believe your problem is your expressions. You should follow the examples in http://www.mapserver.org/input/raster.html which states: EXPRESSION ([pixel] = 64 AND [pixel] 128) You have: EXPRESSION (([pixel] = 0 AND ([pixel] =5)) So try: EXPRESSION ([pixel] = 0 AND [pixel] =5) Also, give a read to the expression howto, just to get yourself more familiar with them: http://www.mapserver.org/mapfile/expressions.html -jeff -- Jeff McKenna MapServer 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
[mapserver-users] Brazilian SDI
The site of the Brazilian SDI was released today: www.ibge.inde.gov.br The whole site is based on free software, highlighting the GeoNetwork, Mapserver, Geoserver and i3Geo. More information and photos at: http://edmarmoretti.blogspot.com/ -- edmar.more...@terra.com.br Skype/MSN: edmar.moretti Twitter: @edmarmoretti Blogs: http://edmarmoretti.blogspot.com/ http://mapasnaweb.blogspot.com/ Ohloh: https://www.ohloh.net/accounts/edmarmoretti Geógrafos: http://geografos.ning.com/profile/EdmarMoretti ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Question about adding imagery to a project
Gregory Roberts | Wendler wrote: I was wondering if it is possible when adding imagery to a project to not have a white background surrounding the image itself show up. For example, when I add an overlay image into a project and turn it on you can see the image but all the background imagery is now white but if you fade the overlay image, you can see that the background imagery is just covered up by the white that surrounds that overlay image. You can use the OFFSITE keyword for this. It is discussed in this example: http://mapserver.org/tutorial/example1-5.html Daniel -- Daniel Morissette http://www.mapgears.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Brazilian SDI - errata
oops! The site of the Brazilian SDI was released today The correct address is www.inde.gov.br -- edmar.more...@terra.com.br Skype/MSN: edmar.moretti Twitter: @edmarmoretti Blogs: http://edmarmoretti.blogspot.com/ http://mapasnaweb.blogspot.com/ Ohloh: https://www.ohloh.net/accounts/edmarmoretti Geógrafos: http://geografos.ning.com/profile/EdmarMoretti ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users