Package org.h2gis.functions.io.osm
Class ST_OSMDownloader
java.lang.Object
org.h2gis.api.AbstractFunction
org.h2gis.functions.io.osm.ST_OSMDownloader
- All Implemented Interfaces:
org.h2gis.api.Function,org.h2gis.api.ScalarFunction
public class ST_OSMDownloader
extends org.h2gis.api.AbstractFunction
implements org.h2gis.api.ScalarFunction
This function is used to download data from the osm api using a bounding box.
- Author:
- Erwan Bocher
-
Field Summary
Fields inherited from interface org.h2gis.api.Function
PROP_NAME, PROP_REMARKSFields inherited from interface org.h2gis.api.ScalarFunction
PROP_DETERMINISTIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddownloadData(Connection con, org.locationtech.jts.geom.Geometry area, String fileName) static voiddownloadData(Connection con, org.locationtech.jts.geom.Geometry area, String fileName, boolean deleteFile) static voiddownloadOSMFile(File file, org.locationtech.jts.geom.Envelope geometryEnvelope) Download OSM file from the official serverMethods inherited from class org.h2gis.api.AbstractFunction
addProperty, getProperty, removePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.h2gis.api.Function
getProperty
-
Constructor Details
-
ST_OSMDownloader
public ST_OSMDownloader()
-
-
Method Details
-
getJavaStaticMethod
- Specified by:
getJavaStaticMethodin interfaceorg.h2gis.api.ScalarFunction
-
downloadData
public static void downloadData(Connection con, org.locationtech.jts.geom.Geometry area, String fileName) throws FileNotFoundException, IOException, SQLException, org.cts.op.CoordinateOperationException - Parameters:
con- the database connectionarea- The geometry used to compute the area set to the OSM serverfileName- The path to save the osm file- Throws:
FileNotFoundExceptionIOExceptionSQLExceptionorg.cts.op.CoordinateOperationException
-
downloadData
public static void downloadData(Connection con, org.locationtech.jts.geom.Geometry area, String fileName, boolean deleteFile) throws FileNotFoundException, IOException, SQLException, org.cts.op.CoordinateOperationException - Parameters:
con- the database connectionarea- The geometry used to compute the area set to the OSM serverfileName- The path to save the osm filedeleteFile- True to delete the file if exists- Throws:
FileNotFoundExceptionIOExceptionSQLExceptionorg.cts.op.CoordinateOperationException
-
downloadOSMFile
public static void downloadOSMFile(File file, org.locationtech.jts.geom.Envelope geometryEnvelope) throws IOException Download OSM file from the official server- Parameters:
file-geometryEnvelope-- Throws:
IOException
-