I'm using geoserver (2.4.4) to provide users with shapefile downloads. Some of the software the shapefiles are going to be used in requires .prj-files that follows the "ESRI-standard". A bit of searching lead me to a Geoserver ticket (GEOS-4503), and by downloading esri.properties from there and placing it in my %GEOSERVER_DATA_DIR%/user_projections folder I can issue a GET request to:
and i get back a zipfile with (amongst the other files) a .prj-file with the following:
This is fine, as my data is in EPSG:4326 and the string above is indeed the "ESRI-type" I want.
However, i also need the user to filter their data, so I've figured that I need to use a filter, and thus POST an XML-file like this:
<wfs:GetFeature service="WFS" version="1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> <wfs:Query typeName="ns:layername" srsName="EPSG:4326"> <ogc:Filter> <PropertyIsEqualTo> <PropertyName>version</PropertyName> <Literal>56</Literal> </PropertyIsEqualTo> </ogc:Filter> </wfs:Query> </wfs:GetFeature>
to an url like:
I also get a zip-file with the data back, but this time the .prj file has this content:
GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["E PSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST] , AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4326"]]
And this is indeed the OGC-prj-format. Why?
(In addition to setting format_options=PRJFILEFORMAT:ESRI I've also tried to check the "Use ESRI WKT format for SHAPE-ZIP generated .prj files" box in the WFS-page in the geoserver GUI).
So, the question is thus: Why does the override of prj-file-format work on a GET but not on a POST? Is this a known bug, have I discovered a bug or am I doing something wrong? Any pointers, ideas or tricks for debugging this is appreciated!