Package fr.ign.artiscales.pm.workflow
Class Densification
java.lang.Object
fr.ign.artiscales.pm.workflow.Workflow
fr.ign.artiscales.pm.workflow.Densification
Simulation following that workflow divides parcels to ensure that they could be densified. The
FlagDivision.doFlagDivision(SimpleFeature, SimpleFeatureCollection, SimpleFeatureCollection, double, double, double, double, double, List, Geometry) method is applied on the selected
parcels. If the creation of a flag parcel is impossible and the local rules allows parcel to be disconnected from the road network, the
OBBDivision.splitParcels(SimpleFeature, double, double, double, double, List, double, boolean, int) is applied. Other behavior can be set relatively to the
parcel's sizes.-
Field Summary
Fields inherited from class fr.ign.artiscales.pm.workflow.Workflow
OVERWRITEGEOPACKAGE, PROCESS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.geotools.data.simple.SimpleFeatureCollectiondensification(org.geotools.data.simple.SimpleFeatureCollection parcelCollection, org.geotools.data.simple.SimpleFeatureCollection blockCollection, File outFolder, File buildingFile, double harmonyCoeff, double irregularityCoeff, double maximalAreaSplitParcel, double minimalAreaSplitParcel, double minimalWidthContactRoad, double lenDriveway, boolean allowIsolatedParcel)Apply the densification workflow on a set of marked parcels.org.geotools.data.simple.SimpleFeatureCollectiondensification(org.geotools.data.simple.SimpleFeatureCollection parcelCollection, org.geotools.data.simple.SimpleFeatureCollection blockCollection, File outFolder, File buildingFile, File roadFile, double harmonyCoeff, double irregularityCoeff, double maximalAreaSplitParcel, double minimalAreaSplitParcel, double minimalWidthContactRoad, double lenDriveway, boolean allowIsolatedParcel)Apply the densification workflow on a set of marked parcels.org.geotools.data.simple.SimpleFeatureCollectiondensification(org.geotools.data.simple.SimpleFeatureCollection parcelCollection, org.geotools.data.simple.SimpleFeatureCollection blockCollection, File outFolder, File buildingFile, File roadFile, double harmonyCoeff, double irregularityCoeff, double maximalArea, double minimalArea, double minContactWithRoad, double lenDriveway, boolean allowIsolatedParcel, org.locationtech.jts.geom.Geometry exclusionZone)Apply the densification workflow on a set of marked parcels.org.geotools.data.simple.SimpleFeatureCollectiondensification(org.geotools.data.simple.SimpleFeatureCollection parcelCollection, org.geotools.data.simple.SimpleFeatureCollection blockCollection, File outFolder, File buildingFile, File roadFile, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean allowIsolatedParcel)Apply the densification workflow on a set of marked parcels.org.geotools.data.simple.SimpleFeatureCollectiondensification(org.geotools.data.simple.SimpleFeatureCollection parcelCollection, org.geotools.data.simple.SimpleFeatureCollection blockCollection, File outFolder, File buildingFile, File roadFile, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean allowIsolatedParcel, org.locationtech.jts.geom.Geometry exclusionZone)Apply the densification workflow on a set of marked parcels.org.geotools.data.simple.SimpleFeatureCollectiondensificationOrNeighborhood(org.geotools.data.simple.SimpleFeatureCollection parcelCollection, org.geotools.data.simple.SimpleFeatureCollection blockCollection, File outFolder, File buildingFile, File roadFile, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean allowIsolatedParcel, org.locationtech.jts.geom.Geometry exclusionZone, int factorOflargeZoneCreation)Apply a hybrid densification process on the coming parcel collection.booleanisNewSection(org.opengis.feature.simple.SimpleFeature feat)Check if the inputSimpleFeaturehas a section field that has been simulated with this present workflow.makeNewSection(String section)Create a new section name following a precise rule.Methods inherited from class fr.ign.artiscales.pm.workflow.Workflow
checkFields, isDEBUG, isSAVEINTERMEDIATERESULT, setDEBUG, setSAVEINTERMEDIATERESULT
-
Constructor Details
-
Densification
public Densification()
-
-
Method Details
-
densification
public org.geotools.data.simple.SimpleFeatureCollection densification(org.geotools.data.simple.SimpleFeatureCollection parcelCollection, org.geotools.data.simple.SimpleFeatureCollection blockCollection, File outFolder, File buildingFile, File roadFile, double harmonyCoeff, double irregularityCoeff, double maximalArea, double minimalArea, double minContactWithRoad, double lenDriveway, boolean allowIsolatedParcel, org.locationtech.jts.geom.Geometry exclusionZone) throws IOExceptionApply the densification workflow on a set of marked parcels. TODO improvements: if a densification is impossible (mainly for building constructed on the both cut parcel reason), reiterate the flag cut division with irregularityCoeff. The cut may work better !- Parameters:
parcelCollection-SimpleFeatureCollectionof marked parcels.blockCollection-SimpleFeatureCollectioncontaining the morphological block. Can be generated with theCityGeneration.createUrbanBlock(SimpleFeatureCollection)method.outFolder- Folder to store result filesbuildingFile- Geopackage representing the buildingsroadFile- Geopackage representing the roads. If road not needed, use the overloaded method.maximalArea- threshold of parcel area above which the OBB algorithm stops to decompose parcelsminimalArea- threshold under which the parcels is not kept. If parcel simulated is under this workflow will keep the unsimulated parcel.minContactWithRoad- threshold of parcel connection to road under which the OBB algorithm stops to decompose parcelslenDriveway- lenght of the driveway to connect a parcel through another parcel to the roadallowIsolatedParcel- true if the simulated parcels have the right to be isolated from the road, false otherwise.exclusionZone- Exclude a zone that won't be considered as a potential road connection. Useful to represent border of the parcel plan. Can be null.- Returns:
- The input
SimpleFeatureCollectionwith each marked parcel replaced by simulated parcels. - Throws:
IOException- Reading and writing geo files
-
densification
public org.geotools.data.simple.SimpleFeatureCollection densification(org.geotools.data.simple.SimpleFeatureCollection parcelCollection, org.geotools.data.simple.SimpleFeatureCollection blockCollection, File outFolder, File buildingFile, File roadFile, double harmonyCoeff, double irregularityCoeff, double maximalAreaSplitParcel, double minimalAreaSplitParcel, double minimalWidthContactRoad, double lenDriveway, boolean allowIsolatedParcel) throws IOExceptionApply the densification workflow on a set of marked parcels.overload of the
densification(SimpleFeatureCollection, SimpleFeatureCollection, File, File, File, double, double, double, double, double, double, boolean, Geometry)method if we choose to not use a geometry of exclusion- Parameters:
parcelCollection- SimpleFeatureCollection of marked parcels.blockCollection- SimpleFeatureCollection containing the morphological block. Can be generated with theCityGeneration.createUrbanBlock(SimpleFeatureCollection)method.outFolder- folder to store created filesbuildingFile- Geopackage representing the buildingsroadFile- Geopackage representing the roadsmaximalAreaSplitParcel- threshold of parcel area above which the OBB algorithm stops to decompose parcelsminimalAreaSplitParcel- threshold under which the parcels is not kept. If parcel simulated is under this workflow will keep the unsimulated parcel.minimalWidthContactRoad- threshold of parcel contact to road under which the OBB algorithm stops to decompose parcelslenDriveway- length of the driveway to connect a parcel through another parcel to the roadallowIsolatedParcel- true if the simulated parcels have the right to be isolated from the road, false otherwise.- Returns:
- The input
SimpleFeatureCollectionwith each marked parcel replaced by simulated parcels. - Throws:
IOException- Reading and writing geo files
-
densification
public org.geotools.data.simple.SimpleFeatureCollection densification(org.geotools.data.simple.SimpleFeatureCollection parcelCollection, org.geotools.data.simple.SimpleFeatureCollection blockCollection, File outFolder, File buildingFile, double harmonyCoeff, double irregularityCoeff, double maximalAreaSplitParcel, double minimalAreaSplitParcel, double minimalWidthContactRoad, double lenDriveway, boolean allowIsolatedParcel) throws IOExceptionApply the densification workflow on a set of marked parcels. Overload of thedensification(SimpleFeatureCollection, SimpleFeatureCollection, File, File, File, double, double, double, double, double, double, boolean, Geometry)method if we choose to not use roads- Parameters:
parcelCollection- SimpleFeatureCollection of marked parcels.blockCollection- SimpleFeatureCollection containing the morphological block. Can be generated with theCityGeneration.createUrbanBlock(SimpleFeatureCollection)method.outFolder- folder to store created filesbuildingFile- Geopackage representing the buildingsmaximalAreaSplitParcel- threshold of parcel area above which the OBB algorithm stops to decompose parcelsminimalAreaSplitParcel- threshold under which the parcels is not kept. If parcel simulated is under this workflow will keep the unsimulated parcel.minimalWidthContactRoad- threshold of parcel connection to road under which the OBB algorithm stops to decompose parcelslenDriveway- lenght of the driveway to connect a parcel through another parcel to the roadallowIsolatedParcel- true if the simulated parcels have the right to be isolated from the road, false otherwise.- Returns:
- The input
SimpleFeatureCollectionwith each marked parcel replaced by simulated parcels. - Throws:
IOException- Reading and writing geo files
-
densification
public org.geotools.data.simple.SimpleFeatureCollection densification(org.geotools.data.simple.SimpleFeatureCollection parcelCollection, org.geotools.data.simple.SimpleFeatureCollection blockCollection, File outFolder, File buildingFile, File roadFile, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean allowIsolatedParcel) throws IOExceptionApply the densification workflow on a set of marked parcels. Overloaddensification(SimpleFeatureCollection, SimpleFeatureCollection, File, File, File, ProfileUrbanFabric, boolean, Geometry)method with a profile urban fabric (which automatically report its parameters to the fields) and no exclusion geometry.- Parameters:
parcelCollection- SimpleFeatureCollection of marked parcels.blockCollection- SimpleFeatureCollection containing the morphological block. Can be generated with theCityGeneration.createUrbanBlock(SimpleFeatureCollection)method.outFolder- folder to store result files.buildingFile- Geopackage representing the buildings.roadFile- Geopackage representing the roads (optional).profile- Description of the urban fabric profile planed to be simulated on this zone.allowIsolatedParcel- true if the simulated parcels have the right to be isolated from the road, false otherwise.- Returns:
- The input
SimpleFeatureCollectionwith each marked parcel replaced by simulated parcels. - Throws:
IOException- Writing files in debug modes
-
densification
public org.geotools.data.simple.SimpleFeatureCollection densification(org.geotools.data.simple.SimpleFeatureCollection parcelCollection, org.geotools.data.simple.SimpleFeatureCollection blockCollection, File outFolder, File buildingFile, File roadFile, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean allowIsolatedParcel, org.locationtech.jts.geom.Geometry exclusionZone) throws IOExceptionApply the densification workflow on a set of marked parcels. Overloaddensification(SimpleFeatureCollection, SimpleFeatureCollection, File, File, File, double, double, double, double, double, double, boolean, Geometry)method with a profile urban fabric input (which automatically report its parameters to the fields)- Parameters:
parcelCollection- SimpleFeatureCollection of marked parcels.blockCollection- SimpleFeatureCollection containing the morphological block. Can be generated with theCityGeneration.createUrbanBlock(SimpleFeatureCollection)method.outFolder- folder to store result files.buildingFile- Geopackage representing the buildings.roadFile- Geopackage representing the roads (optional).profile- Description of the urban fabric profile planed to be simulated on this zone.allowIsolatedParcel- true if the simulated parcels have the right to be isolated from the road, false otherwise.exclusionZone- Exclude a zone that won't be considered as a potential road connection. Useful to represent border of the parcel plan. Can be null.- Returns:
- The input
SimpleFeatureCollectionwith each marked parcel replaced by simulated parcels. - Throws:
IOException- Writing files in debug modes
-
densificationOrNeighborhood
public org.geotools.data.simple.SimpleFeatureCollection densificationOrNeighborhood(org.geotools.data.simple.SimpleFeatureCollection parcelCollection, org.geotools.data.simple.SimpleFeatureCollection blockCollection, File outFolder, File buildingFile, File roadFile, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean allowIsolatedParcel, org.locationtech.jts.geom.Geometry exclusionZone, int factorOflargeZoneCreation) throws IOExceptionApply a hybrid densification process on the coming parcel collection. The parcels that size are inferior to 4x the maximal area of parcel type to create are runned with the densication workflow. The parcels that size are superior to 4x the maximal area are considered as able to build neighborhood. They are divided with theConsolidationDivision.consolidationDivision(SimpleFeatureCollection, File, File, ProfileUrbanFabric)method.- Parameters:
parcelCollection- SimpleFeatureCollection of marked parcels.blockCollection- SimpleFeatureCollection containing the morphological block. Can be generated with theCityGeneration.createUrbanBlock(SimpleFeatureCollection)method.outFolder- folder to store result files.buildingFile- Geopackage representing the buildings.roadFile- Geopackage representing the roads (optional).profile- ProfileUrbanFabric of the simulated urban scene.allowIsolatedParcel- true if the simulated parcels have the right to be isolated from the road, false otherwise.exclusionZone- Exclude a zone that won't be considered as a potential road connection. Useful to represent border of the parcel plan. Can be null.factorOflargeZoneCreation- If the area of the parcel to be simulated is superior to the maximal size of parcels multiplied by this factor, the simulation will be done with theConsolidationDivision.consolidationDivision(SimpleFeatureCollection, File, File, ProfileUrbanFabric)method.- Returns:
- The input
SimpleFeatureCollectionwith each marked parcel replaced by simulated parcels. - Throws:
IOException- Writing files in debug modes
-
makeNewSection
Create a new section name following a precise rule.- Specified by:
makeNewSectionin classWorkflow- Parameters:
section- name of the former section- Returns:
- the new section's name
-
isNewSection
public boolean isNewSection(org.opengis.feature.simple.SimpleFeature feat)Check if the inputSimpleFeaturehas a section field that has been simulated with this present workflow.- Specified by:
isNewSectionin classWorkflow- Parameters:
feat-SimpleFeatureto test.- Returns:
- true if the section field is marked with the
makeNewSection(String)method.
-