Class ParcelAttribute

java.lang.Object
fr.ign.artiscales.pm.parcelFunction.ParcelAttribute

public class ParcelAttribute extends Object
Methods to deal with parcel's specific attributes
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getCityCodeOfParcels​(org.geotools.data.simple.SimpleFeatureCollection parcels)
    Get the most represented city code numbers of the given collection.
    static List<String>
    getCityCodesOfParcels​(org.geotools.data.simple.SimpleFeatureCollection parcels)
    Get a list of all the city code numbers of the given collection.
    static String
    getCommunityCodeFromSFC​(org.geotools.data.simple.SimpleFeatureCollection sFCWithCommunityCode, org.opengis.feature.simple.SimpleFeature feat)
    Get the Community Code number from a SimpleFeature (that is most of the time, a parcel or building)
    static String
    Get the attribute field name for designing a type of community
    static String
    getCommunityTypeFromSFC​(org.geotools.data.simple.SimpleFeatureCollection sfc, org.opengis.feature.simple.SimpleFeature feat)
    Get the type of community from a Simplefeature (that is most of the time, a parcel or building).
    static String
    getNumberCodeFromSFC​(org.geotools.data.simple.SimpleFeatureCollection sFCWithCommunityCode, org.opengis.feature.simple.SimpleFeature feat)
    get the Number from a SimpleFeature (that is most of the time, a parcel or building)
    static String
    getSectionCodeFromSFC​(org.geotools.data.simple.SimpleFeatureCollection sFCWithCommunityCode, org.opengis.feature.simple.SimpleFeature feat)
    get the Section code from a SimpleFeature (that is most of the time, a parcel or building)
    static void
    setCommunityTypeFieldName​(String armatureCodeName)
    Change the attribute field name for designing a type of community

    Methods inherited from class java.lang.Object

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

    • ParcelAttribute

      public ParcelAttribute()
  • Method Details

    • getCommunityCodeFromSFC

      public static String getCommunityCodeFromSFC(org.geotools.data.simple.SimpleFeatureCollection sFCWithCommunityCode, org.opengis.feature.simple.SimpleFeature feat)
      Get the Community Code number from a SimpleFeature (that is most of the time, a parcel or building)
      Parameters:
      sFCWithCommunityCode - Collection of cities. The default field name is DEPCOM an can be changed with the function setCommunityTypeFieldName(String)
      feat - Collection of parcels to get city codes from.
      Returns:
      the most represented city code from the SimpleFeatureCollection
    • getSectionCodeFromSFC

      public static String getSectionCodeFromSFC(org.geotools.data.simple.SimpleFeatureCollection sFCWithCommunityCode, org.opengis.feature.simple.SimpleFeature feat)
      get the Section code from a SimpleFeature (that is most of the time, a parcel or building)
      Parameters:
      sFCWithCommunityCode - Collection of cities. The default field name is SECTION an can be changed with the function ParcelSchema.setParcelSectionField(String)
      feat - Collection of parcels to get city codes from.
      Returns:
      the most represented city code from the SimpleFeatureCollection
    • getNumberCodeFromSFC

      public static String getNumberCodeFromSFC(org.geotools.data.simple.SimpleFeatureCollection sFCWithCommunityCode, org.opengis.feature.simple.SimpleFeature feat)
      get the Number from a SimpleFeature (that is most of the time, a parcel or building)
      Parameters:
      sFCWithCommunityCode - Collection of cities. The default field name is NUMERO an can be changed with the function ParcelSchema.setParcelNumberField(String)
      feat - Collection of parcels to get city codes from.
      Returns:
      the most represented city code from the SimpleFeatureCollection
    • getCommunityTypeFromSFC

      public static String getCommunityTypeFromSFC(org.geotools.data.simple.SimpleFeatureCollection sfc, org.opengis.feature.simple.SimpleFeature feat)
      Get the type of community from a Simplefeature (that is most of the time, a parcel or building).
      Parameters:
      sfc - Collection of cities. The default field name is armature an can be changed with the ParcelSchema.setParcelCommunityField(String) method
      feat - Feature to get city codes from.
      Returns:
      the type of community in which is the feature.
    • getCityCodesOfParcels

      public static List<String> getCityCodesOfParcels(org.geotools.data.simple.SimpleFeatureCollection parcels)
      Get a list of all the city code numbers of the given collection. The city code field name is DEPCOM by default and can be changed with the method ParcelSchema.setParcelCommunityField(String). If no code is found, we try to generate it (only for the French Parcels)
      Parameters:
      parcels - Input SimpleFeatureCollection of parcels
      Returns:
      The list of every city code numbers from the input parcels.
    • getCityCodeOfParcels

      public static String getCityCodeOfParcels(org.geotools.data.simple.SimpleFeatureCollection parcels)
      Get the most represented city code numbers of the given collection. The city code field name is DEPCOM by default and can be changed with the method ParcelSchema.setParcelCommunityField(String). If no code is found, we try to generate it (only for the French Parcels).
      Parameters:
      parcels - Input SimpleFeatureCollection of parcels
      Returns:
      the most represented city code numbers
    • getCommunityTypeFieldName

      public static String getCommunityTypeFieldName()
      Get the attribute field name for designing a type of community
      Returns:
      the attribute field name for designing a type of community
    • setCommunityTypeFieldName

      public static void setCommunityTypeFieldName(String armatureCodeName)
      Change the attribute field name for designing a type of community
      Parameters:
      armatureCodeName - new attribute field name for designing a type of community