Class LrsAlgorithmUtils

java.lang.Object
org.gvsig.lrs.lib.impl.LrsAlgorithmUtils

public class LrsAlgorithmUtils extends Object
Author:
fdiaz
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static double
    calculateM(Double totalLength, Double minValue, Double maxValue, Double relativeDistance)
    Reduced versión of straight line through two points equation to calculate M's
    protected static org.gvsig.fmap.dal.feature.FeatureStore
    createNewDataStore(org.gvsig.fmap.dal.feature.NewFeatureStoreParameters newFeatureStoreParameters, org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor idRouteField)
     
    protected static org.gvsig.fmap.dal.feature.FeatureStore
    createNewDataStore(org.gvsig.fmap.dal.feature.NewFeatureStoreParameters newFeatureStoreParameters, org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor idRouteField, int type)
     
    protected static boolean
    equalPoints(org.gvsig.fmap.geom.primitive.Point point1, org.gvsig.fmap.geom.primitive.Point point2)
     
    protected static org.gvsig.fmap.geom.primitive.Point
    extractFirstPoint(org.gvsig.fmap.geom.Geometry geometry)
     
    protected static List<org.gvsig.fmap.geom.primitive.Line>
    extractLines(org.gvsig.fmap.geom.Geometry geometry)
    Extracts the lines in a Line or Multiline
    protected static List<org.gvsig.fmap.geom.primitive.Point>
    extractPoints(org.gvsig.fmap.geom.Geometry geometry)
     
    protected static Double
    getAsDouble(Object obj, org.gvsig.tools.dataTypes.DataType dataType)
     
    protected static Double
    getGeometryLength(org.gvsig.fmap.geom.Geometry geometry)
    Returns geometry length without gaps
    protected static Double
    getGeometryLength(org.gvsig.fmap.geom.Geometry geometry, boolean ignoreSpatialGaps)
    Returns geometry length without gaps with the option to not ignore spatial gaps.
    protected static double
    getLineLength(org.gvsig.fmap.geom.primitive.Line line)
     
    protected static double
    getMultiLineLength(org.gvsig.fmap.geom.aggregate.MultiLine multiLine, boolean ignoreSpatialGaps)
     
    protected static org.gvsig.fmap.geom.Geometry
    insertVertex(org.gvsig.fmap.geom.Geometry geometry, org.gvsig.fmap.geom.primitive.Point vertex, int index)
     
    protected static double
    straightLineThroughTwoPointsEquation(double x1, double x2, double y1, double y2, double x)
    Straight line through two points equation.

    Methods inherited from class java.lang.Object

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

    • LrsAlgorithmUtils

      public LrsAlgorithmUtils()
  • Method Details

    • createNewDataStore

      protected static org.gvsig.fmap.dal.feature.FeatureStore createNewDataStore(org.gvsig.fmap.dal.feature.NewFeatureStoreParameters newFeatureStoreParameters, org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor idRouteField) throws Exception
      Throws:
      Exception
    • createNewDataStore

      protected static org.gvsig.fmap.dal.feature.FeatureStore createNewDataStore(org.gvsig.fmap.dal.feature.NewFeatureStoreParameters newFeatureStoreParameters, org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor idRouteField, int type) throws Exception
      Throws:
      Exception
    • getAsDouble

      protected static Double getAsDouble(Object obj, org.gvsig.tools.dataTypes.DataType dataType)
    • getGeometryLength

      protected static Double getGeometryLength(org.gvsig.fmap.geom.Geometry geometry) throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException, org.gvsig.fmap.geom.operation.GeometryOperationException
      Returns geometry length without gaps
      Parameters:
      geometry -
      Returns:
      Throws:
      org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
      org.gvsig.fmap.geom.operation.GeometryOperationException
    • getGeometryLength

      protected static Double getGeometryLength(org.gvsig.fmap.geom.Geometry geometry, boolean ignoreSpatialGaps) throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException, org.gvsig.fmap.geom.operation.GeometryOperationException
      Returns geometry length without gaps with the option to not ignore spatial gaps.
      Parameters:
      geometry -
      ignoreSpatialGaps -
      Returns:
      Throws:
      org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
      org.gvsig.fmap.geom.operation.GeometryOperationException
    • getLineLength

      protected static double getLineLength(org.gvsig.fmap.geom.primitive.Line line) throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException, org.gvsig.fmap.geom.operation.GeometryOperationException
      Parameters:
      line -
      Returns:
      lenght
      Throws:
      org.gvsig.fmap.geom.operation.GeometryOperationException
      org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
    • getMultiLineLength

      protected static double getMultiLineLength(org.gvsig.fmap.geom.aggregate.MultiLine multiLine, boolean ignoreSpatialGaps) throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException, org.gvsig.fmap.geom.operation.GeometryOperationException
      Parameters:
      multiLine -
      Returns:
      lenght
      Throws:
      org.gvsig.fmap.geom.operation.GeometryOperationException
      org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
    • extractLines

      protected static List<org.gvsig.fmap.geom.primitive.Line> extractLines(org.gvsig.fmap.geom.Geometry geometry)
      Extracts the lines in a Line or Multiline
      Parameters:
      geometry -
      Returns:
    • extractPoints

      protected static List<org.gvsig.fmap.geom.primitive.Point> extractPoints(org.gvsig.fmap.geom.Geometry geometry)
    • extractFirstPoint

      protected static org.gvsig.fmap.geom.primitive.Point extractFirstPoint(org.gvsig.fmap.geom.Geometry geometry)
    • equalPoints

      protected static boolean equalPoints(org.gvsig.fmap.geom.primitive.Point point1, org.gvsig.fmap.geom.primitive.Point point2)
    • insertVertex

      protected static org.gvsig.fmap.geom.Geometry insertVertex(org.gvsig.fmap.geom.Geometry geometry, org.gvsig.fmap.geom.primitive.Point vertex, int index)
    • calculateM

      protected static double calculateM(Double totalLength, Double minValue, Double maxValue, Double relativeDistance)
      Reduced versión of straight line through two points equation to calculate M's
      Parameters:
      totalLength -
      minValue -
      maxValue -
      relativeDistance -
      Returns:
    • straightLineThroughTwoPointsEquation

      protected static double straightLineThroughTwoPointsEquation(double x1, double x2, double y1, double y2, double x)
      Straight line through two points equation.
      Parameters:
      x1 -
      x2 -
      y1 -
      y2 -
      x -
      Returns: