Re: [mapserver-users] HTML response to GetFeature request
Hi Jukka, I also do get correct results with Poster, but not with API Kitchen. This is really frustrating, but at least the service seems to running as it should. Thank you, Luís On 28 June 2013 15:17, Rahkonen Jukka jukka.rahko...@mmmtike.fi wrote: Sorry, nothing wrong with the typename and using feature:RO_buildings_gml. Namespace “feature” is described later in the request and I do get correct results with Poster if I have typeName=feature:RO_buildings_gml srsName=EPSG:28992 xmlns:feature= http://mapserver.gis.umn.edu/mapserver; -Jukka- Rahkonen Jukka wrote: Hi, I made a trial with Firefox Poster plugin and I get correct results back after correcting the typename. I do not know what is wrong with API Kitchen and your other trials. wfs:GetFeature xmlns:wfs=http://www.opengis.net/wfs; service=WFS version=1.1.0 xsi:schemaLocation=http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; wfs:Query typeName=RO_buildings_gml srsName=EPSG:28992 xmlns:feature=http://mapserver.gis.umn.edu/mapserver;/wfs:Query /wfs:GetFeature Kosmo Desktop 3.0 beta http://www.opengis.es/index.php?option=com_docmanItemid=42?lang=en reads data with http POST from your site basically fine. You have some data errors, though, and Kosmo says that there is dublicate fid around fid .168 . -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users- boun...@lists.osgeo.org] Puolesta Luís de Sousa Lähetetty: 28. kesäkuuta 2013 15:30 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] HTML response to GetFeature request Hi Michael thank you for the reply, my comments go below. Michael Schulz-6 wrote Hi Luis, for WFS enabling layers you should add some more metadata, wfs_srs and gml_featureid. I've added these to the LAYER block, but the response is the same (see the definition below). I have had both ows_enable_request and gml_include_items all in the main file section all along. Michael Schulz-6 wrote I'm also not sure about the projection stuff. Is there a reason for not using the espg code? The in line projection definition is supposed to speed up rendition. Michael Schulz-6 wrote Try adding some debug logging. Here's what I'm getting in the MapServer log: [Fri Jun 28 14:17:09 2013].620005 CGI Request 1 on process 9189 [Fri Jun 28 14:17:09 2013].621842 msDrawMap(): rendering using outputformat named GTiff-RGB (GDAL/GTiff). [Fri Jun 28 14:17:09 2013].621861 msDrawMap(): WMS/WFS set-up and query, 0.000s [Fri Jun 28 14:17:09 2013].621900 msDrawMap(): Drawing Label Cache, 0.000s [Fri Jun 28 14:17:09 2013].621908 msDrawMap() total time: 0.002s [Fri Jun 28 14:17:09 2013].657425 msSaveImage(/var/www/MapFiles/map_images/TUDOR_RO_test- environment13724218299189.tif) total time: 0.036s [Fri Jun 28 14:17:09 2013].658291 mapserv request processing time (msLoadMap not incl.): 0.038s [Fri Jun 28 14:17:09 2013].658311 msFreeMap(): freeing map at 0x10c1940. Michael Schulz-6 wrote Another thing to check: your requesting typeName=feature:BuildingsWFS but from the mapfile I'd say the typename shoud be RO_buildings_gml. Yes, it seems the first POST body I posted is wrong, but I'm using the correct layer name testing. You can try it here: http://apikitchen.com/#bXd2s Once again, note that with a GET request everything works as it should: http://services.iguess.tudor.lu/cgi- bin/mapserv?map=/var/www/MapFiles/RO_localOWS_test.mapSERVICE=WFS VERSION=1.1.0REQUEST=GetFeatureTYPENAME=RO_buildings_gmlMAXF EATURES=10 Thank you once more, Luís #3 LAYER NAME RO_buildings_gml TYPE POLYGON CONNECTIONTYPE OGR CONNECTION /var/www/pywps/sampleData/BuildingsFull.gml STATUS ON DUMP TRUE TEMPLATE templateRO_building_footprints.html PROJECTION +proj=sterea +lat_0=52.156160 +lon_0=5.387639 +k=0.079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 ++units=m no_defs END METADATA ows_title Building footprints (GML) ows_abstract Data set of building footprints in Rotterdam city area for the slider demo wfs_srs EPSG:28992 gml_featureid GML_ID ows_enable_request * gml_include_items all END CLASS NAME Building_footprints (GML) OUTLINECOLOR 255 0 0 END END -- View this message in context: http://osgeo-org.1560.x6.nabble.com/HTML- response-to-GetFeature-request-tp5062355p5062817.html Sent from the Mapserver - User mailing list archive at
[mapserver-users] wfs_namespace_prefix / DescribeLayer Response
Hello, while setting up MapServer and TinyOWS I'm facing a problem configuring wfs_namespace_prefix. My WEB-METADATA ... wms_onlineresource http://1.1.1.1:81/cgi-bin/wms; wfs_onlineresource http://1.1.1.1:81/cgi-bin/tinyows; wfs_title WFS Dienst wfs_namespace_prefix tows ows_enable_request * ... LAYER ... METADATA 'ows_title' 'WFS Punktobjekte' END NAME wfsobjects ... END TinyOWS is configured via xml file. The MapServer is offering WMS and is advertising the WFS onlineresource. WMS_DescribeLayerResponse version=1.1.1 script/ LayerDescription name=wfsobjects wfs=http://1.1.1.1:81/cgi-bin/tinyows; owsType=WFS owsURL=http://1.1.1.1:81/cgi-bin/tinyows; Query typeName=wfsobjects/ /LayerDescription /WMS_DescribeLayerResponse Somehow the namespace prefix isn't advertised. Shouldn't it be included in the typeName? Am I missing something obvious? Does someone have a working setup and can help here? Since the namespace prefix is mandatory, I cant disable it in the TineOWS configuration. Thanks in advance Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapscript 6.2 / sql plugin bug for multipart geometries
Hi, I recently moved from Mapserver 6.0 to 6.21 and have one bit of code which is behaving differently (and I think incorrectly) In 6.0 when a resultCacheObj was returned containing a multipart geometry, oResults.bounds.maxx etc would give the extent of the multipart geometry. In 6.2 this seems to now give the extent of only one part of the multipart geometry (presumably the first / last?) I have worked around this for the moment - but its a definite change from 6.0 and I can't really see it being meant. However I don't know where the error lies - data is coming from SQL using Tamas SQL plugin - so potentially it could be in there - or somewhere in mapserver itself I guess Thanks James ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapscript 6.2 / sql plugin bug for multipart geometries
James, Could you provide a sample geometry to reproduce the issue? Best regards, Tamas 2013/7/1 James Perrins james.perr...@gmail.com Hi, I recently moved from Mapserver 6.0 to 6.21 and have one bit of code which is behaving differently (and I think incorrectly) In 6.0 when a resultCacheObj was returned containing a multipart geometry, oResults.bounds.maxx etc would give the extent of the multipart geometry. In 6.2 this seems to now give the extent of only one part of the multipart geometry (presumably the first / last?) I have worked around this for the moment - but its a definite change from 6.0 and I can't really see it being meant. However I don't know where the error lies - data is coming from SQL using Tamas SQL plugin - so potentially it could be in there - or somewhere in mapserver itself I guess Thanks James ___ 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] mapserver-users Digest, Vol 66, Issue 1
Sorry I missed you, but I am on parental leave/holiday/training until August 5th. Urgent YLUPC business can be sent to the YLUPC director at r...@planyukon.ca. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapscript 6.2 / sql plugin bug for multipart geometries
Hi Tamas, STAsText() gives: MULTIPOLYGON (((95307.4877929688 348969.457519531, 100406.645019531 350051.097167969, 104578.683105469 353836.834960938, 100638.424804688 358626.952636719, 97470.7666015625 360403.932128906, 91289.9697265625 356927.233886719, 91212.7094726563 351982.596191406, 95307.4877929688 348969.457519531)), ((88937.4730077121 336744.12596401, 94689.4077148438 344565.639648438, 89435.73046875 349046.717285156, 88585.8706054688 352523.415527344, 85109.1723632813 351519.036132813, 83795.7529296875 346806.178222656, 85572.7319335938 341784.280761719, 88937.4730077121 336744.12596401)), ((106046.622558594 329808.986328125, 108364.421386719 62.944824219, 105814.842285156 337766.762695313, 97393.5063476563 339080.182128906, 95462.0073242188 335603.483886719, 97779.8061523438 331354.186035156, 103033.483886719 330967.886230469, 106046.622558594 329808.986328125))) Best wishes James On 1 July 2013 12:09, Tamas Szekeres szeker...@gmail.com wrote: James, Could you provide a sample geometry to reproduce the issue? Best regards, Tamas 2013/7/1 James Perrins james.perr...@gmail.com Hi, I recently moved from Mapserver 6.0 to 6.21 and have one bit of code which is behaving differently (and I think incorrectly) In 6.0 when a resultCacheObj was returned containing a multipart geometry, oResults.bounds.maxx etc would give the extent of the multipart geometry. In 6.2 this seems to now give the extent of only one part of the multipart geometry (presumably the first / last?) I have worked around this for the moment - but its a definite change from 6.0 and I can't really see it being meant. However I don't know where the error lies - data is coming from SQL using Tamas SQL plugin - so potentially it could be in there - or somewhere in mapserver itself I guess Thanks James ___ 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] csv join in mapscript/OGR
Hello, I have a point shape layer and I would like to color each point according to a number in a csv file= The csv file is: id,color 1080,2 1090,4 11,2 12,5 The ID column is the same as the NUMBER column in the shape file. This is my layer: LAYER # Stations point layer 1 begins here NAME meteo_oper CONNECTIONTYPE ogr CONNECTION ../data/ESRI/meteo_oper.shp DATA SELECT * FROM meteo_oper LEFT JOIN 'CSV:SPI201301.csv' ON meteo_oper.NUMBER=SPI201301.id STATUS ON TYPE point CLASS SYMBOL 'circle' SIZE 8 COLOR 0 255 0 OUTLINECOLOR 0 0 0 END DEBUG ON END # Stations point layer 1 ends here And when I use OGR from command line to test my map-file: shp2img -m watersheds.map -o tr.png I receive: msDrawMap(): Image handling error. Failed to draw layer named 'meteo_oper'. br msOGRFileOpen(): OGR error. ExecuteSQL(SELECT * FROM meteo_oper LEFT JOIN 'CSV:SPI201301.csv' ON meteo_oper.NUMBER=SPI201301.id) failed. SELECT from table CSV:SPI201301.csv failed, no such table/featureclass. br Segmentation fault Any idea? Minka ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] question on Request For Comment #6
Hello, Has anything ever happened with RFC #6, or did this one stall out? The color range mapping could be useful in a couple of my applications. Thanks Mark Volz, GISP GIS Specialist ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RFC documentation - status would be useful
Hello, It might be useful if the status (Passed, Implemented, Failed, New) of each RFC was indicated on http://www.mapserver.org/development/rfc/index.html Thanks Mark Volz, GISP GIS Specialist ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Segmentation fault + Premature end of script headers: mapserv, referer: http://localhost/tutorial/section3.html
Please let me know if someone can help me on issue. I use libgdal1 version 1.9.0-3.1ubuntu1. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Segmentation-fault-Premature-end-of-script-headers-mapserv-referer-http-localhost-tutorial-section3-l-tp5061446p5063403.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] csv join in mapscript/OGR
Le lundi 01 juillet 2013 14:17:17, Minka Stoyanova a écrit : Hello, I have a point shape layer and I would like to color each point according to a number in a csv file= The csv file is: id,color 1080,2 1090,4 11,2 12,5 The ID column is the same as the NUMBER column in the shape file. This is my layer: LAYER # Stations point layer 1 begins here NAME meteo_oper CONNECTIONTYPE ogr CONNECTION ../data/ESRI/meteo_oper.shp DATA SELECT * FROM meteo_oper LEFT JOIN 'CSV:SPI201301.csv' ON meteo_oper.NUMBER=SPI201301.id STATUS ON TYPE point CLASS SYMBOL 'circle' SIZE 8 COLOR 0 255 0 OUTLINECOLOR 0 0 0 END DEBUG ON END # Stations point layer 1 ends here And when I use OGR from command line to test my map-file: shp2img -m watersheds.map -o tr.png I receive: msDrawMap(): Image handling error. Failed to draw layer named 'meteo_oper'. br msOGRFileOpen(): OGR error. ExecuteSQL(SELECT * FROM meteo_oper LEFT JOIN 'CSV:SPI201301.csv' ON meteo_oper.NUMBER=SPI201301.id) failed. SELECT from table CSV:SPI201301.csv failed, no such table/featureclass. br Segmentation fault I don't reproduce the segmentation fault with mapserver latest dev version. I only get the error. Anyway the solution is to fix your SQL request. It should be SELECT * FROM meteo_oper LEFT JOIN 'CSV:SPI201301.csv'.SPI201301 ON meteo_oper.NUMBER=SPI201301.id Note the syntax for the table in the LEFT JOIN : 'datasource'.layer_name More generally, I'd encourage you debugging your SQL requests with ogrinfo first. e.g : ogrinfo meteo_oper.shp -sql SELECT * FROM meteo_oper LEFT JOIN 'CSV:SPI201301.csv'.SPI201301 ON meteo_oper.NUMBER=SPI201301.id Any idea? Minka -- Geospatial professional services http://even.rouault.free.fr/services.html ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] RFC documentation - status would be useful
Good point (I'm probably the biggest offender)... I'll take a pass through them. Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Volz Sent: Monday, July 01, 2013 12:55 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] RFC documentation - status would be useful Hello, It might be useful if the status (Passed, Implemented, Failed, New) of each RFC was indicated on http://www.mapserver.org/development/rfc/index.html Thanks Mark Volz, GISP GIS Specialist ___ 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] FCGI and SVG output goes to STDERR?
List, I've really tried hard to nail this down, but it makes no sense to me. I'm not a map guy, but am a system administrator for one. We have a mapserver setup that works fine for both PNG and SVG when we use the standard apache cgi module. When we switch to mod_fcgid, however, SVG displays no output in the browser and instead seems to output proper SVG/XML to the apache error log! PNG continues to work fine. I'm flabbergasted and nothing I try seems to work. I even set it up on another server and I get the same result, given I'm following the same build steps. Any ideas on where I can go next? Perhaps the SVG is not really valid, but I've copied and pasted the XML/SVG from the error_log to a static file, and that also displays fine via a browser. Here is the error_log output: ?xml version=1.0 encoding=UTF-8? svg xmlns=http://www.w3.org/2000/svg; xmlns:xlink= http://www.w3.org/1999/xlink; width=200pt height=154pt viewBox=0 0 200 154 version=1.1 g id=surface0 . . . /g /svg [Tue Jul 02 00:12:11.947149 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: CGI Request 1 on process 2405 [Tue Jul 02 00:12:11.947213 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): rendering using outputformat named svg (CAIRO/SVG). [Tue Jul 02 00:12:11.947223 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): WMS/WFS set-up and query, 0.000s [Tue Jul 02 00:12:11.947230 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): Layer 0 (thematic), 0.040s [Tue Jul 02 00:12:11.947238 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): Drawing Label Cache, 0.000s [Tue Jul 02 00:12:11.947245 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap() total time: 0.040s [Tue Jul 02 00:12:11.947253 2013] [fcgid:warn] [pid 2398] [client 50.197.85.69:2118] mod_fcgid: stderr: msSaveImage(stdout) total time: 0.005s [Tue Jul 02 00:12:11.947261 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: mapserv request processing time (msLoadMap not incl.): 0.045s [Tue Jul 02 00:12:11.947268 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msFreeMap(): freeing map at 0x8881a0. DEBUG 5 is set logging to the same file (stderr). ./mapserv -v MapServer version 6.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Thanks, Nick ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] FCGI and SVG output goes to STDERR?
Nick, As I vaguely recall from when I worked on fastcgi support in MapServer, only output formats that can be redirected through the low level mapserver io layer (ms_io*.c) will work properly in fastcgi mode. I'm guessing the svg encoder just writes directly to stdout. If my theory is correct, non-trivial code changes would be necessary to make this work. Best regards, Frank On Mon, Jul 1, 2013 at 5:16 PM, Nick Webb ni...@redwireservices.com wrote: List, I've really tried hard to nail this down, but it makes no sense to me. I'm not a map guy, but am a system administrator for one. We have a mapserver setup that works fine for both PNG and SVG when we use the standard apache cgi module. When we switch to mod_fcgid, however, SVG displays no output in the browser and instead seems to output proper SVG/XML to the apache error log! PNG continues to work fine. I'm flabbergasted and nothing I try seems to work. I even set it up on another server and I get the same result, given I'm following the same build steps. Any ideas on where I can go next? Perhaps the SVG is not really valid, but I've copied and pasted the XML/SVG from the error_log to a static file, and that also displays fine via a browser. Here is the error_log output: ?xml version=1.0 encoding=UTF-8? svg xmlns=http://www.w3.org/2000/svg; xmlns:xlink= http://www.w3.org/1999/xlink; width=200pt height=154pt viewBox=0 0 200 154 version=1.1 g id=surface0 . . . /g /svg [Tue Jul 02 00:12:11.947149 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: CGI Request 1 on process 2405 [Tue Jul 02 00:12:11.947213 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): rendering using outputformat named svg (CAIRO/SVG). [Tue Jul 02 00:12:11.947223 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): WMS/WFS set-up and query, 0.000s [Tue Jul 02 00:12:11.947230 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): Layer 0 (thematic), 0.040s [Tue Jul 02 00:12:11.947238 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): Drawing Label Cache, 0.000s [Tue Jul 02 00:12:11.947245 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap() total time: 0.040s [Tue Jul 02 00:12:11.947253 2013] [fcgid:warn] [pid 2398] [client 50.197.85.69:2118] mod_fcgid: stderr: msSaveImage(stdout) total time: 0.005s [Tue Jul 02 00:12:11.947261 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: mapserv request processing time (msLoadMap not incl.): 0.045s [Tue Jul 02 00:12:11.947268 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msFreeMap(): freeing map at 0x8881a0. DEBUG 5 is set logging to the same file (stderr). ./mapserv -v MapServer version 6.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Thanks, Nick ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Software Developer ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] FCGI and SVG output goes to STDERR?
On Mon, Jul 1, 2013 at 5:50 PM, Frank Warmerdam warmer...@pobox.com wrote: Nick, As I vaguely recall from when I worked on fastcgi support in MapServer, only output formats that can be redirected through the low level mapserver io layer (ms_io*.c) will work properly in fastcgi mode. I'm guessing the svg encoder just writes directly to stdout. If my theory is correct, non-trivial code changes would be necessary to make this work. Thanks Frank, that actually makes perfect sense. I'm not all that familiar, but it seems that I read somewhere that a legacy version of mapserver had native SVG support, which in turn would work with fastcgi? Seems I also read native support is on the wish list for a future release as well. On Mon, Jul 1, 2013 at 5:16 PM, Nick Webb ni...@redwireservices.comwrote: List, I've really tried hard to nail this down, but it makes no sense to me. I'm not a map guy, but am a system administrator for one. We have a mapserver setup that works fine for both PNG and SVG when we use the standard apache cgi module. When we switch to mod_fcgid, however, SVG displays no output in the browser and instead seems to output proper SVG/XML to the apache error log! PNG continues to work fine. I'm flabbergasted and nothing I try seems to work. I even set it up on another server and I get the same result, given I'm following the same build steps. Any ideas on where I can go next? Perhaps the SVG is not really valid, but I've copied and pasted the XML/SVG from the error_log to a static file, and that also displays fine via a browser. Here is the error_log output: ?xml version=1.0 encoding=UTF-8? svg xmlns=http://www.w3.org/2000/svg; xmlns:xlink= http://www.w3.org/1999/xlink; width=200pt height=154pt viewBox=0 0 200 154 version=1.1 g id=surface0 . . . /g /svg [Tue Jul 02 00:12:11.947149 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: CGI Request 1 on process 2405 [Tue Jul 02 00:12:11.947213 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): rendering using outputformat named svg (CAIRO/SVG). [Tue Jul 02 00:12:11.947223 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): WMS/WFS set-up and query, 0.000s [Tue Jul 02 00:12:11.947230 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): Layer 0 (thematic), 0.040s [Tue Jul 02 00:12:11.947238 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): Drawing Label Cache, 0.000s [Tue Jul 02 00:12:11.947245 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap() total time: 0.040s [Tue Jul 02 00:12:11.947253 2013] [fcgid:warn] [pid 2398] [client 50.197.85.69:2118] mod_fcgid: stderr: msSaveImage(stdout) total time: 0.005s [Tue Jul 02 00:12:11.947261 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: mapserv request processing time (msLoadMap not incl.): 0.045s [Tue Jul 02 00:12:11.947268 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msFreeMap(): freeing map at 0x8881a0. DEBUG 5 is set logging to the same file (stderr). ./mapserv -v MapServer version 6.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Thanks, Nick ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Software Developer ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] FCGI and SVG output goes to STDERR?
Nick, in mapcairo.c near line 857, function int saveImageCairo (imageObj *img, mapObj *map, FILE *fp, outputFormatObj *format) try changing fwrite to msIO_fwrite In any case, please open an issue for this one so it doesn't get forgotten. regards, thomas On 2 July 2013 06:29, Nick Webb ni...@redwireservices.com wrote: On Mon, Jul 1, 2013 at 5:50 PM, Frank Warmerdam warmer...@pobox.com wrote: Nick, As I vaguely recall from when I worked on fastcgi support in MapServer, only output formats that can be redirected through the low level mapserver io layer (ms_io*.c) will work properly in fastcgi mode. I'm guessing the svg encoder just writes directly to stdout. If my theory is correct, non-trivial code changes would be necessary to make this work. Thanks Frank, that actually makes perfect sense. I'm not all that familiar, but it seems that I read somewhere that a legacy version of mapserver had native SVG support, which in turn would work with fastcgi? Seems I also read native support is on the wish list for a future release as well. On Mon, Jul 1, 2013 at 5:16 PM, Nick Webb ni...@redwireservices.com wrote: List, I've really tried hard to nail this down, but it makes no sense to me. I'm not a map guy, but am a system administrator for one. We have a mapserver setup that works fine for both PNG and SVG when we use the standard apache cgi module. When we switch to mod_fcgid, however, SVG displays no output in the browser and instead seems to output proper SVG/XML to the apache error log! PNG continues to work fine. I'm flabbergasted and nothing I try seems to work. I even set it up on another server and I get the same result, given I'm following the same build steps. Any ideas on where I can go next? Perhaps the SVG is not really valid, but I've copied and pasted the XML/SVG from the error_log to a static file, and that also displays fine via a browser. Here is the error_log output: ?xml version=1.0 encoding=UTF-8? svg xmlns=http://www.w3.org/2000/svg; xmlns:xlink= http://www.w3.org/1999/xlink; width=200pt height=154pt viewBox=0 0 200 154 version=1.1 g id=surface0 . . . /g /svg [Tue Jul 02 00:12:11.947149 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: CGI Request 1 on process 2405 [Tue Jul 02 00:12:11.947213 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): rendering using outputformat named svg (CAIRO/SVG). [Tue Jul 02 00:12:11.947223 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): WMS/WFS set-up and query, 0.000s [Tue Jul 02 00:12:11.947230 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): Layer 0 (thematic), 0.040s [Tue Jul 02 00:12:11.947238 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap(): Drawing Label Cache, 0.000s [Tue Jul 02 00:12:11.947245 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msDrawMap() total time: 0.040s [Tue Jul 02 00:12:11.947253 2013] [fcgid:warn] [pid 2398] [client 50.197.85.69:2118] mod_fcgid: stderr: msSaveImage(stdout) total time: 0.005s [Tue Jul 02 00:12:11.947261 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: mapserv request processing time (msLoadMap not incl.): 0.045s [Tue Jul 02 00:12:11.947268 2013] [fcgid:warn] [pid 2398] [client 50.197.85.9:2118] mod_fcgid: stderr: msFreeMap(): freeing map at 0x8881a0. DEBUG 5 is set logging to the same file (stderr). ./mapserv -v MapServer version 6.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Thanks, Nick ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Software Developer ___ 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