Make SHAPE-ZIP WFS output format capable of sending .prj files in ESRI WKT format
---------------------------------------------------------------------------------
Key: GEOS-4503
URL: http://jira.codehaus.org/browse/GEOS-4503
Project: GeoServer
Issue Type: Improvement
Components: WFS, Wicket UI
Reporter: Gabriel Roldán
Assignee: Gabriel Roldán
Fix For: 2.1.x
The SHAPE-ZIP output format should be enhanced in order to be able of providing the <shapefile>.prj file in ESRI WKT format as well as the current OGC WKT format, so that it is easier to ESRI based GIS clients to recognize the CRS of the shapefiles produced by the output formats, as some of them don't parse the OGC CRS WKT.
The way it should work is that it should be possible to configure the default CRS WKT format through the WFS admin page (either OGC or ESRI) so an organization can decide on whether to produce one or the other by default, and at the same time a specific format_options parameter should be supported by the SHAPE-ZIP output format for per-request control of the CRS WKT format.
For example: .../wfs?...&request=GetFeature&outputFormat=SHAPE-ZIP&format_options=prjFileFormat:<OGC|ESRI>
Implementation notes:
The current CoordinateReferenceSystem.toWKT():String method always produces a CRS WKT in OGC format. The OGC and ESRI format differ mainly on the name of identified objects and units of measure. It is not the intent of this task to provide an alternate implementation of toWKT() as that would be quite an extensive endeavor (since the names used are taken from the EPSG database). Instead, the approach proposed is for the SHAPE-ZIP output format to rely on a properties file that maps EPSG codes to ESRI WKT representations. These representations are available at least at the following sites: [http://spatialreference.org/\] and [http://prj2epsg.org].
As GeoServer does with other resources (for instance, the logging profiles), the output format could contain a predefined list of these mappings in a .properties file internal to the output format's jar file, that gets copied at startup time to the GeoServer data directory (say, <data dir>/user_projections/esri.properties) only if it does not already exist, so that a user can add additional mappings that are not included by default.
When creating the zipped shapefile, the SHAPE-ZIP output format will honor the global setting for the contents of the .prj file, which is override by the presence of the format_options=prjFileFormat:<OGC|ESRI> parameter.
In the event that the ESRI WKT format is requested over a non existent entry in the properties file for the output CRS EPSG code, an exception shall be thrown.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira