org.osm2world.core
public class ConversionFacade extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ConversionFacade.BoundingBoxSizeException
exception to be thrown if the OSM input data covers an area
larger than the maxBoundingBoxDegrees config property
|
static class |
ConversionFacade.Phase |
static interface |
ConversionFacade.ProgressListener
implemented by classes that want to be informed about
a conversion run's progress
|
static class |
ConversionFacade.Results
all results of a conversion run
|
Constructor and Description |
---|
ConversionFacade() |
Modifier and Type | Method and Description |
---|---|
void |
addProgressListener(ConversionFacade.ProgressListener listener) |
ConversionFacade.Results |
createRepresentations(File osmFile,
List<? extends WorldModule> worldModules,
Configuration config,
List<? extends Target<?>> targets)
performs all necessary steps to go from
an OSM file to the renderable
WorldObject s. |
ConversionFacade.Results |
createRepresentations(OSMData osmData,
List<? extends WorldModule> worldModules,
Configuration config,
List<? extends Target<?>> targets)
variant of
createRepresentations(File, List, Configuration, List)
that accepts OSMData instead of a file. |
void |
setEleConstraintEnforcerFactory(Factory<? extends EleConstraintEnforcer> interpolatorFactory)
sets the factory that will make
EleConstraintEnforcer
instances during subsequent calls to
createRepresentations(OSMData, List, Configuration, List) . |
void |
setMapProjectionFactory(Factory<? extends OriginMapProjection> mapProjectionFactory)
sets the factory that will make
MapProjection
instances during subsequent calls to
createRepresentations(OSMData, List, Configuration, List) . |
void |
setTerrainEleInterpolatorFactory(Factory<? extends TerrainInterpolator> enforcerFactory)
sets the factory that will make
TerrainInterpolator
instances during subsequent calls to
createRepresentations(OSMData, List, Configuration, List) . |
public void setMapProjectionFactory(Factory<? extends OriginMapProjection> mapProjectionFactory)
MapProjection
instances during subsequent calls to
createRepresentations(OSMData, List, Configuration, List)
.DefaultFactory
public void setEleConstraintEnforcerFactory(Factory<? extends EleConstraintEnforcer> interpolatorFactory)
EleConstraintEnforcer
instances during subsequent calls to
createRepresentations(OSMData, List, Configuration, List)
.DefaultFactory
public void setTerrainEleInterpolatorFactory(Factory<? extends TerrainInterpolator> enforcerFactory)
TerrainInterpolator
instances during subsequent calls to
createRepresentations(OSMData, List, Configuration, List)
.DefaultFactory
public ConversionFacade.Results createRepresentations(File osmFile, List<? extends WorldModule> worldModules, Configuration config, List<? extends Target<?>> targets) throws IOException
WorldObject
s.
Sends updates to ConversionFacade.ProgressListener
s.osmFile
- file to read OSM data from; != nullworldModules
- modules that will create the WorldObject
s
in the result; null to use a default module listconfig
- set of parameters that controls various aspects
of the modules' behavior; null to use defaultstargets
- receivers of the conversion results; can be null if
you want to handle the returned results yourselfIOException
public ConversionFacade.Results createRepresentations(OSMData osmData, List<? extends WorldModule> worldModules, Configuration config, List<? extends Target<?>> targets) throws IOException, ConversionFacade.BoundingBoxSizeException
createRepresentations(File, List, Configuration, List)
that accepts OSMData
instead of a file.
Use this when all data is already
in memory, for example with editor applications.
To obtain the data, you can use an OSMDataReader
.osmData
- input data; != nullworldModules
- modules that will create the WorldObject
s
in the result; null to use a default module listconfig
- set of parameters that controls various aspects
of the modules' behavior; null to use defaultstargets
- receivers of the conversion results; can be null if
you want to handle the returned results yourselfConversionFacade.BoundingBoxSizeException
- for oversized bounding boxesIOException
public void addProgressListener(ConversionFacade.ProgressListener listener)