Package fr.ign.artiscales.pm.workflow
Class ZoneDivision
java.lang.Object
fr.ign.artiscales.pm.workflow.Workflow
fr.ign.artiscales.pm.workflow.ZoneDivision
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic org.geotools.data.simple.SimpleFeatureCollectioncreateZoneToCut(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.SimpleFeatureCollectioncreateZoneToCut(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.booleanisNewSection(org.opengis.feature.simple.SimpleFeature feat)Check if the inputSimpleFeaturehas 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.SimpleFeatureCollectionzoneDivision(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.SimpleFeatureCollectionzoneDivision(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.SimpleFeatureCollectionzoneDivision(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.SimpleFeatureCollectionzoneDivision(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.SimpleFeatureCollectionzoneDivision(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.SimpleFeatureCollectionzoneDivision(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
-
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 theGeneralFields.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 boundingSimpleFeatureCollectionto bound the output.- Parameters:
genericZone- Name of the generic zone to be cutinputSFC- Geopackage of zones to extract the wanted zone from (usually a zoning plan)boundingSFC-SimpleFeatureCollectionto 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 theGeneralFields.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 boundingSimpleFeatureCollectionto bound the output.- Parameters:
genericZone- Name of the generic zone to be cutpreciseZone- Name of the precise zone to be cut. Can be nullinputSFC- Geopackage of zones to extract the wanted zone from (usually a zoning plan)boundingSFC-SimpleFeatureCollectionto 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 IOExceptionMethod to use from fresh Geopackages. Mainly used by OpenMole tasks.- Parameters:
zoneFile- Geopackage representing the zones to be cutparcelFile- Geopackage of the entire parcel plan of the areaprofile- Urban fabric profile of the wanted parcel planoutFolder- 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 IOExceptionMerge 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-SimpleFeatureCollectionof the unmarked parcels.outFolder- folder to writeWorkflow.isDEBUG()andWorkflow.isSAVEINTERMEDIATERESULT()geofile if concernedprofile-ProfileUrbanFabriccontains the parameters of the wanted urban scene- Returns:
- The input parcel
SimpleFeatureCollectionwith 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 IOExceptionMerge 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-SimpleFeatureCollectionof the unmarked parcels.outFolder- folder to writeWorkflow.isDEBUG()andWorkflow.isSAVEINTERMEDIATERESULT()geofile if concernedprofile-ProfileUrbanFabriccontains the parameters of the wanted urban scene- Returns:
- The input parcel
SimpleFeatureCollectionwith 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 IOExceptionMerge 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-SimpleFeatureCollectionof 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 writeWorkflow.isDEBUG()andWorkflow.isSAVEINTERMEDIATERESULT()geofile if concernedprofile-ProfileUrbanFabriccontains the parameters of the wanted urban scene- Returns:
- The input parcel
SimpleFeatureCollectionwith 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 IOExceptionMerge 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-SimpleFeatureCollectionof 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 writeWorkflow.isDEBUG()andWorkflow.isSAVEINTERMEDIATERESULT()geofile if concernedprofile-ProfileUrbanFabriccontains the parameters of the wanted urban scenebuildings- for densification only (can be null)exclusionZone- for densification only (can be null)extLines- for densification only (can be null)- Returns:
- The input parcel
SimpleFeatureCollectionwith the marked parcels replaced by the simulated parcels. All parcels have the same schema as input parcels. - Throws:
IOException- from marking parcel
-
makeNewSection
Create a new section name following a precise rule.- Specified by:
makeNewSectionin classWorkflow- 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 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.
-