Changeset 7936 in josm for trunk/src/org


Ignore:
Timestamp:
2015-01-08T14:31:14+01:00 (10 years ago)
Author:
bastiK
Message:

add support for projection EPSG:25828 to EPSG:25838 (ETRS89 / UTM) - in order to support Geoportal Berlin WMS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/Projections.java

    r7248 r7936  
    2020import org.openstreetmap.josm.data.coor.LatLon;
    2121import org.openstreetmap.josm.data.projection.datum.Datum;
     22import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
    2223import org.openstreetmap.josm.data.projection.datum.NTV2GridShiftFileWrapper;
    2324import org.openstreetmap.josm.data.projection.datum.WGS84Datum;
     
    8182
    8283        datums.put("WGS84", WGS84Datum.INSTANCE);
     84        datums.put("GRS80", GRS80Datum.INSTANCE);
    8385
    8486        nadgrids.put("BETA2007.gsb", NTV2GridShiftFileWrapper.BETA2007);
     
    123125    }
    124126
     127    /**
     128     * Get the projection definition string for the given id.
     129     * @param id the id
     130     * @return the string that can be processed by #{link CustomProjection}.
     131     * Null, if the id isn't supported.
     132     */
    125133    public static String getInit(String id) {
    126         return inits.get(id.toUpperCase()).b;
     134        Pair<String, String> r = inits.get(id.toUpperCase());
     135        if (r == null) return null;
     136        return r.b;
    127137    }
    128138
Note: See TracChangeset for help on using the changeset viewer.