Class ZoneDivision

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

public class ZoneDivision extends Workflow
This workflow operates on a zone rather than on parcels. Zones can either be taken from a zoning plan or from a ready-to-use zone collection (which can be made out of parcels). Creation and integration of zone could be made with the createZoneToCut(String, SimpleFeatureCollection, SimpleFeatureCollection) method. The parcel which are across the zone are cut and the parts that aren't contained into the zone are kept with their attributes. The chosen parcel division process (OBB by default) is then applied on the zone.
  • 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
    static org.geotools.data.simple.SimpleFeatureCollection
    createZoneToCut​(String genericZone, String preciseZone, org.geotools.data.simple.SimpleFeatureCollection inputSFC, org.geotools.data.simple.SimpleFeatureCollection boundingSFC)
    Create a zone to cut from a zoning plan by selecting features from a Geopackage regarding a fixed value.
    static org.geotools.data.simple.SimpleFeatureCollection
    createZoneToCut​(String genericZone, org.geotools.data.simple.SimpleFeatureCollection inputSFC, org.geotools.data.simple.SimpleFeatureCollection boundingSFC)
    Create a zone to cut from a zoning plan by selecting features from a Geopackage regarding a fixed value.
    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 numZone)
    Create a new section name following a precise rule.
    org.geotools.data.simple.SimpleFeatureCollection
    zoneDivision​(File zoneFile, File parcelFile, File outFolder, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, File roadFile, File buildingFile)
    Method to use from fresh Geopackages.
    org.geotools.data.simple.SimpleFeatureCollection
    zoneDivision​(File zoneFile, org.geotools.data.simple.SimpleFeatureCollection parcelSFC, File roadFile, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean keepExistingRoad, File outFolder)
     
    org.geotools.data.simple.SimpleFeatureCollection
    zoneDivision​(org.geotools.data.simple.SimpleFeatureCollection initialZone, org.geotools.data.simple.SimpleFeatureCollection parcels, File outFolder, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean keepExistingRoads)
    Merge and re-cut a specific zone.
    org.geotools.data.simple.SimpleFeatureCollection
    zoneDivision​(org.geotools.data.simple.SimpleFeatureCollection initialZone, org.geotools.data.simple.SimpleFeatureCollection parcels, File outFolder, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, File roadFile, File buildingFile, boolean keepExistingRoads)
    Merge and re-cut a specific zone.
    org.geotools.data.simple.SimpleFeatureCollection
    zoneDivision​(org.geotools.data.simple.SimpleFeatureCollection initialZone, org.geotools.data.simple.SimpleFeatureCollection parcels, org.geotools.data.simple.SimpleFeatureCollection roads, File outFolder, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean keepExistingRoads)
    Merge and recut a specific zone.
    org.geotools.data.simple.SimpleFeatureCollection
    zoneDivision​(org.geotools.data.simple.SimpleFeatureCollection initialZone, org.geotools.data.simple.SimpleFeatureCollection parcels, org.geotools.data.simple.SimpleFeatureCollection roads, org.geotools.data.simple.SimpleFeatureCollection buildings, File outFolder, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean keepExistingRoads, List<org.locationtech.jts.geom.LineString> extLines, org.locationtech.jts.geom.Geometry exclusionZone)
    Merge and recut a specific zone.

    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

    • ZoneDivision

      public ZoneDivision()
  • Method Details

    • createZoneToCut

      public static org.geotools.data.simple.SimpleFeatureCollection createZoneToCut(String genericZone, org.geotools.data.simple.SimpleFeatureCollection inputSFC, org.geotools.data.simple.SimpleFeatureCollection boundingSFC)
      Create a zone to cut from a zoning plan by selecting features from a Geopackage regarding a fixed value. Name of the field is by default set to TYPEZONE and must be changed if needed with the GeneralFields.setZoneGenericNameField(String) method. Name of a Generic Zone is provided and can be null. If null, inputSFC is usually directly a ready-to-use zone and all given zone are marked. Also takes a bounding SimpleFeatureCollection to bound the output.
      Parameters:
      genericZone - Name of the generic zone to be cut
      inputSFC - Geopackage of zones to extract the wanted zone from (usually a zoning plan)
      boundingSFC - SimpleFeatureCollection to bound the process on a wanted location
      Returns:
      An extraction of the zoning collection
    • createZoneToCut

      public static org.geotools.data.simple.SimpleFeatureCollection createZoneToCut(String genericZone, String preciseZone, org.geotools.data.simple.SimpleFeatureCollection inputSFC, org.geotools.data.simple.SimpleFeatureCollection boundingSFC)
      Create a zone to cut from a zoning plan by selecting features from a Geopackage regarding a fixed value. Name of the field is by default set to TYPEZONE and must be changed if needed with the GeneralFields.setZoneGenericNameField(String) method. Name of a generic zone and a precise Zone can be provided and can be null. If null, inputSFC is usually directly a ready-to-use zone and all given zone are marked. Also takes a bounding SimpleFeatureCollection to bound the output.
      Parameters:
      genericZone - Name of the generic zone to be cut
      preciseZone - Name of the precise zone to be cut. Can be null
      inputSFC - Geopackage of zones to extract the wanted zone from (usually a zoning plan)
      boundingSFC - SimpleFeatureCollection to bound the process on a wanted location
      Returns:
      An extraction of the zoning collection
    • zoneDivision

      public org.geotools.data.simple.SimpleFeatureCollection zoneDivision(File zoneFile, org.geotools.data.simple.SimpleFeatureCollection parcelSFC, File roadFile, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean keepExistingRoad, File outFolder) throws IOException
      Throws:
      IOException
    • zoneDivision

      public org.geotools.data.simple.SimpleFeatureCollection zoneDivision(File zoneFile, File parcelFile, File outFolder, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, File roadFile, File buildingFile) throws IOException
      Method to use from fresh Geopackages. Mainly used by OpenMole tasks.
      Parameters:
      zoneFile - Geopackage representing the zones to be cut
      parcelFile - Geopackage of the entire parcel plan of the area
      profile - Urban fabric profile of the wanted parcel plan
      outFolder - folder where everything is stored
      Returns:
      the collection containing the cut parcel plan
      Throws:
      IOException - from marking parcel
    • zoneDivision

      public org.geotools.data.simple.SimpleFeatureCollection zoneDivision(org.geotools.data.simple.SimpleFeatureCollection initialZone, org.geotools.data.simple.SimpleFeatureCollection parcels, File outFolder, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean keepExistingRoads) throws IOException
      Merge and re-cut a specific zone. Cut first the surrounding parcels to keep them unsplit, then split the zone parcel and remerge them all into the original parcel file A bit complicated algorithm to deal with non-existing pieces of parcels (as road).
      Parameters:
      initialZone - Zone which will be used to cut parcels. Will cut parcels that intersects them and keep their infos. Will then optionally fill the empty spaces in between the zones and feed it to the OBB algorithm.
      keepExistingRoads - If true, existing raod (lack of parcel in the parcel plan) will be kept. If not, the whole zone is simulated regardless of its content.
      parcels - SimpleFeatureCollection of the unmarked parcels.
      outFolder - folder to write Workflow.isDEBUG() and Workflow.isSAVEINTERMEDIATERESULT() geofile if concerned
      profile - ProfileUrbanFabric contains the parameters of the wanted urban scene
      Returns:
      The input parcel SimpleFeatureCollection with the marked parcels replaced by the simulated parcels.
      Throws:
      IOException - from marking parcel
    • zoneDivision

      public org.geotools.data.simple.SimpleFeatureCollection zoneDivision(org.geotools.data.simple.SimpleFeatureCollection initialZone, org.geotools.data.simple.SimpleFeatureCollection parcels, File outFolder, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, File roadFile, File buildingFile, boolean keepExistingRoads) throws IOException
      Merge and re-cut a specific zone. Cut first the surrounding parcels to keep them unsplit, then split the zone parcel and remerge them all into the original parcel file A bit complicated algorithm to deal with non-existing pieces of parcels (as road).
      Parameters:
      initialZone - Zone which will be used to cut parcels. Will cut parcels that intersects them and keep their infos. Will then optionally fill the empty spaces in between the zones and feed it to the OBB algorithm.
      keepExistingRoads - If true, existing raod (lack of parcel in the parcel plan) will be kept. If not, the whole zone is simulated regardless of its content.
      parcels - SimpleFeatureCollection of the unmarked parcels.
      outFolder - folder to write Workflow.isDEBUG() and Workflow.isSAVEINTERMEDIATERESULT() geofile if concerned
      profile - ProfileUrbanFabric contains the parameters of the wanted urban scene
      Returns:
      The input parcel SimpleFeatureCollection with the marked parcels replaced by the simulated parcels. All parcels have the same schema with a .
      Throws:
      IOException - from marking parcel
    • zoneDivision

      public org.geotools.data.simple.SimpleFeatureCollection zoneDivision(org.geotools.data.simple.SimpleFeatureCollection initialZone, org.geotools.data.simple.SimpleFeatureCollection parcels, org.geotools.data.simple.SimpleFeatureCollection roads, File outFolder, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean keepExistingRoads) throws IOException
      Merge and recut a specific zone. Cut first the surrounding parcels to keep them unsplit, then split the zone parcel and remerge them all into the original parcel file A bit complicated algorithm to deal with non-existing pieces of parcels (as road).
      Parameters:
      initialZone - Zone which will be used to cut parcels. Will cut parcels that intersects them and keep their infos. Will then optionally fill the empty spaces in between the zones and feed it to the OBB algorithm.
      parcels - SimpleFeatureCollection of the unmarked parcels.
      roads - Road features can be used in OBB process (optional)
      keepExistingRoads - If true, existing raod (lack of parcel in the parcel plan) will be kept. If not, the whole zone is simulated regardless of its content.
      outFolder - folder to write Workflow.isDEBUG() and Workflow.isSAVEINTERMEDIATERESULT() geofile if concerned
      profile - ProfileUrbanFabric contains the parameters of the wanted urban scene
      Returns:
      The input parcel SimpleFeatureCollection with the marked parcels replaced by the simulated parcels.
      Throws:
      IOException - from marking parcel
    • zoneDivision

      public org.geotools.data.simple.SimpleFeatureCollection zoneDivision(org.geotools.data.simple.SimpleFeatureCollection initialZone, org.geotools.data.simple.SimpleFeatureCollection parcels, org.geotools.data.simple.SimpleFeatureCollection roads, org.geotools.data.simple.SimpleFeatureCollection buildings, File outFolder, fr.ign.artiscales.tools.parameter.ProfileUrbanFabric profile, boolean keepExistingRoads, List<org.locationtech.jts.geom.LineString> extLines, org.locationtech.jts.geom.Geometry exclusionZone) throws IOException
      Merge and recut a specific zone. Cut first the surrounding parcels to keep them unsplit, then split the zone parcel and remerge them all into the original parcel file A bit complicated algorithm to deal with non-existing pieces of parcels (as road).
      Parameters:
      initialZone - Zone which will be used to cut parcels. Will cut parcels that intersects them and keep their infos. Will then optionally fill the empty spaces in between the zones and feed it to the OBB algorithm.
      parcels - SimpleFeatureCollection of the unmarked parcels.
      roads - Road features can be used in OBB process (optional)
      keepExistingRoads - If true, existing raod (lack of parcel in the parcel plan) will be kept. If not, the whole zone is simulated regardless of its content.
      outFolder - folder to write Workflow.isDEBUG() and Workflow.isSAVEINTERMEDIATERESULT() geofile if concerned
      profile - ProfileUrbanFabric contains the parameters of the wanted urban scene
      buildings - for densification only (can be null)
      exclusionZone - for densification only (can be null)
      extLines - for densification only (can be null)
      Returns:
      The input parcel SimpleFeatureCollection with the marked parcels replaced by the simulated parcels. All parcels have the same schema as input parcels.
      Throws:
      IOException - from marking parcel
    • makeNewSection

      public String makeNewSection(String numZone)
      Create a new section name following a precise rule.
      Specified by:
      makeNewSection in class Workflow
      Parameters:
      numZone - number of the nex zone
      Returns:
      the 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.