Class Densification

java.lang.Object
fr.ign.artiscales.pm.workflow.Workflow
fr.ign.artiscales.pm.workflow.Densification

public class Densification extends Workflow
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
    Apply the densification workflow on a set of marked parcels.
    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)
    Apply the densification workflow on a set of marked parcels.
    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)
    Apply the densification workflow on a set of marked parcels.
    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)
    Apply the densification workflow on a set of marked parcels.
    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)
    Apply the densification workflow on a set of marked parcels.
    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)
    Apply a hybrid densification process on the coming parcel collection.
    boolean
    isNewSection​(org.opengis.feature.simple.SimpleFeature feat)
    Check if the input SimpleFeature has 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 IOException
      Apply 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 - SimpleFeatureCollection of marked parcels.
      blockCollection - SimpleFeatureCollection containing the morphological block. Can be generated with the CityGeneration.createUrbanBlock(SimpleFeatureCollection) method.
      outFolder - Folder to store result files
      buildingFile - Geopackage representing the buildings
      roadFile - 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 parcels
      minimalArea - 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 parcels
      lenDriveway - lenght of the driveway to connect a parcel through another parcel to the road
      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 SimpleFeatureCollection with 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 IOException
      Apply 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 the CityGeneration.createUrbanBlock(SimpleFeatureCollection) method.
      outFolder - folder to store created files
      buildingFile - Geopackage representing the buildings
      roadFile - Geopackage representing the roads
      maximalAreaSplitParcel - threshold of parcel area above which the OBB algorithm stops to decompose parcels
      minimalAreaSplitParcel - 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 parcels
      lenDriveway - length of the driveway to connect a parcel through another parcel to the road
      allowIsolatedParcel - true if the simulated parcels have the right to be isolated from the road, false otherwise.
      Returns:
      The input SimpleFeatureCollection with 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 IOException
      Apply 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 roads
      Parameters:
      parcelCollection - SimpleFeatureCollection of marked parcels.
      blockCollection - SimpleFeatureCollection containing the morphological block. Can be generated with the CityGeneration.createUrbanBlock(SimpleFeatureCollection) method.
      outFolder - folder to store created files
      buildingFile - Geopackage representing the buildings
      maximalAreaSplitParcel - threshold of parcel area above which the OBB algorithm stops to decompose parcels
      minimalAreaSplitParcel - 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 parcels
      lenDriveway - lenght of the driveway to connect a parcel through another parcel to the road
      allowIsolatedParcel - true if the simulated parcels have the right to be isolated from the road, false otherwise.
      Returns:
      The input SimpleFeatureCollection with 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 IOException
      Apply the densification workflow on a set of marked parcels. Overload densification(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 the CityGeneration.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 SimpleFeatureCollection with 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 IOException
      Apply the densification workflow on a set of marked parcels. Overload densification(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 the CityGeneration.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 SimpleFeatureCollection with 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 IOException
      Apply 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 the ConsolidationDivision.consolidationDivision(SimpleFeatureCollection, File, File, ProfileUrbanFabric) method.
      Parameters:
      parcelCollection - SimpleFeatureCollection of marked parcels.
      blockCollection - SimpleFeatureCollection containing the morphological block. Can be generated with the CityGeneration.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 the ConsolidationDivision.consolidationDivision(SimpleFeatureCollection, File, File, ProfileUrbanFabric) method.
      Returns:
      The input SimpleFeatureCollection with each marked parcel replaced by simulated parcels.
      Throws:
      IOException - Writing files in debug modes
    • makeNewSection

      public String makeNewSection(String section)
      Create a new section name following a precise rule.
      Specified by:
      makeNewSection in class Workflow
      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 input SimpleFeature has a section field that has been simulated with this present workflow.
      Specified by:
      isNewSection in class Workflow
      Parameters:
      feat - SimpleFeature to test.
      Returns:
      true if the section field is marked with the makeNewSection(String) method.