Class GeometryIntermodalWriter
- java.lang.Object
-
- org.goplanit.geoio.converter.intermodal.GeometryIntermodalWriter
-
- All Implemented Interfaces:
ConverterEntity
,IntermodalWriter<ServiceNetwork,RoutedServices>
,PairConverterWriter<MacroscopicNetwork,Zoning>
public class GeometryIntermodalWriter extends Object implements IntermodalWriter<ServiceNetwork,RoutedServices>
Geometry intermodal writer to persist in GIS format, wrapping a Geometry network writer and Geometry zoning writer (and optionally a service network and routes services writer )in one- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected IdMapperType
idMapper
the id mapper to useprotected GeometryIntermodalWriterSettings
settings
intermodal writer settings to use
-
Constructor Summary
Constructors Modifier Constructor Description protected
GeometryIntermodalWriter(String outputDirectory, String countryName)
Constructorprotected
GeometryIntermodalWriter(GeometryIntermodalWriterSettings settings)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IdMapperType
getIdMapperType()
collect the way the ids should be mappedGeometryIntermodalWriterSettings
getSettings()
Any settings to configure the writer can be configured by collecting these settingsvoid
reset()
reset the reader to allow for marking unnecessary resources for garbage collectionvoid
setIdMapperType(IdMapperType idMapper)
set the way ids should be mappedvoid
write(MacroscopicNetwork macroscopicNetwork, Zoning zoning)
Write a network to the writer's output format.protected Pair<GeometryNetworkWriter,GeometryZoningWriter>
writeNetworkAndZoning(MacroscopicNetwork macroscopicNetwork, Zoning zoning)
Persist network and zoning and return writers used.void
writeWithServices(MacroscopicNetwork macroscopicNetwork, Zoning zoning, ServiceNetwork serviceNetwork, RoutedServices routedServices)
Write a network to the writer's output format.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.converter.intermodal.IntermodalWriter
getTypeDescription
-
-
-
-
Field Detail
-
settings
protected final GeometryIntermodalWriterSettings settings
intermodal writer settings to use
-
idMapper
protected IdMapperType idMapper
the id mapper to use
-
-
Constructor Detail
-
GeometryIntermodalWriter
protected GeometryIntermodalWriter(String outputDirectory, String countryName)
Constructor- Parameters:
outputDirectory
- to persist oncountryName
- to optimise projection for (if available, otherwise ignore)
-
GeometryIntermodalWriter
protected GeometryIntermodalWriter(GeometryIntermodalWriterSettings settings)
Constructor- Parameters:
settings
- to use
-
-
Method Detail
-
writeNetworkAndZoning
protected Pair<GeometryNetworkWriter,GeometryZoningWriter> writeNetworkAndZoning(MacroscopicNetwork macroscopicNetwork, Zoning zoning)
Persist network and zoning and return writers used. If the virtual network of the combination of zoning and network is indicated to be persisted, then this is done automatically.- Parameters:
macroscopicNetwork
- to persistzoning
- to persist- Returns:
- used writers, network and zoning, respectively
-
write
public void write(MacroscopicNetwork macroscopicNetwork, Zoning zoning)
Write a network to the writer's output format.- Specified by:
write
in interfacePairConverterWriter<MacroscopicNetwork,Zoning>
- Parameters:
macroscopicNetwork
- to writezoning
- to write
-
writeWithServices
public void writeWithServices(MacroscopicNetwork macroscopicNetwork, Zoning zoning, ServiceNetwork serviceNetwork, RoutedServices routedServices)
Write a network to the writer's output format.- Specified by:
writeWithServices
in interfaceIntermodalWriter<ServiceNetwork,RoutedServices>
- Parameters:
macroscopicNetwork
- network to writezoning
- to writeserviceNetwork
- to writeroutedServices
- to write
-
getIdMapperType
public IdMapperType getIdMapperType()
collect the way the ids should be mapped- Specified by:
getIdMapperType
in interfacePairConverterWriter<MacroscopicNetwork,Zoning>
- Returns:
- the id mapping choice
-
setIdMapperType
public void setIdMapperType(IdMapperType idMapper)
set the way ids should be mapped- Specified by:
setIdMapperType
in interfacePairConverterWriter<MacroscopicNetwork,Zoning>
- Parameters:
idMapper
- to use
-
reset
public void reset()
reset the reader to allow for marking unnecessary resources for garbage collection- Specified by:
reset
in interfaceConverterEntity
-
getSettings
public GeometryIntermodalWriterSettings getSettings()
Any settings to configure the writer can be configured by collecting these settings- Specified by:
getSettings
in interfacePairConverterWriter<MacroscopicNetwork,Zoning>
- Returns:
- the settings to configure the writer
-
-