Class ST_OverpassDownloader

  • All Implemented Interfaces:
    org.h2gis.api.Function, org.h2gis.api.ScalarFunction

    public class ST_OverpassDownloader
    extends org.h2gis.api.AbstractFunction
    implements org.h2gis.api.ScalarFunction
    A function to extract data from Overpass api and save it into a file
    Author:
    E. Bocher, CNRS
    • Constructor Detail

      • ST_OverpassDownloader

        public ST_OverpassDownloader()
    • Method Detail

      • getJavaStaticMethod

        public String getJavaStaticMethod()
        Specified by:
        getJavaStaticMethod in interface org.h2gis.api.ScalarFunction
      • execute

        public static void execute​(String overpassQuery,
                                   String fileName)
                            throws Exception
        Extract OSM DATA
        Parameters:
        overpassQuery - the overpass query
        fileName - the output file
        Throws:
        Exception
      • execute

        public static void execute​(String overpassQuery,
                                   String fileName,
                                   boolean deleteFile)
                            throws Exception
        Extract OSM DATA
        Parameters:
        overpassQuery - the overpass query
        fileName - the output file
        deleteFile - true to delete the file if exists
        Throws:
        Exception
      • execute

        public static void execute​(String overpassQuery,
                                   String fileName,
                                   boolean deleteFile,
                                   String options)
                            throws Exception
        Extract OSM DATA
        Parameters:
        overpassQuery - the overpass query
        fileName - the output file
        deleteFile - true to delete the file if exists
        options - network options as proxyhost=? proxyport=? endpoint=?
        Throws:
        Exception