Class OverpassUtil



  • public class OverpassUtil
    extends Object
    • Constructor Summary

      Constructors

      Constructor and Description
      OverpassUtil()
       
    • Method Summary

      Methods

      Modifier and Type Method and Description
      static void cache(BBox box)
      Retrieves data from Overpass API for the specified bounding box and stores it in the file that cache(BBox) returns.
      static void cache(BBox box, boolean forceRefresh)
      Retrieves data from Overpass API for the specified bounding box and stores it in the file that cache(BBox) returns.
      static Path cacheFile(BBox box)
      Retrieves the path to a cache file in /tmp that is used to cache data from the specified bounding box.
      static String query(BBox box)
      Retrieves the query to the Overpass API for the specified bounding box.
    • Constructor Detail

      • OverpassUtil

        public OverpassUtil()
    • Method Detail

      • query

        public static String query(BBox box)
        Retrieves the query to the Overpass API for the specified bounding box.
      • cacheFile

        public static Path cacheFile(BBox box)
        Retrieves the path to a cache file in /tmp that is used to cache data from the specified bounding box.
      • cache

        public static void cache(BBox box,
                                 boolean forceRefresh)
                          throws MalformedURLException,
                                 IOException
        Retrieves data from Overpass API for the specified bounding box and stores it in the file that cache(BBox) returns. If the cache file already exists, nothing is downloaded.
        Parameters:
        forceRefresh - whether to delete the cache file if it already exists.
        Throws:
        MalformedURLException
        IOException