Class FrenchParcelFields

java.lang.Object
fr.ign.artiscales.pm.fields.french.FrenchParcelFields

public class FrenchParcelFields extends Object
Methods to deal with french parcel fields
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.geotools.data.simple.SimpleFeatureCollection
    addCommunityCode​(org.geotools.data.simple.SimpleFeatureCollection parcels)
    Add a "CODE" field for every french parcel like of a SimpleFeatureCollection.
    static org.geotools.data.simple.SimpleFeatureCollection
    addFrenchParcelCode​(org.geotools.data.simple.SimpleFeatureCollection parcels)
    Add a "CODE" field for every french parcel like of a SimpleFeatureCollection.
    static org.geotools.data.simple.SimpleFeatureCollection
    frenchParcelToMinParcel​(org.geotools.data.simple.SimpleFeatureCollection parcels)
    Make sure the parcel collection contains all the required fields for Parcel Manager simulation.
    static List<String>
    getFrenchCodeParcels​(org.geotools.data.simple.SimpleFeatureCollection parcels)
    Get the parcel codes (Attribute CODE of the given SimpleFeatureCollection)
    static String
    makeDEPCOMCode​(org.opengis.feature.simple.SimpleFeature parcel)
    Construct the French community code number (INSEE) from a French parcel.
    static String
    makeFrenchParcelCode​(org.opengis.feature.simple.SimpleFeature parcel)
    Construct a french parcel code for a SimpleFeature.
    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 simulated SimpleFeatureCollection of parcel with original parcels.
    static String
    showFrenchParcel​(org.opengis.feature.simple.SimpleFeature parcel)
    generate French parcels informations for displaying purposes.

    Methods inherited from class java.lang.Object

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

    • FrenchParcelFields

      public FrenchParcelFields()
  • Method Details

    • frenchParcelToMinParcel

      public static org.geotools.data.simple.SimpleFeatureCollection frenchParcelToMinParcel(org.geotools.data.simple.SimpleFeatureCollection parcels) throws IOException
      Make sure the parcel collection contains all the required fields for Parcel Manager simulation.
      Parameters:
      parcels - Input parcel SimpleFeatureCollection.
      Returns:
      A SimpleFeatureCollection with the fileds of parcels that have been converted to the ParcelSchema.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 simulated SimpleFeatureCollection of 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 - SimpleFeatureCollection containing parcels which to fix attributes
      initialParcels - SimpleFeatureCollection containing the original parcels which their original attributes
      Returns:
      A SimpleFeatureCollection with their original attributes
    • showFrenchParcel

      public static String showFrenchParcel(org.opengis.feature.simple.SimpleFeature parcel)
      generate French parcels informations for displaying purposes.
      Parameters:
      parcel - Input SimpleFeature parcel.
      Returns:
      French parcels informations
    • makeFrenchParcelCode

      public static String makeFrenchParcelCode(org.opengis.feature.simple.SimpleFeature parcel)
      Construct a french parcel code for a SimpleFeature.
      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 a SimpleFeatureCollection.
      Parameters:
      parcels - SimpleFeatureCollection of 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 a SimpleFeatureCollection.
      Parameters:
      parcels - SimpleFeatureCollection of 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 - SimpleFeatureCollection of parcels
      Returns:
      A list with all unique parcel codes
    • makeDEPCOMCode

      public static String makeDEPCOMCode(org.opengis.feature.simple.SimpleFeature parcel)
      Construct the French community code number (INSEE) from a French parcel.
      Parameters:
      parcel -
      Returns:
      the INSEE number