Class GeometryRoutedServicesWriter
- java.lang.Object
-
- org.goplanit.converter.BaseWriterImpl<T>
-
- org.goplanit.converter.CrsWriterImpl<T>
-
- org.goplanit.geoio.converter.GeometryIoWriter<RoutedServices>
-
- org.goplanit.geoio.converter.service.GeometryRoutedServicesWriter
-
- All Implemented Interfaces:
ConverterEntity
,ConverterWriter<RoutedServices>
,RoutedServicesWriter
public class GeometryRoutedServicesWriter extends GeometryIoWriter<RoutedServices> implements RoutedServicesWriter
Writer to persist PLANit routed services to disk in GIS based format(s) such as shape files.- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.converter.BaseWriterImpl
idMapper
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GeometryRoutedServicesWriter()
Default constructorprotected
GeometryRoutedServicesWriter(String outputPath)
Constructorprotected
GeometryRoutedServicesWriter(String outputPath, String countryName)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <TT extends ManagedId>
org.geotools.data.DataStorefindDataStore(PlanitEntityFeatureTypeContext<TT> featureContext, Mode mode, Path fullOutputPath)
Find data store to use, if not present, create it if possibleRoutedServicesIdMapper
getPrimaryIdMapper()
The (main) Id mapper used by this writer (only present after write has been completed)GeometryRoutedServicesWriterSettings
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(RoutedServices routedServices)
write a network to the writer's output format.protected void
writeLayers(RoutedServices routedServices)
Write layers of the routed servicesprotected void
writeRoutedServicesLayerServices(RoutedServicesLayer layer, Mode layerMode, org.opengis.feature.simple.SimpleFeatureType featureType, PlanitRoutedServiceFeatureTypeContext featureDescription, String layerLogPrefix)
Writer the services of the layer mode combination-
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.RoutedServicesWriter
getTypeDescription
-
-
-
-
Constructor Detail
-
GeometryRoutedServicesWriter
protected GeometryRoutedServicesWriter()
Default constructor
-
GeometryRoutedServicesWriter
protected GeometryRoutedServicesWriter(String outputPath)
Constructor- Parameters:
outputPath
- to persist in
-
-
Method Detail
-
findDataStore
protected <TT extends ManagedId> org.geotools.data.DataStore findDataStore(PlanitEntityFeatureTypeContext<TT> featureContext, Mode mode, Path fullOutputPath)
Find data store to use, if not present, create it if possible- Type Parameters:
TT
- type of PLANit entity the data store is to be used for- Parameters:
featureContext
- to create data store for and register on GeoIODataStoreManagermode
- mode specific version of the same data store feature (but in different location for entries of that mode)fullOutputPath
- on where to store results- Returns:
- dataStore to use
-
writeRoutedServicesLayerServices
protected void writeRoutedServicesLayerServices(RoutedServicesLayer layer, Mode layerMode, org.opengis.feature.simple.SimpleFeatureType featureType, PlanitRoutedServiceFeatureTypeContext featureDescription, String layerLogPrefix)
Writer the services of the layer mode combination- Parameters:
layer
- to persist services forlayerMode
- to persist services forfeatureType
- to usefeatureDescription
- the context to convert instances to featureslayerLogPrefix
- to use
-
writeLayers
protected void writeLayers(RoutedServices routedServices)
Write layers of the routed services- Parameters:
routedServices
- to write layers for
-
getPrimaryIdMapper
public RoutedServicesIdMapper getPrimaryIdMapper()
The (main) Id mapper used by this writer (only present after write has been completed)- Specified by:
getPrimaryIdMapper
in classBaseWriterImpl<RoutedServices>
- Returns:
- mapper
-
write
public void write(RoutedServices routedServices)
write a network to the writer's output format.- Specified by:
write
in interfaceConverterWriter<RoutedServices>
- Parameters:
routedServices
- 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<RoutedServices>
-
getSettings
public GeometryRoutedServicesWriterSettings getSettings()
any settings to configure the writer can be configured by collecting these settings- Specified by:
getSettings
in interfaceConverterWriter<RoutedServices>
- Overrides:
getSettings
in classGeometryIoWriter<RoutedServices>
- Returns:
- the settings to configure the writer
-
-