Class GeometryServiceNetworkWriter
- java.lang.Object
-
- org.goplanit.converter.BaseWriterImpl<T>
-
- org.goplanit.converter.CrsWriterImpl<T>
-
- org.goplanit.geoio.converter.GeometryIoWriter<ServiceNetwork>
-
- org.goplanit.geoio.converter.service.GeometryServiceNetworkWriter
-
- All Implemented Interfaces:
ConverterEntity
,ConverterWriter<ServiceNetwork>
,ServiceNetworkWriter
public class GeometryServiceNetworkWriter extends GeometryIoWriter<ServiceNetwork> implements ServiceNetworkWriter
Writer to persist a PLANit service 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
GeometryServiceNetworkWriter()
Constructorprotected
GeometryServiceNetworkWriter(String networkPath)
Constructorprotected
GeometryServiceNetworkWriter(String serviceNetworkPath, String countryName)
Constructorprotected
GeometryServiceNetworkWriter(GeometryServiceNetworkWriterSettings serviceNetworkSettings)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceNetworkIdMapper
getPrimaryIdMapper()
The (main) Id mapper used by this writer (only present after write has been completed)GeometryServiceNetworkWriterSettings
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(ServiceNetwork serviceNetwork)
write a network to the writer's output format.protected void
writeLayers(ServiceNetwork serviceNetwork)
Write layers of the service 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.service.ServiceNetworkWriter
getTypeDescription
-
-
-
-
Constructor Detail
-
GeometryServiceNetworkWriter
protected GeometryServiceNetworkWriter()
Constructor
-
GeometryServiceNetworkWriter
protected GeometryServiceNetworkWriter(String networkPath)
Constructor- Parameters:
networkPath
- to persist network on
-
GeometryServiceNetworkWriter
protected GeometryServiceNetworkWriter(String serviceNetworkPath, String countryName)
Constructor- Parameters:
serviceNetworkPath
- to persist service network oncountryName
- to optimise projection for (if available, otherwise ignore)
-
GeometryServiceNetworkWriter
protected GeometryServiceNetworkWriter(GeometryServiceNetworkWriterSettings serviceNetworkSettings)
Constructor- Parameters:
serviceNetworkSettings
- to use
-
-
Method Detail
-
writeLayers
protected void writeLayers(ServiceNetwork serviceNetwork)
Write layers of the service network- Parameters:
serviceNetwork
- to write layers for
-
write
public void write(ServiceNetwork serviceNetwork)
write a network to the writer's output format.- Specified by:
write
in interfaceConverterWriter<ServiceNetwork>
- Parameters:
serviceNetwork
- 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<ServiceNetwork>
-
getSettings
public GeometryServiceNetworkWriterSettings getSettings()
any settings to configure the writer can be configured by collecting these settings- Specified by:
getSettings
in interfaceConverterWriter<ServiceNetwork>
- Overrides:
getSettings
in classGeometryIoWriter<ServiceNetwork>
- Returns:
- the settings to configure the writer
-
getPrimaryIdMapper
public ServiceNetworkIdMapper getPrimaryIdMapper()
The (main) Id mapper used by this writer (only present after write has been completed)- Specified by:
getPrimaryIdMapper
in classBaseWriterImpl<ServiceNetwork>
- Returns:
- mapper
-
-