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.ScalarFunctionThis function is used to download data from the osm api using a bounding box.- Author:
- Erwan Bocher
-
-
Constructor Summary
Constructors Constructor Description ST_OSMDownloader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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 serverStringgetJavaStaticMethod()-
Methods inherited from class org.h2gis.api.AbstractFunction
addProperty, getProperty, removeProperty
-
-
-
-
Method Detail
-
getJavaStaticMethod
public String 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
-
-