Class MakeStatisticGraphs

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

public class MakeStatisticGraphs extends Object
Class to automate the creation of stat graphs
  • Constructor Details

    • MakeStatisticGraphs

      public MakeStatisticGraphs()
  • Method Details

    • makeAreaGraph

      public static void makeAreaGraph(File parcelFile, File outFolder, String name) throws IOException
      Automate the generation of graphs about area of fresh parcel cuts.
      Parameters:
      parcelFile - Shapefile of the parcel plan
      outFolder - Folder where the graph have to be exported
      name - Title of the graph
      Throws:
      IOException - Reading parcelFile
    • makeAreaGraph

      public static void makeAreaGraph(List<org.opengis.feature.simple.SimpleFeature> markedParcelFile, File outFolder, String name)
      Automate the generation of graphs about area of fresh parcel cuts.
      Parameters:
      markedParcelFile - List of parcels.
      outFolder - Folder where the graph have to be exported
      name - Title of the graph
    • makeWidthContactRoadGraph

      public static void makeWidthContactRoadGraph(List<org.opengis.feature.simple.SimpleFeature> markedParcelFile, org.geotools.data.simple.SimpleFeatureCollection block, File roadFile, File outFolder, String name) throws IOException
      Automate the generation of graphs about the contact length on road of fresh parcel cuts.
      Parameters:
      markedParcelFile - List of parcels.
      outFolder - Folder where the graph have to be exported
      name - Title of the graph
      block - morphological islet
      roadFile - geo file containing road
      Throws:
      IOException - writing result
    • sortValuesAreaAndCategorize

      public static Graph sortValuesAreaAndCategorize(org.geotools.data.simple.SimpleFeatureCollection parcelOut, String nameDistrib)
      Process to sort which parcels have been cut, and get the bounds of the distribution. WARNING - Developed for French Parcels - section is always a two character. By default, does not cut the top and low 10% values
      Parameters:
      parcelOut - The parcel to sort and plot
      nameDistrib - The name of the distribution
      Returns:
      An Graph object
    • sortValuesAreaAndCategorize

      public static Graph sortValuesAreaAndCategorize(List<org.opengis.feature.simple.SimpleFeature> parcelOut, String nameDistrib, boolean cutCrest)
      Process to sort which parcels have been cut, and get the bounds of the distribution. WARNING - Developed for French Parcels - section is always a two character. Can spare the crest values (the top and low 10%)
      Parameters:
      parcelOut - the parcel to sort and plot
      nameDistrib - the name of the distribution
      cutCrest - Cut the top and low 10% values
      Returns:
      a Graph object
    • sortValuesAndCategorize

      public static Graph sortValuesAndCategorize(List<Double> parcelMesure, boolean cutCrest, String nameDistrib)
      Process to sort which parcels have been cut, and get the bounds of the distribution. WARNING - Developed for French Parcels - section is always a two character. Can spare the crest values (the top and low 10%)
      Parameters:
      parcelMesure - Mesures of the parcel to sort and plot
      nameDistrib - the name of the distribution
      cutCrest - Cut the top and low 10% values
      Returns:
      a Graph object
    • makeGraphHisto

      public static void makeGraphHisto(Graph graph, File graphDepotFolder, String title, String xTitle, String yTitle, int range)
      Generate a histogram graph.
      Parameters:
      graph - area graph object with sorted distribution and bounds
      graphDepotFolder - folder where every stats are stocked
      title - title of the graph
      xTitle - title of the x dimention
      yTitle - title of the y dimention
      range - number of categories
    • makeGraphHisto

      public static void makeGraphHisto(List<Graph> graphs, File graphDepotFolder, String title, String xTitle, String yTitle, int range)
      Generate a histogram graph.
      Parameters:
      graphs - area graph objects with sorted distribution and bounds
      graphDepotFolder - folder where every stats are stocked
      title - title of the graph
      xTitle - title of the x dimention
      yTitle - title of the y dimention
      range - number of categories
    • roadGraph

      public static void roadGraph(org.geotools.data.simple.SimpleFeatureCollection roads, String title, String xTitle, String yTitle, File graphDepotFolder) throws IOException
      Makes a graph for the road (following french attributes, but that easily can be changed if needed).
      Parameters:
      roads - Collection of Road segments.
      graphDepotFolder - folder where every stats are stocked
      title - title of the graph
      xTitle - title of the x dimention
      yTitle - title of the y dimention
      Throws:
      IOException - write .csv and graph