Class ParcelGetter
java.lang.Object
fr.ign.artiscales.pm.parcelFunction.ParcelGetter
Methods to get parcels from collections regarding specific criterion
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet a new community field name that later forms the zipcode.static StringGet the department code field name that later forms the zipcode.static org.geotools.data.simple.SimpleFeatureCollectiongetParcelByCommunityCode(org.geotools.data.simple.SimpleFeatureCollection parcelIn, String val)Get parcels out of a parcel collection with the zip code of them parcels.static org.geotools.data.simple.SimpleFeatureCollectiongetParcelByFrenchZoningType(String zone, org.geotools.data.simple.SimpleFeatureCollection parcels, File zoningFile)Get a set of parcel depending to their zoning type.static org.geotools.data.simple.SimpleFeatureCollectiongetParcelByTypo(String typo, org.geotools.data.simple.SimpleFeatureCollection parcels, File zoningFile)Get parcels by their typology.static FilegetParcelByZip(File parcelIn, List<String> vals, File fileOut)Write parcels out of a parcel collection corresponding to a list of zipcodes in a new geo file.static org.geotools.data.simple.SimpleFeatureCollectiongetParcelByZip(org.geotools.data.simple.SimpleFeatureCollection parcelIn, String val)Get parcels out of a parcel collection with the zip code of them parcels.static org.geotools.data.simple.SimpleFeatureCollectiongetParcelByZip(org.geotools.data.simple.SimpleFeatureCollection parcelIn, String val, String firstFieldName, String secondFieldName)Get parcels out of a parcel collection with the zip code of them parcels. zipcode is not directly contained in a field of the collection but is composed of two fields (usually a state-like code and a community code).static org.geotools.data.simple.SimpleFeatureCollectiongetParcelByZip(org.geotools.data.simple.SimpleFeatureCollection parcelIn, List<String> vals)Get parcels out of a parcel collection corresponding to a list of zipcodes Zipcodes are not directly contained in a field of the collection but is composed of two fields.static StringGet the field that sets a typology.static voidsetCodeComFieldName(String codeComFieldName)Set a new community field name that later forms the zipcode.static voidsetCodeDepFieldName(String codeDepFieldName)Set a new department code field name that later forms the zipcode.static voidsetTypologyFieldName(String typologyFieldName)Set the field that sets a typology.
-
Constructor Details
-
ParcelGetter
public ParcelGetter()
-
-
Method Details
-
getParcelByFrenchZoningType
public static org.geotools.data.simple.SimpleFeatureCollection getParcelByFrenchZoningType(String zone, org.geotools.data.simple.SimpleFeatureCollection parcels, File zoningFile) throws IOExceptionGet a set of parcel depending to their zoning type.- Parameters:
zone- zone to select parcels fromparcels- input parcelszoningFile- Shapefile containing the french zoning- Returns:
- a
SimpleFeatureCollectionof parcels that more of the half are contained into the zone - Throws:
IOException- reading zoning file
-
getParcelByTypo
public static org.geotools.data.simple.SimpleFeatureCollection getParcelByTypo(String typo, org.geotools.data.simple.SimpleFeatureCollection parcels, File zoningFile) throws IOExceptionGet parcels by their typology. Default typology field name is "typo" and can be changed using methodsetTypologyFieldName(String).- Parameters:
typo- Name of the searched typologyparcels- Collection of parcelszoningFile- Geopackage of the communities with a filed describing their typology- Returns:
- parcels which are included in the communities of a given typology
- Throws:
IOException- Reading zoning file
-
getParcelByZip
public static File getParcelByZip(File parcelIn, List<String> vals, File fileOut) throws IOExceptionWrite parcels out of a parcel collection corresponding to a list of zipcodes in a new geo file. Zipcodes are not directly contained in a field of the collection but is composed of two fields. Their values are set by default but it's possible to change them with the methodssetCodeComFieldName(String)andsetCodeDepFieldName(String)- Parameters:
parcelIn- input parcel collectionvals- a list of zipcode valuesfileOut- file to export selected parcels- Returns:
- a simple feature collection of parcels having the values contained in vals.
- Throws:
IOException- writing file
-
getParcelByZip
public static org.geotools.data.simple.SimpleFeatureCollection getParcelByZip(org.geotools.data.simple.SimpleFeatureCollection parcelIn, List<String> vals)Get parcels out of a parcel collection corresponding to a list of zipcodes Zipcodes are not directly contained in a field of the collection but is composed of two fields. Their values are set by default but it's possible to change them with the methodssetCodeComFieldName(String)andsetCodeDepFieldName(String)- Parameters:
parcelIn- input parcel collectionvals- a list of zipcode values- Returns:
- a simple feature collection of parcels having the values contained in vals.
-
getParcelByZip
public static org.geotools.data.simple.SimpleFeatureCollection getParcelByZip(org.geotools.data.simple.SimpleFeatureCollection parcelIn, String val)Get parcels out of a parcel collection with the zip code of them parcels. Zipcodes are not directly contained in a field of the collection but is composed of two fields. Their values are set by default but it's possible to change them with the methodssetCodeComFieldName(String)andsetCodeDepFieldName(String)- Parameters:
parcelIn- Input parcel collectionval- Value of the zipcode. Can contain comma separated values- Returns:
- A simple feature collection of parcels having the val value. * @throws IOException
-
getParcelByZip
public static org.geotools.data.simple.SimpleFeatureCollection getParcelByZip(org.geotools.data.simple.SimpleFeatureCollection parcelIn, String val, String firstFieldName, String secondFieldName)Get parcels out of a parcel collection with the zip code of them parcels. zipcode is not directly contained in a field of the collection but is composed of two fields (usually a state-like code and a community code). todo why are we working on geometries like that ??- Parameters:
parcelIn- Input parcel collectionval- Value of the zipcodefirstFieldName- First part of the field name which compose zipcode field namesecondFieldName- Second part of the field name which compose zipcode field name- Returns:
- a simple feature collection of parcels having the val value.
-
getParcelByCommunityCode
public static org.geotools.data.simple.SimpleFeatureCollection getParcelByCommunityCode(org.geotools.data.simple.SimpleFeatureCollection parcelIn, String val)Get parcels out of a parcel collection with the zip code of them parcels.- Parameters:
parcelIn- InputSimpleFeatureCollectionof parcelval- City number value- Returns:
- a simple feature collection of parcels having the val value.
-
getCodeDepFieldName
Get the department code field name that later forms the zipcode.- Returns:
- department code field name (CODE_DEP by default)
-
setCodeDepFieldName
Set a new department code field name that later forms the zipcode.- Parameters:
codeDepFieldName- new department code field name.
-
getCodeComFieldName
Get a new community field name that later forms the zipcode.- Returns:
- current community code field name (CODE_COM by default).
-
setCodeComFieldName
Set a new community field name that later forms the zipcode.- Parameters:
codeComFieldName- new community code field name.
-
getTypologyFieldName
Get the field that sets a typology.- Returns:
- topology field name (typo by default).
-
setTypologyFieldName
Set the field that sets a typology.- Parameters:
typologyFieldName- new typology field name
-