Class FlagDivision

java.lang.Object
fr.ign.artiscales.pm.division.Division
fr.ign.artiscales.pm.division.FlagDivision

public class FlagDivision extends Division
Re-implementation of block decomposition into parcels with flag shape. The algorithm is an adaptation from :

Vanegas, C. A., Kelly, T., Weber, B., Halatsch, J., Aliaga, D. G., Müller, P., May 2012. Procedural generation of parcels in urban modeling. Comp. Graph. Forum 31 (2pt3).

As input a polygon that represents the zone to decompose. For each step the decomposition is processed according to the OBBBlockDecomposition algorithm If one of the parcels do not have access to the road, a L parcel is created. A road is added on the other parcel according to 1/ the shortest path to the public road 2/ if this shortest path does not intersect an existing building. The width of the road is parametrable in the attributes : roadWidth

It is a recursive method, the decomposition is stop when a stop criteria is reached either the area or roadwidthaccess is below a given threshold

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static double
    We remove silver parts that may have a too small area inferior to 25
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.geotools.data.simple.SimpleFeatureCollection
    doFlagDivision​(org.geotools.data.simple.SimpleFeatureCollection inputCollection, File buildingFile, File roadFile, double harmony, double irregularityCoeff, double maximalArea, double minimalWidthContactRoad, double drivewayWidth, org.geotools.data.simple.SimpleFeatureCollection block, org.locationtech.jts.geom.Geometry exclusionZone)
    Main way to access to the flag parcel split algorithm for a collection.
    static org.geotools.data.simple.SimpleFeatureCollection
    doFlagDivision​(org.geotools.data.simple.SimpleFeatureCollection inputCollection, File buildingFile, File roadFile, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile)
    Main way to access to the flag parcel split algorithm for a collection.
    static org.geotools.data.simple.SimpleFeatureCollection
    doFlagDivision​(org.geotools.data.simple.SimpleFeatureCollection inputCollection, File buildingFile, File roadFile, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, org.geotools.data.simple.SimpleFeatureCollection block, org.locationtech.jts.geom.Geometry exclusionZone)
    Main way to access to the flag parcel split algorithm for a collection.
    static org.geotools.data.simple.SimpleFeatureCollection
    doFlagDivision​(org.opengis.feature.simple.SimpleFeature sf, org.geotools.data.simple.SimpleFeatureCollection road, org.geotools.data.simple.SimpleFeatureCollection building, double harmony, double irregularityCoeff, double maximalArea, double minimalWidthContactRoad, double drivewayWidth, List<org.locationtech.jts.geom.LineString> extLines, org.locationtech.jts.geom.Geometry exclusionZone)
    Flag split a single parcel.

    Methods inherited from class fr.ign.artiscales.pm.division.Division

    isDEBUG, setDEBUG

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TOO_SMALL_PARCEL_AREA

      public static double TOO_SMALL_PARCEL_AREA
      We remove silver parts that may have a too small area inferior to 25
  • Constructor Details

    • FlagDivision

      public FlagDivision()
  • Method Details

    • doFlagDivision

      public static org.geotools.data.simple.SimpleFeatureCollection doFlagDivision(org.geotools.data.simple.SimpleFeatureCollection inputCollection, File buildingFile, File roadFile, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile) throws IOException
      Main way to access to the flag parcel split algorithm for a collection. Parcels must be marked in order to be simulated.
      Parameters:
      inputCollection - feature to decompose
      buildingFile - building that could stop the creation of a driveway
      roadFile - complementary roads (as line and not as parcel void)
      profile - Description of the urban fabric profile planed to be simulated on this zone.
      Returns:
      collection of cut parcels
      Throws:
      IOException - reading buildingFile
    • doFlagDivision

      public static org.geotools.data.simple.SimpleFeatureCollection doFlagDivision(org.geotools.data.simple.SimpleFeatureCollection inputCollection, File buildingFile, File roadFile, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, org.geotools.data.simple.SimpleFeatureCollection block, org.locationtech.jts.geom.Geometry exclusionZone) throws IOException
      Main way to access to the flag parcel split algorithm for a collection. Parcels must be marked in order to be simulated.
      Parameters:
      inputCollection - feature to decompose
      buildingFile - building that could stop the creation of a driveway
      roadFile - complementary roads (as line and not as parcel void)
      profile - Description of the urban fabric profile planed to be simulated on this zone.
      block - SimpleFeatureCollection containing the morphological block. Can be generated with the CityGeneration.createUrbanBlock(SimpleFeatureCollection) method.
      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:
      collection of cut parcels
      Throws:
      IOException - reading buildingFile
    • doFlagDivision

      public static org.geotools.data.simple.SimpleFeatureCollection doFlagDivision(org.geotools.data.simple.SimpleFeatureCollection inputCollection, File buildingFile, File roadFile, double harmony, double irregularityCoeff, double maximalArea, double minimalWidthContactRoad, double drivewayWidth, org.geotools.data.simple.SimpleFeatureCollection block, org.locationtech.jts.geom.Geometry exclusionZone) throws IOException
      Main way to access to the flag parcel split algorithm for a collection. Parcels must be marked in order to be simulated.
      Parameters:
      inputCollection - feature to decompose
      buildingFile - building that could stop the creation of a driveway
      roadFile - complementary roads (as line and not as parcel void)
      harmony - OBB algorithm parameter to allow the rotation of the bounding box if the ratio between the box's length and width is higher to this coefficient. Must be between 0 and 1.
      irregularityCoeff - irregularity into parcel division
      maximalArea - threshold of parcel area above which the OBB algorithm stops to decompose parcels*
      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.
      block - SimpleFeatureCollection containing the morphological block. Can be generated with the CityGeneration.createUrbanBlock(SimpleFeatureCollection) method.
      drivewayWidth - Width of the driveway to connect a parcel through another parcel to the road
      minimalWidthContactRoad - Width of the contact between parcel and road under which the parcel won't be cut anymore
      Returns:
      collection of cut parcels
      Throws:
      IOException - reading buildingFile
    • doFlagDivision

      public static org.geotools.data.simple.SimpleFeatureCollection doFlagDivision(org.opengis.feature.simple.SimpleFeature sf, org.geotools.data.simple.SimpleFeatureCollection road, org.geotools.data.simple.SimpleFeatureCollection building, double harmony, double irregularityCoeff, double maximalArea, double minimalWidthContactRoad, double drivewayWidth, List<org.locationtech.jts.geom.LineString> extLines, org.locationtech.jts.geom.Geometry exclusionZone)
      Flag split a single parcel. Main way to access to the flag parcel split algorithm. Add a field SIMULATED with the 1 value if simulation has been done, 0 otherwise.
      Parameters:
      sf - input parcel to flag split
      building - buildings that could stop the creation of a driveway
      harmony - OBB algorithm parameter to allow the rotation of the bounding box if the ratio between the box's length and width is higher to this coefficient. Must be between 0 and 1.
      irregularityCoeff - irregularity into parcel division
      maximalArea - threshold of parcel area above which the OBB algorithm stops to decompose parcels
      road - complementary roads (as line and not as parcel void)
      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.
      extLines - Lines representing the morphological block.
      drivewayWidth - lenght of the driveway to connect a parcel through another parcel to the road
      minimalWidthContactRoad - Width of the contact between parcel and road under which the parcel won't be cut anymore
      Returns:
      the flag cut parcel if possible, the input parcel otherwise. Schema of the returned parcel is the same as input + a simulated field.