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 protectedGeometryServiceNetworkWriter()ConstructorprotectedGeometryServiceNetworkWriter(String networkPath)ConstructorprotectedGeometryServiceNetworkWriter(String serviceNetworkPath, String countryName)ConstructorprotectedGeometryServiceNetworkWriter(GeometryServiceNetworkWriterSettings serviceNetworkSettings)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceNetworkIdMappergetPrimaryIdMapper()The (main) Id mapper used by this writer (only present after write has been completed)GeometryServiceNetworkWriterSettingsgetSettings()any settings to configure the writer can be configured by collecting these settingsvoidreset()reset the reader to allow for marking unnecessary resources for garbage collectionvoidwrite(ServiceNetwork serviceNetwork)write a network to the writer's output format.protected voidwriteLayers(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:
writein 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:
resetin interfaceConverterEntity- Overrides:
resetin classGeometryIoWriter<ServiceNetwork>
-
getSettings
public GeometryServiceNetworkWriterSettings getSettings()
any settings to configure the writer can be configured by collecting these settings- Specified by:
getSettingsin interfaceConverterWriter<ServiceNetwork>- Overrides:
getSettingsin 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:
getPrimaryIdMapperin classBaseWriterImpl<ServiceNetwork>- Returns:
- mapper
-
-