Class EpsgCodesByCountry


  • public class EpsgCodesByCountry
    extends Object
    convenience method that provides a mapping from country name to a possible EPSG coordinate reference system code, e.g., "EPSG:1234". This list is currently hard coded and limited but we hope to extend it and make it more flexible over time
    Author:
    markr
    • Field Detail

      • GERMANY_DHDN

        public static final String GERMANY_DHDN
        Area of use: Germany, 3-degree Gauss-Kruger zone 4, EPSG:31468
        See Also:
        Constant Field Values
      • NETHERLANDS_RDS

        public static final String NETHERLANDS_RDS
        Area of use: Netherlands, Rijks Driehoek Stelsel, EPSG:28992
        See Also:
        Constant Field Values
      • WORLD_WG84

        public static final String WORLD_WG84
        Area of use: world, EPSG:4326, accessible via countryname: "global" as CountryNames.GLOBAL
        See Also:
        Constant Field Values
      • countryToEpsgCodes

        protected static final HashMap<String,​String> countryToEpsgCodes
        mapping of country names to expected most commonly used EPSG code
    • Constructor Detail

      • EpsgCodesByCountry

        public EpsgCodesByCountry()
    • Method Detail

      • add

        protected static void add​(String countryName,
                                  String epsgCode)
        add a mapping to the register
        Parameters:
        countryName - to use
        epsgCode - to use
      • getEpsg

        public static final String getEpsg​(String countryName)
        collect the epsg most likely applicable code based on the country name. If no mapping exists yet null is returned
        Parameters:
        countryName - to use
        Returns:
        epsg code string