Class SingleParcelStat

java.lang.Object
fr.ign.artiscales.pm.analysis.SingleParcelStat

public class SingleParcelStat extends Object
This class calculates basic statistics for every marked parcels. If no mark parcels are found, stats are calucated for every parcels.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    diffAreaAverage​(org.geotools.data.simple.SimpleFeatureCollection parcelSFC, File parcelToCompareFile)
    Calculate the difference between the average area of two Geopackages.
    static int
    diffNumberOfParcel​(org.geotools.data.simple.SimpleFeatureCollection parcelSFC, File parcelToCompareFile)
    Calculate the difference of number of parcels between two geo files.
    static double
    hausdorffDistance​(org.geotools.data.simple.SimpleFeatureCollection parcelSFC, File parcelToCompareFile)
    Calculation Hausdorff Similarity average for a set of parcels.
    static double
    hausdorffSimilarityAverage​(org.geotools.data.simple.SimpleFeatureCollection parcelIn, org.geotools.data.simple.SimpleFeatureCollection parcelToCompare)
    Calculation Hausdorff Similarity average for a set of parcels.
    static void
    writeStatSingleParcel​(File parcelFile, File roadFile, File parcelStatCsv, boolean markAll)
    Write every regular statistics for a parcel plan
    static void
    writeStatSingleParcel​(File parcelFile, File roadFile, File parcelToCompare, File parcelStatCsv, boolean markAll)
    Write every regular statistics for a parcel plan
    static void
    writeStatSingleParcel​(org.geotools.data.simple.SimpleFeatureCollection parcels, File roadFile, File parcelStatCsv)
    Calculate statistics (area, perimeter, widthContactWithRoad, numberOfNeighborhood and AspectRatio) for every single parcels.
    static void
    writeStatSingleParcel​(org.geotools.data.simple.SimpleFeatureCollection parcels, org.geotools.data.simple.SimpleFeatureCollection roads, File parcelStatCsv)
    Calculate statistics (area, perimeter, widthContactWithRoad, numberOfNeighborhood and AspectRatio) for every single parcels.
    static void
    writeStatSingleParcel​(org.geotools.data.simple.SimpleFeatureCollection parcels, org.geotools.data.simple.SimpleFeatureCollection roads, org.geotools.data.simple.SimpleFeatureCollection parcelToCompare, File parcelStatCsv)
    Calculate statistics (area, perimeter, widthContactWithRoad, numberOfNeighborhood, Hausdorf Distances and AspectRatio) for every single parcels.

    Methods inherited from class java.lang.Object

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

    • SingleParcelStat

      public SingleParcelStat()
  • Method Details

    • writeStatSingleParcel

      public static void writeStatSingleParcel(File parcelFile, File roadFile, File parcelStatCsv, boolean markAll) throws IOException
      Write every regular statistics for a parcel plan
      Parameters:
      parcelFile - geofile conaining the plan
      roadFile - Road files
      parcelStatCsv - output statistic .csv file
      markAll - do we mark every parcels ? Only marked parcels will have their stat made.
      Throws:
      IOException - reading and writing file
    • writeStatSingleParcel

      public static void writeStatSingleParcel(File parcelFile, File roadFile, File parcelToCompare, File parcelStatCsv, boolean markAll) throws IOException
      Write every regular statistics for a parcel plan
      Parameters:
      parcelFile - geofile conaining the plan
      parcelToCompare - Optional parcel plan to compare shapes
      roadFile - Road files
      parcelStatCsv - output statistic .csv file
      markAll - do we mark every parcels ? Only marked parcels will have their stat made.
      Throws:
      IOException - reading and writing file
    • writeStatSingleParcel

      public static void writeStatSingleParcel(org.geotools.data.simple.SimpleFeatureCollection parcels, File roadFile, File parcelStatCsv) throws IOException
      Calculate statistics (area, perimeter, widthContactWithRoad, numberOfNeighborhood and AspectRatio) for every single parcels.
      Parameters:
      parcels - collection of parcels
      roadFile - road feature collection to calculate contact with road. Could be optional (but it's not yet)
      parcelStatCsv - output tab file to write
      Throws:
      IOException - writing stats
    • writeStatSingleParcel

      public static void writeStatSingleParcel(org.geotools.data.simple.SimpleFeatureCollection parcels, org.geotools.data.simple.SimpleFeatureCollection roads, File parcelStatCsv) throws IOException
      Calculate statistics (area, perimeter, widthContactWithRoad, numberOfNeighborhood and AspectRatio) for every single parcels.
      Parameters:
      parcels - collection of parcels
      roads - road feature collection to calculate contact with road. Could be optional (but it's not yet)
      parcelStatCsv - output tab file to write
      Throws:
      IOException - writing stats
    • writeStatSingleParcel

      public static void writeStatSingleParcel(org.geotools.data.simple.SimpleFeatureCollection parcels, org.geotools.data.simple.SimpleFeatureCollection roads, org.geotools.data.simple.SimpleFeatureCollection parcelToCompare, File parcelStatCsv) throws IOException
      Calculate statistics (area, perimeter, widthContactWithRoad, numberOfNeighborhood, Hausdorf Distances and AspectRatio) for every single parcels.
      Parameters:
      parcels - collection of parcels
      roads - road feature collection to calculate contact with road. Could be optional (but it's not yet)
      parcelToCompare - parcel plan before their simulation.
      parcelStatCsv - output tab file to write
      Throws:
      IOException - writing stats
    • hausdorffDistance

      public static double hausdorffDistance(org.geotools.data.simple.SimpleFeatureCollection parcelSFC, File parcelToCompareFile) throws IOException
      Calculation Hausdorff Similarity average for a set of parcels. Candidate must have been reduced before methode call
      Parameters:
      parcelSFC - The reference geo file
      parcelToCompareFile - The geo file to compare
      Returns:
      Hausdorff Similarity average
      Throws:
      IOException - reading files
    • diffNumberOfParcel

      public static int diffNumberOfParcel(org.geotools.data.simple.SimpleFeatureCollection parcelSFC, File parcelToCompareFile) throws IOException
      Calculate the difference of number of parcels between two geo files.
      Parameters:
      parcelSFC - The reference feature collection
      parcelToCompareFile - The geo file to compare
      Returns:
      the difference of average (absolute value)
      Throws:
      IOException - reading files
    • diffAreaAverage

      public static double diffAreaAverage(org.geotools.data.simple.SimpleFeatureCollection parcelSFC, File parcelToCompareFile) throws IOException
      Calculate the difference between the average area of two Geopackages. Find a better indicator to compare distribution.
      Parameters:
      parcelSFC - The reference Geopackage
      parcelToCompareFile - The Geopackage to compare
      Returns:
      the difference of average (absolute value)
      Throws:
      IOException - reading files
    • hausdorffSimilarityAverage

      public static double hausdorffSimilarityAverage(org.geotools.data.simple.SimpleFeatureCollection parcelIn, org.geotools.data.simple.SimpleFeatureCollection parcelToCompare)
      Calculation Hausdorff Similarity average for a set of parcels. Candidate must have been reduced before methode call
      Parameters:
      parcelIn - reference parcel set
      parcelToCompare - parcels to compare shapes
      Returns:
      Mean of Hausdorff distances