public class AtlasDataSource
extends java.lang.Object
implements java.io.Serializable, java.lang.AutoCloseable
Atlas data source(s) from an input location. Multiple data files found
are stitched together to build a single Atlas data source. Supported data source types
are Atlas and Osm Protobuf files.| Constructor and Description |
|---|
AtlasDataSource(java.util.Map<java.lang.String,java.lang.String> sparkContext,
org.openstreetmap.atlas.utilities.configuration.Configuration configuration)
Constructs a basic
AtlasDataSource |
AtlasDataSource(java.util.Map<java.lang.String,java.lang.String> sparkContext,
org.openstreetmap.atlas.utilities.configuration.Configuration configuration,
org.openstreetmap.atlas.geography.MultiPolygon polygon)
Constructs an
AtlasDataSource with a MultiPolygon boundary. |
AtlasDataSource(java.util.Map<java.lang.String,java.lang.String> sparkContext,
org.openstreetmap.atlas.utilities.configuration.Configuration configuration,
org.openstreetmap.atlas.geography.Rectangle boundingBox)
Constructs an
AtlasDataSource with bounding box. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.openstreetmap.atlas.geography.atlas.Atlas |
getAtlas() |
org.openstreetmap.atlas.geography.atlas.Atlas |
load(java.lang.String input,
java.lang.String country)
Loads an
Atlas from the input location |
org.openstreetmap.atlas.geography.atlas.Atlas |
load(java.lang.String input,
java.lang.String country,
java.util.function.Consumer<org.openstreetmap.atlas.geography.atlas.Atlas> intermediateAtlasHandler)
Loads an
Atlas from the input location. |
void |
setAtlas(org.openstreetmap.atlas.geography.atlas.Atlas atlas) |
public AtlasDataSource(java.util.Map<java.lang.String,java.lang.String> sparkContext,
org.openstreetmap.atlas.utilities.configuration.Configuration configuration)
AtlasDataSourcesparkContext - Spark context as key-value pairs to use as contextconfiguration - The Configurationpublic AtlasDataSource(java.util.Map<java.lang.String,java.lang.String> sparkContext,
org.openstreetmap.atlas.utilities.configuration.Configuration configuration,
org.openstreetmap.atlas.geography.MultiPolygon polygon)
AtlasDataSource with a MultiPolygon boundary. Only
Atlas data within the boundary will be loadedsparkContext - spark context as key-value pairs to use as contextconfiguration - the Configurationpolygon - a MultiPolygon boundarypublic AtlasDataSource(java.util.Map<java.lang.String,java.lang.String> sparkContext,
org.openstreetmap.atlas.utilities.configuration.Configuration configuration,
org.openstreetmap.atlas.geography.Rectangle boundingBox)
AtlasDataSource with bounding box. Only Atlas data within the
bounding box will be loadedsparkContext - spark context as key-value pairs to use as contextconfiguration - the ConfigurationboundingBox - a Rectangle boundarypublic org.openstreetmap.atlas.geography.atlas.Atlas load(java.lang.String input,
java.lang.String country)
Atlas from the input locationinput - location of the Atlas sourcecountry - country of the AtlasAtlas representation of the data sourcepublic org.openstreetmap.atlas.geography.atlas.Atlas load(java.lang.String input,
java.lang.String country,
java.util.function.Consumer<org.openstreetmap.atlas.geography.atlas.Atlas> intermediateAtlasHandler)
Atlas from the input location. Intermediate Atlases created are
submitted to the provided Consumer to allow for any additional handling.input - location of the Atlas sourcecountry - country of the AtlasintermediateAtlasHandler - handler given intermediate Atlas files when createdAtlas representation of the data sourcepublic org.openstreetmap.atlas.geography.atlas.Atlas getAtlas()
public void setAtlas(org.openstreetmap.atlas.geography.atlas.Atlas atlas)
public void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exception