Changeset 12147 in josm for trunk/src/org
- Timestamp:
- 2017-05-14T21:21:19+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/GetCapabilitiesParseHelper.java
r11921 r12147 5 5 import java.net.MalformedURLException; 6 6 import java.net.URL; 7 import java.util.Locale; 7 8 8 9 import javax.xml.namespace.QName; … … 202 203 * @param crsIdentifier CRS identifier 203 204 * @return CRS Identifier as it is used within JOSM (without prefix) 205 * @see <a href="https://portal.opengeospatial.org/files/?artifact_id=24045"> 206 * Definition identifier URNs in OGC namespace, chapter 7.2: URNs for single objects</a> 204 207 */ 205 208 public static String crsToCode(String crsIdentifier) { 206 209 if (crsIdentifier.startsWith("urn:ogc:def:crs:")) { 207 return crsIdentifier.replaceFirst("urn:ogc:def:crs:([^:]*) :.*:(.*)$", "$1:$2");210 return crsIdentifier.replaceFirst("urn:ogc:def:crs:([^:]*)(?::.*)?:(.*)$", "$1:$2").toUpperCase(Locale.ENGLISH); 208 211 } 209 212 return crsIdentifier;
Note:
See TracChangeset
for help on using the changeset viewer.