Class ParcelAttribute
java.lang.Object
fr.ign.artiscales.pm.parcelFunction.ParcelAttribute
Methods to deal with parcel's specific attributes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetCityCodeOfParcels(org.geotools.data.simple.SimpleFeatureCollection parcels)Get the most represented city code numbers of the given collection.getCityCodesOfParcels(org.geotools.data.simple.SimpleFeatureCollection parcels)Get a list of all the city code numbers of the given collection.static StringgetCommunityCodeFromSFC(org.geotools.data.simple.SimpleFeatureCollection sFCWithCommunityCode, org.opengis.feature.simple.SimpleFeature feat)Get the Community Code number from aSimpleFeature(that is most of the time, a parcel or building)static StringGet the attribute field name for designing a type of communitystatic StringgetCommunityTypeFromSFC(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 StringgetNumberCodeFromSFC(org.geotools.data.simple.SimpleFeatureCollection sFCWithCommunityCode, org.opengis.feature.simple.SimpleFeature feat)get the Number from aSimpleFeature(that is most of the time, a parcel or building)static StringgetSectionCodeFromSFC(org.geotools.data.simple.SimpleFeatureCollection sFCWithCommunityCode, org.opengis.feature.simple.SimpleFeature feat)get the Section code from aSimpleFeature(that is most of the time, a parcel or building)static voidsetCommunityTypeFieldName(String armatureCodeName)Change the attribute field name for designing a type of community
-
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 aSimpleFeature(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 functionsetCommunityTypeFieldName(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 aSimpleFeature(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 functionParcelSchema.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 aSimpleFeature(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 functionParcelSchema.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 theParcelSchema.setParcelCommunityField(String)methodfeat- 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 methodParcelSchema.setParcelCommunityField(String). If no code is found, we try to generate it (only for the French Parcels)- Parameters:
parcels- InputSimpleFeatureCollectionof 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 methodParcelSchema.setParcelCommunityField(String). If no code is found, we try to generate it (only for the French Parcels).- Parameters:
parcels- InputSimpleFeatureCollectionof parcels- Returns:
- the most represented city code numbers
-
getCommunityTypeFieldName
Get the attribute field name for designing a type of community- Returns:
- the attribute field name for designing a type of community
-
setCommunityTypeFieldName
Change the attribute field name for designing a type of community- Parameters:
armatureCodeName- new attribute field name for designing a type of community
-