Package org.gvsig.lrs.lib.impl
Class LrsAlgorithmUtils
java.lang.Object
org.gvsig.lrs.lib.impl.LrsAlgorithmUtils
- Author:
- fdiaz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static doublecalculateM(Double totalLength, Double minValue, Double maxValue, Double relativeDistance) Reduced versión of straight line through two points equation to calculate M'sprotected static org.gvsig.fmap.dal.feature.FeatureStorecreateNewDataStore(org.gvsig.fmap.dal.feature.NewFeatureStoreParameters newFeatureStoreParameters, org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor idRouteField) protected static org.gvsig.fmap.dal.feature.FeatureStorecreateNewDataStore(org.gvsig.fmap.dal.feature.NewFeatureStoreParameters newFeatureStoreParameters, org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor idRouteField, int type) protected static booleanequalPoints(org.gvsig.fmap.geom.primitive.Point point1, org.gvsig.fmap.geom.primitive.Point point2) protected static org.gvsig.fmap.geom.primitive.PointextractFirstPoint(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 Multilineprotected static List<org.gvsig.fmap.geom.primitive.Point> extractPoints(org.gvsig.fmap.geom.Geometry geometry) protected static DoublegetAsDouble(Object obj, org.gvsig.tools.dataTypes.DataType dataType) protected static DoublegetGeometryLength(org.gvsig.fmap.geom.Geometry geometry) Returns geometry length without gapsprotected static DoublegetGeometryLength(org.gvsig.fmap.geom.Geometry geometry, boolean ignoreSpatialGaps) Returns geometry length without gaps with the option to not ignore spatial gaps.protected static doublegetLineLength(org.gvsig.fmap.geom.primitive.Line line) protected static doublegetMultiLineLength(org.gvsig.fmap.geom.aggregate.MultiLine multiLine, boolean ignoreSpatialGaps) protected static org.gvsig.fmap.geom.GeometryinsertVertex(org.gvsig.fmap.geom.Geometry geometry, org.gvsig.fmap.geom.primitive.Point vertex, int index) protected static doublestraightLineThroughTwoPointsEquation(double x1, double x2, double y1, double y2, double x) Straight line through two points equation.
-
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
-
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.GeometryOperationNotSupportedExceptionorg.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.GeometryOperationNotSupportedExceptionorg.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.GeometryOperationExceptionorg.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.GeometryOperationExceptionorg.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:
-