Class Territories


  • public final class Territories
    extends java.lang.Object
    Look up territories ISO3166 codes at a certain place.
    • Method Detail

      • getKnownIso3166Codes

        public static java.util.Set<java.lang.String> getKnownIso3166Codes()
        Get all known ISO3166-1 and ISO3166-2 codes.
        Returns:
        the ISO3166-1 and ISO3166-2 codes for the given location
      • isIso3166Code

        public static boolean isIso3166Code​(java.lang.String code,
                                            LatLon ll)
        Determine, if a point is inside a territory with the given ISO3166-1 or ISO3166-2 code.
        Parameters:
        code - the ISO3166-1 or ISO3166-2 code
        ll - the coordinates of the point
        Returns:
        true, if the point is inside a territory with the given code
      • getOriginalDataSet

        public static DataSet getOriginalDataSet()
        Returns the original territories dataset. Be extra cautious when manipulating it!
        Returns:
        the original territories dataset
        Since:
        15565
      • initializeInternalData

        public static void initializeInternalData()
        Initializes territories using the internal data only.
      • initializeExternalData

        static void initializeExternalData​(java.lang.String source,
                                           java.lang.String path)
      • readExternalTaginfo

        private static void readExternalTaginfo​(java.util.Map<java.lang.String,​TaginfoRegionalInstance> cache,
                                                java.lang.String taginfo,
                                                jakarta.json.JsonArray jsonCodes,
                                                java.lang.String source)
      • getRegionalTaginfoUrls

        public static java.util.List<TaginfoRegionalInstancegetRegionalTaginfoUrls​(LatLon ll)
        Returns regional taginfo instances for the given location.
        Parameters:
        ll - lat/lon where to look.
        Returns:
        regional taginfo instances for the given location (code / url)
        Since:
        15876
      • getCustomTags

        public static TagMap getCustomTags​(java.lang.String code)
        Returns the map of custom tags for a territory with the given ISO3166-1 or ISO3166-2 code.
        Parameters:
        code - the ISO3166-1 or ISO3166-2 code
        Returns:
        the map of custom tags for a territory with the given ISO3166-1 or ISO3166-2 code, or null
        Since:
        16109