org.h2gis.drivers.osm
Class ST_OSMDownloader

java.lang.Object
  extended by org.h2gis.h2spatialapi.AbstractFunction
      extended by org.h2gis.h2spatialapi.DeterministicScalarFunction
          extended by org.h2gis.drivers.osm.ST_OSMDownloader
All Implemented Interfaces:
Function, ScalarFunction

public class ST_OSMDownloader
extends DeterministicScalarFunction

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.h2spatialapi.ScalarFunction
PROP_DETERMINISTIC, PROP_NOBUFFER
 
Fields inherited from interface org.h2gis.h2spatialapi.Function
PROP_NAME, PROP_REMARKS
 
Constructor Summary
ST_OSMDownloader()
           
 
Method Summary
static void downloadData(com.vividsolutions.jts.geom.Geometry area, String fileName)
           
static void downloadOSMFile(File file, com.vividsolutions.jts.geom.Envelope geometryEnvelope)
          Download OSM file from the official server
 String getJavaStaticMethod()
           
 
Methods inherited from class org.h2gis.h2spatialapi.AbstractFunction
addProperty, getProperty, removeProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.h2gis.h2spatialapi.Function
getProperty
 

Constructor Detail

ST_OSMDownloader

public ST_OSMDownloader()
Method Detail

getJavaStaticMethod

public String getJavaStaticMethod()

downloadData

public static void downloadData(com.vividsolutions.jts.geom.Geometry area,
                                String fileName)
                         throws FileNotFoundException,
                                IOException
Parameters:
area - The geometry used to compute the area set to the OSM server
fileName - The path to save the osm file
Throws:
FileNotFoundException
IOException

downloadOSMFile

public static void downloadOSMFile(File file,
                                   com.vividsolutions.jts.geom.Envelope geometryEnvelope)
                            throws IOException
Download OSM file from the official server

Parameters:
file -
geometryEnvelope -
Throws:
IOException


Copyright © 2015 IRSTV CNRS-FR-2488. All Rights Reserved.