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 IdMapperTypeidMapperthe id mapper to useprotected GeometryIntermodalWriterSettingssettingsintermodal writer settings to use
-
Constructor Summary
Constructors Modifier Constructor Description protectedGeometryIntermodalWriter(String outputDirectory, String countryName)ConstructorprotectedGeometryIntermodalWriter(GeometryIntermodalWriterSettings settings)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IdMapperTypegetIdMapperType()collect the way the ids should be mappedGeometryIntermodalWriterSettingsgetSettings()Any settings to configure the writer can be configured by collecting these settingsvoidreset()reset the reader to allow for marking unnecessary resources for garbage collectionvoidsetIdMapperType(IdMapperType idMapper)set the way ids should be mappedvoidwrite(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.voidwriteWithServices(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:
writein 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:
writeWithServicesin 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:
getIdMapperTypein interfacePairConverterWriter<MacroscopicNetwork,Zoning>- Returns:
- the id mapping choice
-
setIdMapperType
public void setIdMapperType(IdMapperType idMapper)
set the way ids should be mapped- Specified by:
setIdMapperTypein 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:
resetin interfaceConverterEntity
-
getSettings
public GeometryIntermodalWriterSettings getSettings()
Any settings to configure the writer can be configured by collecting these settings- Specified by:
getSettingsin interfacePairConverterWriter<MacroscopicNetwork,Zoning>- Returns:
- the settings to configure the writer
-
-