[mapserver-users] tracking the origin of errors
Help! I see a variety of messages in my mapserver log file with debug off. Some, like these, prompt me to ask what parameters were used when the error condition occurred: msProcessProjection(): Projection library error. projection not named msProjectRect(): some points failed to reproject, doing internal sampling. But despite changing debug to 5, I don't see any information in the log that would indicate what the input was. I use mapserv exclusively to provide OGC WMS and WFS, so it would help to have the URL for the requests in which there was an error. Is there any way to get mapserv to provide this information? Peter -- Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192) (703) 648-6533 FAX: (703) 648-6252 email: pschweit...@usgs.gov http://geology.usgs.gov/peter/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] EXCEPTIONS format question
Help! Seeing some errors in my mapserv.log file, I edited all of my map files to add, in the metadata section of each layer, the single item wms_exceptions_format application/vnd.ogc.se_xml Now I see a few errors that say WMS server error. Invalid format application/vnd.ogc.se_XML for the EXCEPTIONS parameter. It would seem that the wms_exceptions_format value is case sensitive; should it be? Is this metadata item repeatable? Can I write, for example wms_exceptions_format application/vnd.ogc.se_xml wms_exceptions_format application/vnd.ogc.se_XML or perhaps wms_exceptions_format application/vnd.ogc.se_xml, appplication/vnd.ogc.se_XML Peter -- Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192) (703) 648-6533 FAX: (703) 648-6252 email: pschweit...@usgs.gov http://geology.usgs.gov/peter/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] minscaledenom puzzle, Mapserver 6.0.1
Thanks Thomas and Steve! Thomas is right that I needed a real symbol and not symbol 0 within the pixel-sized class. I was confused by the docs under class:symbol, which says Default is 0, which results in a single pixel, ... Is that part now out of date? But I like Steve's suggestion that using two layer definitions and setting the scale denominator for the entire layer in each case might save time that mapserver would have spent deciding how to draw each point's symbol. Of course the most important optimization I can make is the one that I have not yet learned to implement--tiling. But I want to get the basics done as well as I can first. I appreciate being pointed to group--this is something I had not learned about before, perhaps because I had not seen its practical use until now. Works very nicely. I don't know how to answer the question what renderer are you using beyond doing mapserv -v; its output is MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE and in my openlayers code that calls this layer I'm not specifying an image format. So I assume that mapserv is falling into a default that is based on my compilation options. Based on the docs, it looks like I'm defaulting to AGG for png images (which my openlayers is requesting by default). My map now (at version 6) appears fuzzier than it did at version 5. Perhaps this renderer does more anti-aliasing? Anyway thanks for your help. I will continue to explore. Peter On 09/29/2011 12:02 AM, Steve Lime wrote: Hmmm... What if you use one layer with the various class/expressions and MAXSCALEDENOM set at the layer level for all the various squares and then a second layer with just one class for the pixels with MINSCALEDENOM set. I typically use layer scales far more than class scale and that setup would perform much better than what you have since there would be no expressions or scale computations in the scale 700 case. E.g.: LAYER NAME 'sites_high' GROUP 'sites' MAXSCALE 700 ...multi-class... END LAYER NAME 'sites_low' GROUP 'sites' MINSCALE 700 ...one class... END If the second layer indeed renders then it's a class handling issue. If the second layer (with pixels) doesn't render then it's a drawing issue. What backend is used, GD or AGG? On 09/28/2011 01:53 PM, thomas bonfort wrote: You have to define a valid ellipse type symbol and reference it in the classes/styles where you want the circles to appear. On Tue, Sep 27, 2011 at 3:55 PM, Peter N. Schweitzer pschweit...@usgs.gov wrote: Surely I have misunderstood minscaledenom or otherwise have misused it. I just switched over to Mapserver 6.0.1 (Linux, CentOS, data in PostgreSQL+PostGIS) The web page is http://mrdata.usgs.gov/mineral-resources/mrds-us.html Feature type is point. The classes from the map file are these: labelitem site_name labelmaxscaledenom 25 classitem dev_stat class maxscaledenom 700 expression ('[dev_stat]' == 'Producer' or '[dev_stat]' == 'Past Producer') name Mine, past or present producer color 160 0 0 symbol mine size 5 label color 0 0 0 size 10 type truetype font arial position cr offset 4 4 end end class maxscaledenom 700 expression ('[dev_stat]' == 'Prospect' or '[dev_stat]' == 'Occurrence') name Prospect or occurrence color 0 160 0 symbol opensquare size 5 end class maxscaledenom 700 expression ('[dev_stat]' == 'Plant') name Processing plant color 0 0 160 symbol mine size 6 label color 0 0 0 size 10 type truetype font arial position cr offset 4 4 end end class maxscaledenom 700 expression ('[dev_stat]' == 'Unknown') name Unknown color 0 0 0 symbol occurrence size 6 end class minscaledenom 700 color 160 0 0 symbol 0 end Under mapserver 5.6.7, this generated red pixels for every point when the map is zoomed out; those are replaced by the square symbols when the map is zoomed in. But under 6.0.1, I am not getting the 1-pixel symbols when zoomed out. I assumed that the last class defined above would apply when the scale is coarser than 1:7M. Here is the OpenLayers command that loads this layer: var wms = new OpenLayers.Layer.WMS( Mineral Resources, http://mrdata.usgs.gov/cgi-bin/mapserv?;, { map: 'mrds.map', transparent: 'true', layers: 'mrds' }, { singleTile: 'true', ratio: 1 } ); Would some modification of my map file or my OpenLayers javascript bring back my little red pixels? Thanks for any help you might offer. -- Peter N
[mapserver-users] minscaledenom puzzle, Mapserver 6.0.1
Surely I have misunderstood minscaledenom or otherwise have misused it. I just switched over to Mapserver 6.0.1 (Linux, CentOS, data in PostgreSQL+PostGIS) The web page is http://mrdata.usgs.gov/mineral-resources/mrds-us.html Feature type is point. The classes from the map file are these: labelitem site_name labelmaxscaledenom 25 classitem dev_stat class maxscaledenom 700 expression ('[dev_stat]' == 'Producer' or '[dev_stat]' == 'Past Producer') name Mine, past or present producer color 160 0 0 symbol mine size 5 label color 0 0 0 size 10 type truetype font arial position cr offset 4 4 end end class maxscaledenom 700 expression ('[dev_stat]' == 'Prospect' or '[dev_stat]' == 'Occurrence') name Prospect or occurrence color 0 160 0 symbol opensquare size 5 end class maxscaledenom 700 expression ('[dev_stat]' == 'Plant') name Processing plant color 0 0 160 symbol mine size 6 label color 0 0 0 size 10 type truetype font arial position cr offset 4 4 end end class maxscaledenom 700 expression ('[dev_stat]' == 'Unknown') name Unknown color 0 0 0 symbol occurrence size 6 end class minscaledenom 700 color 160 0 0 symbol 0 end Under mapserver 5.6.7, this generated red pixels for every point when the map is zoomed out; those are replaced by the square symbols when the map is zoomed in. But under 6.0.1, I am not getting the 1-pixel symbols when zoomed out. I assumed that the last class defined above would apply when the scale is coarser than 1:7M. Here is the OpenLayers command that loads this layer: var wms = new OpenLayers.Layer.WMS( Mineral Resources, http://mrdata.usgs.gov/cgi-bin/mapserv?;, { map: 'mrds.map', transparent: 'true', layers: 'mrds' }, { singleTile: 'true', ratio: 1 } ); Would some modification of my map file or my OpenLayers javascript bring back my little red pixels? Thanks for any help you might offer. Peter -- Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192) (703) 648-6533 FAX: (703) 648-6252 email: pschweit...@usgs.gov http://geology.usgs.gov/peter/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] gml_exclude_items in mapfile
On 12/23/2010 01:10 PM, Steven Knight wrote: I'm working on a project which is trying to use gml_exclude_items. The documentation [1] states that A comma delimited list of items to exclude. Because of the documentation I changed my mapfile to exclude some items: GML_EXCLUDE_ITEMS gid, cmpxname, orgname, the_geom But when I access this mapfile get the following error in my MS_ERRORFILE: [Thu Dec 23 13:05:40 2010].166173 loadHashTable(): Unknown identifier. Parsing error near (,):(line 107) I could be wrong, but you might want this arrangement instead: GML_EXCLUDE_ITEMS gid,cmpxname,orgname,the_geom Peter -- Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192) (703) 648-6533 FAX: (703) 648-6252 email: pschweit...@usgs.gov http://geology.usgs.gov/peter/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] XSL for WMS capabilities
Recognizing that this is only marginally on topic, but I use mapserver for WMS and so the experiences of mapserver users would bemost helpful. Does anyone have an XSL for WMS capabilities response that generates a reasonably readable HTML presentation of the information? Peter -- Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192) (703) 648-6533 FAX: (703) 648-6252 email: pschweit...@usgs.gov http://geology.usgs.gov/peter/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Using e00 files
On 02/02/2010 11:32 AM, Jon Miner wrote: Now, I'm trying to layer on information from the GRANIT website: http://www.granit.unh.edu/ ftp://ftp.granit.sr.unh.edu/pub/GRANIT_Data/Vector_Data/Transportation_Networks/d-railroads/rrnh.e00 These files are e00 files. Based on some other mailing list entries, I used the ogr2ogr command to convert the file into Shapefiles: ogr2ogr -f ESRI Shapefile temp ../data/rrnh.e00 then copied the files into my data directory, and added a new layer to the map file: LAYER NAME rail TYPE LINE STATUS on DATA nhrail CLASS NAME Railroads SYMBOL 0 COLOR 168 0 184 END END Something is wrong since the line data does not get rendered. Maybe there is a better approach instead of converting to Shapefiles? Jon, The rr data are in NH state plane coordinates--are the other data you are using in the same projection? Peter -- Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192) (703) 648-6533 FAX: (703) 648-6252 email: pschweit...@usgs.gov http://geology.usgs.gov/peter/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Seeking guidance for gml_geometries in WFS config
I'm running Mapserver 5.4.1, drawing data from PostGIS/PostgreSQL, using WMS successfully with OpenLayers. I have tried to configure the same data as WFS, and am trying to debug using uDig. Through helpful advice from the udig-users list, I now question my use of the gml_geometries and gml_[name]_type elements of the map file. The WFS server how-to page mentions these elements and describes how to write them but doesn't give strong guidance as to why one would, or what the right sort of values should be. So I ask here. My WFS services are currently described at http://mrdata.usgs.gov/wfs.html The map file for active mines, a point data set, contains the code below. In particular, I question my use of these two elements: gml_geometries geometry gml_geometry_type point Direction would be much appreciated! ... map and web elements precede the layer section, of course ... layer name mineplant connection user=* password=* dbname=* host=* port= connectiontype postgis data the_geom from (select gid,g.idnum,commodity,site_name,company_na,state_loca,county,latitude,longitude,plant_min,p.fips,p.huc,p.quad,the_geom from mineplant g, mineplant_place p where p.idnum=g.idnum) as mine_info using unique gid status on dump true type point tolerance 5 projection init=epsg:4269 end labelitem site_name labelmaxscaledenom 50 classitem commodity ... a few class definitions ... metadata wms_title mineplant wms_abstract USGS Web Mapping Service: Active mines and mineral plants in the US wms_keywordlistmine sites; mineral resources wms_extent -165.0 24.0 -66.0 73.0 wms_srsEPSG:4267 EPSG:4269 EPSG:4326 EPSG:3395 wms_feature_info_mime_type text/html wms_attribution_onlineresource http://tin.er.usgs.gov/mineplant/; wms_attribution_title Active mines and mineral plants in the US ows_include_items idnum,commodity,site_name,company_na,state_loca,county,latitude,longitude,plant_min,fips,huc,quad gml_geometries geometry gml_geometry_type point gml_featureid gid gml_include_items idnum,commodity,site_name,company_na,state_loca,county,latitude,longitude,plant_min,fips,huc,quad wfs_title mineplant wfs_abstract Mine plants and operations for commodities monitored by the Minerals Information Team of the USGS. Operations included are those considered active in 2003 and surveyed by the USGS. wfs_keywordlistmineral resources; mining and quarrying; mine sites wfs_metadataurl_href http://tin.er.usgs.gov/metadata/mineplant.xml; wfs_metadataurl_type FGDC wfs_metadataurl_format XML end Peter -- Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192) (703) 648-6533 FAX: (703) 648-6252 email: pschweit...@usgs.gov http://geology.usgs.gov/peter/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users