[mapserver-users] WFS GetFeature outputformat error

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Nov 15 06:22:17 PST 2011


Hi John,

I tested locally with MapServer-trunk on Windows, using your 
outputformat block, and I successfully returned a 'result.csv' file, 
containing the WKT of the features, for STORAGE=filesystem.  I also kept 
a close eye on my IMAGEPATH directory, but I never saw any temporary 
files get generated there (it is a mystery to me as well).

-jeff


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




On 11-11-15 1:33 AM, John Cartwright wrote:
> Hello All,
>
> I'm trying to use an OGR outputformat as described in http://mapserver.org/output/ogr_output.html.  Map file contains:
>
> OUTPUTFORMAT
>    NAME "CSV"
>    DRIVER "OGR/CSV"
>    MIMETYPE "text/csv"
>    FORMATOPTION "LCO:GEOMETRY=AS_WKT"
>    FORMATOPTION "STORAGE=filesystem"
>    FORMATOPTION "FORM=simple"
>    FORMATOPTION "FILENAME=result.csv"
> END
>
> WEB
>        IMAGEPATH "/Library/WebServer/Documents/output"
>        IMAGEURL "/output/"
> ...
> END
>
> a request like:
>
> http://localhost/cgi-bin/basicworld?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=cities&maxfeatures=10&ouputformat=CSV
>
> returns the error:
>
>    <ServiceException code="NoApplicableCode" locator="mapserv">
> msOGRWriteFromQuery(): General error message. Failed to open result file'/tmp/4ec1f737_ee6f_0/result.csv'.
>    </ServiceException>
>
>
> I don't understand why it's trying to open the output file in /tmp rather than the IMAGEPATH directory.  Also, if MapServer is unable to create the new work directory ("4ec1f737_ee6f_0" in the above example), I'm not sure how to handle that - even if it writes to /tmp.
>
> This is version 6.0.1 on linux.
>
> Thanks for any help!
>
> --john
>



More information about the MapServer-users mailing list