Class FrenchParcelFields
java.lang.Object
fr.ign.artiscales.pm.fields.french.FrenchParcelFields
Methods to deal with french parcel fields
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.geotools.data.simple.SimpleFeatureCollectionaddCommunityCode(org.geotools.data.simple.SimpleFeatureCollection parcels)Add a "CODE" field for every french parcel like of aSimpleFeatureCollection.static org.geotools.data.simple.SimpleFeatureCollectionaddFrenchParcelCode(org.geotools.data.simple.SimpleFeatureCollection parcels)Add a "CODE" field for every french parcel like of aSimpleFeatureCollection.static org.geotools.data.simple.SimpleFeatureCollectionfrenchParcelToMinParcel(org.geotools.data.simple.SimpleFeatureCollection parcels)Make sure the parcel collection contains all the required fields for Parcel Manager simulation.getFrenchCodeParcels(org.geotools.data.simple.SimpleFeatureCollection parcels)Get the parcel codes (Attribute CODE of the given SimpleFeatureCollection)static StringmakeDEPCOMCode(org.opengis.feature.simple.SimpleFeature parcel)Construct the French community code number (INSEE) from a French parcel.static StringmakeFrenchParcelCode(org.opengis.feature.simple.SimpleFeature parcel)Construct a french parcel code for aSimpleFeature.static org.geotools.data.simple.SimpleFeatureCollectionsetOriginalFrenchParcelAttributes(org.geotools.data.simple.SimpleFeatureCollection parcels, org.geotools.data.simple.SimpleFeatureCollection initialParcels)Fix the parcel attributes of a simulatedSimpleFeatureCollectionof parcel with original parcels.static StringshowFrenchParcel(org.opengis.feature.simple.SimpleFeature parcel)generate French parcels informations for displaying purposes.
-
Constructor Details
-
FrenchParcelFields
public FrenchParcelFields()
-
-
Method Details
-
frenchParcelToMinParcel
public static org.geotools.data.simple.SimpleFeatureCollection frenchParcelToMinParcel(org.geotools.data.simple.SimpleFeatureCollection parcels) throws IOExceptionMake sure the parcel collection contains all the required fields for Parcel Manager simulation.- Parameters:
parcels- Input parcelSimpleFeatureCollection.- Returns:
- A
SimpleFeatureCollectionwith the fileds of parcels that have been converted to theParcelSchema.getSFBMinParcel()schema. - Throws:
IOException
-
setOriginalFrenchParcelAttributes
public static org.geotools.data.simple.SimpleFeatureCollection setOriginalFrenchParcelAttributes(org.geotools.data.simple.SimpleFeatureCollection parcels, org.geotools.data.simple.SimpleFeatureCollection initialParcels)Fix the parcel attributes of a simulatedSimpleFeatureCollectionof parcel with original parcels. If a parcel has intact attributes, they will be copied. If the parcel has been simulated and misses some attributes, they will be generated.- Parameters:
parcels-SimpleFeatureCollectioncontaining parcels which to fix attributesinitialParcels-SimpleFeatureCollectioncontaining the original parcels which their original attributes- Returns:
- A
SimpleFeatureCollectionwith their original attributes
-
showFrenchParcel
generate French parcels informations for displaying purposes.- Parameters:
parcel- InputSimpleFeatureparcel.- Returns:
- French parcels informations
-
makeFrenchParcelCode
Construct a french parcel code for aSimpleFeature.- Parameters:
parcel- French parcel feature- Returns:
- the string code
-
addFrenchParcelCode
public static org.geotools.data.simple.SimpleFeatureCollection addFrenchParcelCode(org.geotools.data.simple.SimpleFeatureCollection parcels)Add a "CODE" field for every french parcel like of aSimpleFeatureCollection.- Parameters:
parcels-SimpleFeatureCollectionof French parcels.- Returns:
- The collection with the "CODE" field added.
-
addCommunityCode
public static org.geotools.data.simple.SimpleFeatureCollection addCommunityCode(org.geotools.data.simple.SimpleFeatureCollection parcels)Add a "CODE" field for every french parcel like of aSimpleFeatureCollection.- Parameters:
parcels-SimpleFeatureCollectionof French parcels.- Returns:
- The collection with the "CODE" field added.
-
getFrenchCodeParcels
public static List<String> getFrenchCodeParcels(org.geotools.data.simple.SimpleFeatureCollection parcels)Get the parcel codes (Attribute CODE of the given SimpleFeatureCollection)- Parameters:
parcels-SimpleFeatureCollectionof parcels- Returns:
- A list with all unique parcel codes
-
makeDEPCOMCode
Construct the French community code number (INSEE) from a French parcel.- Parameters:
parcel-- Returns:
- the INSEE number
-