[mapserver-users] Thankyou Message and a possible bug in the SLD feature (mapserver 5.6.5-2)
Hi all, after having received extremely useful support from this community, I wish to publicly recognize the effort spent by Yewondwossen Assefa in supporting my request of help. Thanks to his support I was able to overcome my problem related to the use of the SLD feature to apply a spatial user-related filter to a coverage. After his help, I went on with the experiments and I found that, under the release 5.6.5-2 of mapserver (linux Debian), the spatial filter, applied to a coverage maintains all the features defined in the map file for the elements that fall within the BBOX filter (this spatial filter worked fine as well as the more generic polygonal fence) with the exception of the LABEL, which was not passed to the selected features. In other words: given the calling URL like: http://bla-bla/cgi-bin/mapserv?map=/bla-bla-bla/maps_2.mapLAYERS=mylayerEXCEPTIONS=application%2Fvnd.ogc.se_inimageFORMAT=image%2FpngTRANSPARENT=TRUEVERSION=1.1.1SERVICE=WMSREQUEST=GetMapSTYLES=SRS=EPSG%3A900913BBOX=-10018754.17,-10018754.17,0,0WIDTH=256HEIGHT=256SLD=http://localhost/sldfile.xml and an sldfile.xml containing only the spatial filter like: ?xml version=1.0 encoding=UTF-8? StyledLayerDescriptor version=1.0.0 xmlns=http://www.opengis.net/sld; xmlns:gml=http://www.opengis.net/gml; xmlns:ogc=http://www.opengis.net/ogc; xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd; NamedLayer Namemylayer/Name UserStyle Titlexxx/Title FeatureTypeStyle Rule ogc:Filter BBOX PropertyNameGeometry/PropertyName gml:Box srsName=http://www.opengis.net/gml/srs/epsg.xml#32632; gml:coordinates$BBOX_minx,$BBOX_miny $BBOX_maxx,$BBOX_maxy/gml:coordinates /gml:Box /BBOX /ogc:Filter /Rule /FeatureTypeStyle /UserStyle /NamedLayer /StyledLayerDescriptor where $BBOX_m... are variables replaced by the BBOX coords, then, assuming that the layer mylayer is a polygon layer with a label defined, then the whole command returns only the polygons that fall within the BBOX boundaries with all the attributes defined in the map file (like the filling color or the stroke size and color) but without the LABEL (the same call without the SLD param returns the whole coverage including the labels. Again thank you Yewondwossen and thank you all. Respectfully. Marco Bagni ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Installing PHP MapScript with MapServer 6.0.0-3 and PHP 5.3.6 on Mac OS X 10.6.8
Hi there, I've installed MapServer 6.0.0-3 (thanks to the installer from http://www.kyngchaos.com) on my local computer, which I'm guessing is working since that when I'm going to http://localhost/cgi-bin/mapserv? with my browser I can see this error : No query information to decode. QUERY_STRING is set, but empty. which means MapServer is working, right ? I'd like to use MapServer through the PHP MapScript. My installation seems ok for my phpinfo() displays a MapScript section. But when I'm running php -m command in my shell, there is no mention of MapScript in the list of modules, I'm guessing something is going wrong here but I've failed to find out what it could be. The Apache version on my mac is 2.2.17 and I'm running PHP 5.3.6. I've tried to make this http://mapserver.org/mapscript/php/by_example.html#php-example example work (I've of course changed the pathes in the MapFile so that they match to my local files), but despite my efforts it doesn't. And the script is not returning any error message, just an empty page. Any idea to help me solve that ? Thanks for your help ! Léo D. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Installing-PHP-MapScript-with-MapServer-6-0-0-3-and-PHP-5-3-6-on-Mac-OS-X-10-6-8-tp6546297p6546297.html Sent from the Mapserver - User mailing list archive at Nabble.com.___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver WMS server, IIS and wrong content-type
Hello Oliver, Quick guess: maybe that IIS instance needs to be configured for that MIME type (http://technet.microsoft.com/en-us/library/cc786786%28WS.10%29.aspx). -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 11-07-04 10:54 AM, Oliver Christen wrote: hi list One of our client reported some strange problem they have with their Mapserver (5.2.1) WMS server running on IIS 6.0, when doing a GetMap resquest, the Content-Type in the response is text/html instead of the mimetype specified in the OUTPUTFORMAT in the mapfile for the image format requested, as a result the image is displayed as text in browsers and some other clients. for example: http://geo.fr.ch/wms/orthophoto_2005_fribourg.php?VERSION=1.1.1REQUEST=GetMapSERVICE=WMSLAYERS=CommunesSRS=EPSG:4326BBOX=6.71555,46.3924,7.43958,47.0604WIDTH=500HEIGHT=500FORMAT=image/png the header say: HTTP/1.1 200 OK Date: Mon, 04 Jul 2011 11:40:31 GMT Server: Microsoft-IIS/6.0 Content-Type: text/html Content-Length: 123821 the OUTPUTFORMAT in the mapfile are: OUTPUTFORMAT NAME png24 DRIVER AGG/PNG MIMETYPE image/png IMAGEMODE RGBA EXTENSION png FORMATOPTION INTERLACE=ON TRANSPARENT ON END OUTPUTFORMAT NAME jpeg DRIVER GD/JPEG MIMETYPE image/jpeg IMAGEMODE RGB EXTENSION jpg FORMATOPTION INTERLACE=ON FORMATOPTION QUALITY=90 END Anyone has a idea what could be wrong? Is it some missing Mapserver configuration ? Or maybe in the IIS configuration? thanks for any idea about this. best regards Oliver Christen ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver WMS server, IIS and wrong content-type
Hi Jeff that would make some sens, but would IIS recognise the extension type when the url requested is a dynamic wms url ? ie. would IIS use the filename returned by Mapserver to match the extension ? O. Hello Oliver, Quick guess: maybe that IIS instance needs to be configured for that MIME type (http://technet.microsoft.com/en-us/library/cc786786%28WS.10%29.aspx). -jeff ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver WMS server, IIS and wrong content-type
Hello Oliver, It can't hurt to try the steps outlined in that link I provided. It would answer the questions you posed in your last email. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 11-07-04 11:24 AM, Oliver Christen wrote: Hi Jeff that would make some sens, but would IIS recognise the extension type when the url requested is a dynamic wms url ? ie. would IIS use the filename returned by Mapserver to match the extension ? O. Hello Oliver, Quick guess: maybe that IIS instance needs to be configured for that MIME type (http://technet.microsoft.com/en-us/library/cc786786%28WS.10%29.aspx). -jeff ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver WMS server, IIS and wrong content-type
Hi Jeff, I do not have my hand on that server so I cant test it myself, I was only relaying the question. I did read the article but I failed to see how it would solve the problem. I will relay that info to the server admin and see if it works. thank you best regards Oliver Hello Oliver, It can't hurt to try the steps outlined in that link I provided. It would answer the questions you posed in your last email. -jeff ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver WMS server, IIS and wrong content-type
Hello Oliver, Here is some more info, taken from http://www.libpng.org/pub/png/pngstatus.html : As a related item, note that Microsoft's Internet Information Server (a.k.a. IIS) shipped by default without an explicit MIME type for PNG images until version 6, which effectively meant that it treated PNGs as application/octet-stream rather than image/png. Not surprisingly, this affected only non-Microsoft web browsers connecting to IIS servers; they rightly refused to display such mislabelled PNGs. Fortunately, Microsoft did finally correct the problem with the release of IIS 6.0 in 2003, and a fix is available for older versions (at least for version 4.0). So that goes along with my initial ideas. Anyway those are my quick thoughts on your problem with your client's IIS instance. If you want to contact me directly and we can work through this together with your client please do. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 11-07-04 11:39 AM, Oliver Christen wrote: Hi Jeff, I do not have my hand on that server so I cant test it myself, I was only relaying the question. I did read the article but I failed to see how it would solve the problem. I will relay that info to the server admin and see if it works. thank you best regards Oliver Hello Oliver, It can't hurt to try the steps outlined in that link I provided. It would answer the questions you posed in your last email. -jeff ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Installing PHP MapScript with MapServer 6.0.0-3 and PHP 5.3.6 on Mac OS X 10.6.8
Léo, My guess is that your php.ini doesn't load the php_mapscript.so library. There was a mention somewhere when installing the current update that this doesn't happen (and you can't dl() it anymore); so you need to go to the /usr/local/php5cgi/lib directory, and edit php.ini. somewhere (anywhere!) you need to add the line : extension=php_mapscript.so (I personally put it below the line that loads ming.so so I remember where to look) Then put a file with ?php phpinfo(); ? into your server root and execute it and you should end up with : MapScript MapServer Version MapServer version 6.0.0 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=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE PHP MapScript Version ($Revision: 11619 $ $Date: 2011-04-27 08:23:07 -0700 (Wed, 27 Apr 2011) $) I don't think it will show using php -m cheers Ben On 04/07/2011, at 11:16 PM, mapserver-users-requ...@lists.osgeo.org wrote: From: Léo D. leo_dum...@yahoo.fr Date: 4 July 2011 10:18:25 PM AWST To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Installing PHP MapScript with MapServer 6.0.0-3 and PHP 5.3.6 on Mac OS X 10.6.8 Hi there, I've installed MapServer 6.0.0-3 (thanks to the installer from http://www.kyngchaos.com) on my local computer, which I'm guessing is working since that when I'm going to http://localhost/cgi-bin/mapserv? with my browser I can see this error : No query information to decode. QUERY_STRING is set, but empty. which means MapServer is working, right ? I'd like to use MapServer through the PHP MapScript. My installation seems ok for my phpinfo() displays a MapScript section. But when I'm running php -m command in my shell, there is no mention of MapScript in the list of modules, I'm guessing something is going wrong here but I've failed to find out what it could be. The Apache version on my mac is 2.2.17 and I'm running PHP 5.3.6. I've tried to make this example work (I've of course changed the pathes in the MapFile so that they match to my local files), but despite my efforts it doesn't. And the script is not returning any error message, just an empty page. Any idea to help me solve that ? Thanks for your help ! Léo D. View this message in context: Installing PHP MapScript with MapServer 6.0.0-3 and PHP 5.3.6 on Mac OS X 10.6.8 Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] PHP mapscript shapefile query with multiple filters
Hi I have a shapefile containing almost 250k points in 3 cols (lat/long/sitetype). I need to use PHP mapscript to query that file to tell me how many points of a given type are present in a given rectangle. The script will either tell me the number of points in rectangle, OR points of a given type, but never both... Unfortunately I'm not at liberty to post the datafile anywhere, but the gist of the PHP is here: snip $lstrMapPath = /path/to/shapefile; $lstrOutput = ; $lobjMap = ms_newMapObj($lstrMapPath); $lobjLayer = $lobjMap-getLayerByName(layer1); if(!$lobjLayer) { exit; // errors handled elsewhere } $lobjLayer-open(); /* THIS WORKS */ @$lobjLayer-queryByRect($lobjRect); $lintCount = $lobjLayer-getNumResults(); /* THIS ALSO WORKS - BUT NOT IF THE queryByRect() is enabled above */ /* @$lobjLayer-queryByAttributes('sitetype','8',MS_MULTIPLE); $lintCount = $lobjLayer-getNumResults(); */ $lstrOutput = layer.$k.:.$lintCount; $lobjLayer-close(); echo $lstrOutput; /snip Any pointers would be gratefully received! Cheers Charlie ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Installing PHP MapScript with MapServer 6.0.0-3 and PHP 5.3.6 on Mac OS X 10.6.8
PHP 5.3 doesn't allow extension loading from scripts now without compiling support for it into PHP and enabling it in php.ini. Unfortunately, I could not get that to work for my PHP package, so you must load extensions from php.ini with: extension=php_mapscript.so I need to add a note about this to my MapServer package, or make the installer do it. On Jul 4, 2011, at 9:18 AM, Léo D. wrote: Hi there, I've installed MapServer 6.0.0-3 (thanks to the installer from http://www.kyngchaos.com) on my local computer, which I'm guessing is working since that when I'm going to http://localhost/cgi-bin/mapserv? with my browser I can see this error : No query information to decode. QUERY_STRING is set, but empty. which means MapServer is working, right ? I'd like to use MapServer through the PHP MapScript. My installation seems ok for my phpinfo() displays a MapScript section. But when I'm running php -m command in my shell, there is no mention of MapScript in the list of modules, I'm guessing something is going wrong here but I've failed to find out what it could be. The Apache version on my mac is 2.2.17 and I'm running PHP 5.3.6. I've tried to make this example work (I've of course changed the pathes in the MapFile so that they match to my local files), but despite my efforts it doesn't. And the script is not returning any error message, just an empty page. Any idea to help me solve that ? Thanks for your help ! Léo D. View this message in context: Installing PHP MapScript with MapServer 6.0.0-3 and PHP 5.3.6 on Mac OS X 10.6.8 Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users - William Kyngesburye kyngchaos*at*kyngchaos*dot*com http://www.kyngchaos.com/ [Trillian] What are you supposed to do WITH a maniacally depressed robot? [Marvin] You think you have problems? What are you supposed to do if you ARE a maniacally depressed robot? No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer... - HitchHiker's Guide to the Galaxy ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users