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"  
                <wfs:Query typeName="ns:layername" srsName="EPSG:4326">            



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.

(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).

Why does the override of prj-file-format work on a GET but not on a POST?


It may be related to the different version of the WFS protocol you used in the two requests. Not sure, I was not the one to implement GEOS-4503

  • Nice catch. I'm rather certain that I've tried version=1.1.0 in the non-working case as well, but i'll re-test – atlefren May 12 '14 at 6:24
  • The WFS-POST returns the same result when specifying version=1.1.0. – atlefren May 12 '14 at 7:13

After some more digging (thanks to Andrea for clarifiction) I ended up trying a couple of things more or less on random.

I've found that in order to get ESRI-style-prj-files from a WFS POST request you have to be sure of two things:

  1. Check the box "Use ESRI WKT format for SHAPE-ZIP generated .prj files" box in the WFS-page in the geoserver GUI"
  2. Send your POST-request to the /geoserver/ows or /geoserver/wfs endpoint (and NOT to the /geoserver/NS/wfs endpoint.

So, you have to set the GUI option to use ESRI format and you cannot use an URL that includes the namespace. In addition, the format_options=PRJFILEFORMAT:ESRI query-param does not have any effect.

  • Regarding the namespace issue: as long as you go to the WFS-settings page for your namespace and check "Use ESRI WKT format for SHAPE-ZIP generated .prj files" box in the WFS-page in the geoserver GUI" there it's fine to use the namespace in the url – atlefren May 12 '14 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.