Add support for non-EPSG projections for WCS and WFS protocols#7457
Add support for non-EPSG projections for WCS and WFS protocols#7457geographika merged 32 commits intoMapServer:mainfrom
Conversation
| } | ||
| strlcpy(auth, tokens[i], authlen + 1); | ||
| code = sep + 1; | ||
| snprintf(urn, sizeof(urn), "%s%s/0/%s", OGC_CRS_PREFIX, auth, code); |
There was a problem hiding this comment.
we should likely have a special case to turn "http://www.opengis.net/def/crs/IAU_2015/0/code" as "http://www.opengis.net/def/crs/IAU/2015/code".
The IAU_2015 authority is a bit of a hack, that captures both the authority and version
There was a problem hiding this comment.
I'll look at the IAU_2015 again when adding tests for the OGC Features API and non-ESPG projections. I was trying (and not really succeeding!) in keeping the scope of this PR to a minimum. It would be nice to get a lunar Mapfile working as a MapServer demo.
547a3f8 to
428b785
Compare
|
Thanks for the review @rouault - much appreciated!
|
Follow-up to #7457 to add a test and guard for invalid projection strings in a Mapfile. Fixes: Reference Info: 500975699 mapserver:mapfuzzer: Null-dereference READ in msProcessProjection https://oss-fuzz.com/testcase-detail/6167937613627392
This pull request adds support for using non-EPSG projection codes in WCS and WFS services. This includes both accessing the data in a non-EPSG projection and advertising the projections in GetCapabilities requests. For example the
wcs_custom_projection_capabilities201.xmlresponse includes:And any of these projections can be used to request a coverage e.g.
&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=test&SUBSETTINGCRS=urn:ogc:def:crs:ESRI::53009&SUBSET=x(-3276599.0027238373,-3258457.2498260457)&SUBSET=y(8498088.094072288,8507095.190921152)&SCALESIZE=x(512),y(254)&OUTPUTCRS=urn:ogc:def:crs:ESRI::53009&FORMAT=image/pngA full test suite for WCS 1.0.0, 1.1.1, and 2.0.1 is added in
wcs_custom_projection.map.As several functions were shared with the WFS code, WFS was also updated, and a full test suite found in
wfs_custom_projection.map.WMS had already been updated to handle custom CRSs in #6795.
Note - OGC Features API was not updated, and does not support handling non-EPSG projections. This can be dealt with in a subsequent PR.
Other notes:
msLoadProjectionString- which is used by several MapServer service protocols.msautotest/mspython/test_projections.py. In summary any code in the format AUTH:CODE that is inproj.dbwill be handled, and any authorities not in proj.db can be added usinginit=CUSTOMAUTH:CODEand searchPROJ_DATAfor a file with a Proj string.EPSG:3857rather thaninit=EPSG:3857, removing CRS warnings in WMS GetCapabilitiesThis PR fixes the following issues: