[MS4W-Users] Cannot get OGR output to work

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Jan 3 12:25:37 EST 2012


On 11-12-27 6:27 PM, Rahkonen Jukka wrote:
> Hi,
>
> I asked this same question some time ago in the Mapserver user list but I did not get very much help there. Perhaps my problem is then something related to MS4W.
>
> My trouble is that cannot get the OGR output to work. All my trials have stopped to an error that seems to mean that Mapserver can't write out a temporary file into a temporaty directory under TEMPPATH.
>
> I prepared a zip file containing both the data and a mapfile. After unzipping them to a directory \MS4W\map it should be possible to run the following requests.
>
> Test data (mapfile and a small shapefile)
> http://latuviitta.org/documents/wfs_outputformat_test.zip
>
> GetCapabilities is OK for me
> http://localhost/cgi-bin/mapserv.exe?map=/ms4w/map/mapserver60_wfs_test.map&service=wfs&version=1.0.0&request=getcapabilities
>
> DescribeFeatureType is OK for me
> http://localhost/cgi-bin/mapserv.exe?map=/ms4w/map/mapserver60_wfs_test.map&service=wfs&version=1.0.0&request=describefeaturetype&typename=wfs_polygons
>
> GetFeature with default outputformat is OK for me
> http://localhost/cgi-bin/mapserv.exe?map=/ms4w/map/mapserver60_wfs_test.map&service=wfs&version=1.0.0&request=getfeature&typename=wfs_polygons&maxfeatures=1
>
> GetFeature with default outputformat is OK for me
> http://localhost/cgi-bin/mapserv.exe?map=/ms4w/map/mapserver60_wfs_test.map&service=wfs&version=1.0.0&request=getfeature&typename=wfs_polygons&maxfeatures=1
>
> GetFeature with CSV outputformat fails for me
> http://localhost/cgi-bin/mapserv.exe?map=/ms4w/map/mapserver60_wfs_test.map&service=wfs&version=1.0.0&request=getfeature&typename=wfs_polygons&maxfeatures=1&outputformat=CSV
>
> GetFeature with SHAPEZIP outputformat fails for me
> http://localhost/cgi-bin/mapserv.exe?map=/ms4w/map/mapserver60_wfs_test.map&service=wfs&version=1.0.0&request=getfeature&typename=wfs_polygons&maxfeatures=1&outputformat=SHAPEZIP
>
> CSV and SHAPEZIP output yields error message like
> msOGRWriteFromQuery(): General error message. Failed to open result file '/ms4w/tmp/4eeb55f9_b1c_0/result.csv'.
>
>

Happy new year! :)

I probably mentioned this in your MapServer thread: I did a lot of 
testing of outputformat on windows with MS4W, and you can follow along 
the discussion at http://trac.osgeo.org/mapserver/ticket/3751 - I 
believe those tests were with MapServer 6.2-dev.

Regarding temp file location problems: I have seen this reported 
recently for both linux and windows users.  However I did not hit those 
issues when testing ticket:3751

I think the best way forward would be to create a small test package, 
then make sure you can duplicate the problem with MapServer trunk 
(6.2-dev) on both Windows and Linux; then file the ticket in MapServer 
Trac.  Please CC me in the ticket.

-jeff



-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/




More information about the MS4W-Users mailing list