Class GeometryZoningWriter
- java.lang.Object
-
- org.goplanit.converter.BaseWriterImpl<T>
-
- org.goplanit.converter.CrsWriterImpl<T>
-
- org.goplanit.geoio.converter.GeometryIoWriter<Zoning>
-
- org.goplanit.geoio.converter.zoning.GeometryZoningWriter
-
- All Implemented Interfaces:
ConverterEntity
,ConverterWriter<Zoning>
,ZoningWriter
public class GeometryZoningWriter extends GeometryIoWriter<Zoning> implements ZoningWriter
Writer to persist a PLANit zoning 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
GeometryZoningWriter()
Constructorprotected
GeometryZoningWriter(String outputPath)
Constructorprotected
GeometryZoningWriter(String outputPath, String countryName)
Constructorprotected
GeometryZoningWriter(GeometryZoningWriterSettings zoningSettings)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZoningIdMapper
getPrimaryIdMapper()
The (main) Id mapper used by this writer (only present after write has been completed)GeometryZoningWriterSettings
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(Zoning zoning)
write a network to the writer's output format.protected void
writeConnectoidEdges(VirtualNetwork virtualNetwork, org.opengis.feature.simple.SimpleFeatureType featureType, PlanitConnectoidEdgeFeatureTypeContext featureDescription)
Write connectoid edges of the zoningprotected void
writeConnectoidSegments(VirtualNetwork virtualNetwork, org.opengis.feature.simple.SimpleFeatureType featureType, PlanitConnectoidSegmentFeatureTypeContext featureDescription)
Write connectoid segments of the zoningprotected void
writeEntities(Zoning zoning)
Write the Zoning entities eligible for persistenceprotected void
writeOdConnectoids(Zoning zoning, org.opengis.feature.simple.SimpleFeatureType featureType, PlanitUndirectedConnectoidFeatureTypeContext featureDescription)
Write od connectoids of the zoningprotected void
writeTransferConnectoids(Zoning zoning, org.opengis.feature.simple.SimpleFeatureType featureType, PlanitDirectedConnectoidFeatureTypeContext featureDescription)
Write transfer connectoids of the zoningprotected void
writeVirtualNetwork(VirtualNetwork virtualNetwork)
Persist the virtual network's edges and edge segments connecting the zones and their respective connectoidsprotected <Z extends Zone>
voidwriteZones(Zones<Z> zones, Class<Z> zoneClazz, String zoneFileName)
Write zones container of the zoning-
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.zoning.ZoningWriter
getTypeDescription
-
-
-
-
Constructor Detail
-
GeometryZoningWriter
protected GeometryZoningWriter()
Constructor
-
GeometryZoningWriter
protected GeometryZoningWriter(String outputPath)
Constructor- Parameters:
outputPath
- to persist zoning on
-
GeometryZoningWriter
protected GeometryZoningWriter(String outputPath, String countryName)
Constructor- Parameters:
outputPath
- to persist service zoning oncountryName
- to optimise projection for (if available, otherwise ignore)
-
GeometryZoningWriter
protected GeometryZoningWriter(GeometryZoningWriterSettings zoningSettings)
Constructor- Parameters:
zoningSettings
- to use
-
-
Method Detail
-
writeZones
protected <Z extends Zone> void writeZones(Zones<Z> zones, Class<Z> zoneClazz, String zoneFileName)
Write zones container of the zoning- Type Parameters:
Z
- type of zone- Parameters:
zones
- to writezoneClazz
- these zones pertain tozoneFileName
- to use for persisting
-
writeTransferConnectoids
protected void writeTransferConnectoids(Zoning zoning, org.opengis.feature.simple.SimpleFeatureType featureType, PlanitDirectedConnectoidFeatureTypeContext featureDescription)
Write transfer connectoids of the zoning- Parameters:
zoning
- to write directed connectoids forfeatureType
- to usefeatureDescription
- to use
-
writeOdConnectoids
protected void writeOdConnectoids(Zoning zoning, org.opengis.feature.simple.SimpleFeatureType featureType, PlanitUndirectedConnectoidFeatureTypeContext featureDescription)
Write od connectoids of the zoning- Parameters:
zoning
- to write directed connectoids forfeatureType
- to usefeatureDescription
- to use
-
writeConnectoidEdges
protected void writeConnectoidEdges(VirtualNetwork virtualNetwork, org.opengis.feature.simple.SimpleFeatureType featureType, PlanitConnectoidEdgeFeatureTypeContext featureDescription)
Write connectoid edges of the zoning- Parameters:
virtualNetwork
- to write connectoid edges forfeatureType
- to usefeatureDescription
- to use
-
writeConnectoidSegments
protected void writeConnectoidSegments(VirtualNetwork virtualNetwork, org.opengis.feature.simple.SimpleFeatureType featureType, PlanitConnectoidSegmentFeatureTypeContext featureDescription)
Write connectoid segments of the zoning- Parameters:
virtualNetwork
- to write connectoid edges forfeatureType
- to usefeatureDescription
- to use
-
writeVirtualNetwork
protected void writeVirtualNetwork(VirtualNetwork virtualNetwork)
Persist the virtual network's edges and edge segments connecting the zones and their respective connectoids- Parameters:
virtualNetwork
- to persist
-
writeEntities
protected void writeEntities(Zoning zoning)
Write the Zoning entities eligible for persistence- Parameters:
zoning
- to persist
-
write
public void write(Zoning zoning)
write a network to the writer's output format.- Specified by:
write
in interfaceConverterWriter<Zoning>
- Parameters:
zoning
- 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<Zoning>
-
getSettings
public GeometryZoningWriterSettings getSettings()
any settings to configure the writer can be configured by collecting these settings- Specified by:
getSettings
in interfaceConverterWriter<Zoning>
- Overrides:
getSettings
in classGeometryIoWriter<Zoning>
- Returns:
- the settings to configure the writer
-
getPrimaryIdMapper
public ZoningIdMapper getPrimaryIdMapper()
The (main) Id mapper used by this writer (only present after write has been completed)- Specified by:
getPrimaryIdMapper
in classBaseWriterImpl<Zoning>
- Returns:
- mapper
-
-