Class GeometryNetworkWriter
- java.lang.Object
-
- org.goplanit.converter.BaseWriterImpl<T>
-
- org.goplanit.converter.CrsWriterImpl<T>
-
- org.goplanit.geoio.converter.GeometryIoWriter<LayeredNetwork<?,?>>
-
- org.goplanit.geoio.converter.network.GeometryNetworkWriter
-
- All Implemented Interfaces:
ConverterEntity
,ConverterWriter<LayeredNetwork<?,?>>
,NetworkWriter
public class GeometryNetworkWriter extends GeometryIoWriter<LayeredNetwork<?,?>> implements NetworkWriter
Writer to persist a PLANit network to disk in a geometry centric format such as Shape files. Id mapping default is set to internal ids (not XML ids) by default- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.converter.BaseWriterImpl
idMapper
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GeometryNetworkWriter()
Constructorprotected
GeometryNetworkWriter(String networkPath)
Constructorprotected
GeometryNetworkWriter(String networkPath, String countryName)
Constructorprotected
GeometryNetworkWriter(GeometryNetworkWriterSettings networkSettings)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkIdMapper
getPrimaryIdMapper()
The (main) Id mapper used by this writer (only present after write has been completed)GeometryNetworkWriterSettings
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
write(LayeredNetwork<?,?> network)
write a network to the writer's output format.protected void
writeLayers(MacroscopicNetwork macroscopicNetwork)
Write layers of the network-
Methods inherited from class org.goplanit.geoio.converter.GeometryIoWriter
findDataStore, findFeature, findFeaturePairForPlanitEntity, writeGeometryLayerForEntity, writeGeometryLayerForEntity
-
Methods inherited from class org.goplanit.converter.CrsWriterImpl
createTransformedCoordinate, extractSrsName, getDestinationCoordinateReferenceSystem, getDestinationCrsTransformer, getGeoUtils, getTransformedCoordinates, prepareCoordinateReferenceSystem
-
Methods inherited from class org.goplanit.converter.BaseWriterImpl
getComponentIdMappers, getIdMapperType, setIdMapperType, setParentIdMappers
-
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.ConverterWriter
getIdMapperType, setIdMapperType
-
Methods inherited from interface org.goplanit.converter.network.NetworkWriter
getTypeDescription
-
-
-
-
Constructor Detail
-
GeometryNetworkWriter
protected GeometryNetworkWriter()
Constructor
-
GeometryNetworkWriter
protected GeometryNetworkWriter(String networkPath)
Constructor- Parameters:
networkPath
- to persist network on
-
GeometryNetworkWriter
protected GeometryNetworkWriter(String networkPath, String countryName)
Constructor- Parameters:
networkPath
- to persist network oncountryName
- to optimise projection for (if available, otherwise ignore)
-
GeometryNetworkWriter
protected GeometryNetworkWriter(GeometryNetworkWriterSettings networkSettings)
Constructor- Parameters:
networkSettings
- to use
-
-
Method Detail
-
writeLayers
protected void writeLayers(MacroscopicNetwork macroscopicNetwork)
Write layers of the network- Parameters:
macroscopicNetwork
- to write layers for
-
write
public void write(LayeredNetwork<?,?> network)
write a network to the writer's output format.- Specified by:
write
in interfaceConverterWriter<LayeredNetwork<?,?>>
- Parameters:
network
- entity to write
-
reset
public void reset()
reset the reader to allow for marking unnecessary resources for garbage collection- Specified by:
reset
in interfaceConverterEntity
- Overrides:
reset
in classGeometryIoWriter<LayeredNetwork<?,?>>
-
getSettings
public GeometryNetworkWriterSettings getSettings()
any settings to configure the writer can be configured by collecting these settings- Specified by:
getSettings
in interfaceConverterWriter<LayeredNetwork<?,?>>
- Overrides:
getSettings
in classGeometryIoWriter<LayeredNetwork<?,?>>
- Returns:
- the settings to configure the writer
-
getPrimaryIdMapper
public NetworkIdMapper getPrimaryIdMapper()
The (main) Id mapper used by this writer (only present after write has been completed)- Specified by:
getPrimaryIdMapper
in classBaseWriterImpl<LayeredNetwork<?,?>>
- Returns:
- mapper
-
-