Add more alternative identifiers for EPSG:4326

This commit is contained in:
Tim Schaub
2021-08-08 12:15:52 -06:00
parent 73bb89f196
commit 08583b4a41
2 changed files with 13 additions and 12 deletions
+2
View File
@@ -63,5 +63,7 @@ export const PROJECTIONS = [
new EPSG4326Projection('EPSG:4326', 'neu'), new EPSG4326Projection('EPSG:4326', 'neu'),
new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'), new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'),
new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'), new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'),
new EPSG4326Projection('http://www.opengis.net/def/crs/OGC/1.3/CRS84', 'neu'),
new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'), new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),
new EPSG4326Projection('http://www.opengis.net/def/crs/EPSG/0/4326', 'neu'),
]; ];
+11 -12
View File
@@ -219,18 +219,17 @@ describe('ol/proj.js', function () {
_testAllEquivalent(['EPSG:3857', 'EPSG:3857']); _testAllEquivalent(['EPSG:3857', 'EPSG:3857']);
}); });
it( it('treats EPSG:4326 variants as equivalent', function () {
'gives that CRS:84, urn:ogc:def:crs:EPSG:6.6:4326, EPSG:4326, ' + _testAllEquivalent([
'urn:x-ogc:def:crs:EPSG:6.6:4326 are equivalent', 'CRS:84',
function () { 'urn:ogc:def:crs:EPSG:6.6:4326',
_testAllEquivalent([ 'urn:x-ogc:def:crs:EPSG:6.6:4326',
'CRS:84', 'EPSG:4326',
'urn:ogc:def:crs:EPSG:6.6:4326', 'http://www.opengis.net/def/crs/OGC/1.3/CRS84',
'urn:x-ogc:def:crs:EPSG:6.6:4326', 'http://www.opengis.net/gml/srs/epsg.xml#4326',
'EPSG:4326', 'http://www.opengis.net/def/crs/EPSG/0/4326',
]); ]);
} });
);
it('requires code and units to be equal for projection evquivalence', function () { it('requires code and units to be equal for projection evquivalence', function () {
const proj1 = new Projection({ const proj1 = new Projection({