Overview | Package | Class | Tree | Deprecated | Index | Help
| JTS Topology Suite version 1.13
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.linearref
Class LengthLocationMap

    java.lang.Object
      com.vividsolutions.jts.linearref.LengthLocationMap

    public class LengthLocationMap

extends java.lang.Object

Computes the `LinearLocation` for a given length along a linear `Geometry`. Negative lengths are measured in reverse from end of the linear geometry. Out-of-range values are clamped.

Constructor Summary
`LengthLocationMap(Geometry linearGeom)`

Method Summary
`static double` | `getLength(Geometry linearGeom, LinearLocation loc)` Computes the length for a given `LinearLocation` on a linear `Geometry`.
`double` | `getLength(LinearLocation loc)`
`LinearLocation` | `getLocation(double length)` Compute the `LinearLocation` corresponding to a length.
`LinearLocation` | `getLocation(double length, boolean resolveLower)` Compute the `LinearLocation` corresponding to a length.
`static LinearLocation` | `getLocation(Geometry linearGeom, double length)` Computes the `LinearLocation` for a given length along a linear `Geometry`.
`static LinearLocation` | `getLocation(Geometry linearGeom, double length, boolean resolveLower)` Computes the `LinearLocation` for a given length along a linear `Geometry`, with control over how the location is resolved at component endpoints.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LengthLocationMap

    public LengthLocationMap(Geometry linearGeom)

Method Detail

### getLocation

    public static LinearLocation getLocation(Geometry linearGeom,
                                             double length)

  Computes the `LinearLocation` for a given length along a linear `Geometry`.

  Parameters:
    `linearGeom` - the linear geometry to use
    `length` - the length index of the location
  Returns:
    the `LinearLocation` for the length

### getLocation

    public static LinearLocation getLocation(Geometry linearGeom,
                                             double length,
                                             boolean resolveLower)

  Computes the `LinearLocation` for a given length along a linear `Geometry`, with control over how the location is resolved at component endpoints.

  Parameters:
    `linearGeom` - the linear geometry to use
    `length` - the length index of the location
    `resolveLower` - if true lengths are resolved to the lowest possible index
  Returns:
    the `LinearLocation` for the length

### getLength

    public static double getLength(Geometry linearGeom,
                                   LinearLocation loc)

  Computes the length for a given `LinearLocation` on a linear `Geometry`.

  Parameters:
    `linearGeom` - the linear geometry to use
    `loc` - the `LinearLocation` index of the location
  Returns:
    the length for the `LinearLocation`

### getLocation

    public LinearLocation getLocation(double length)

  Compute the `LinearLocation` corresponding to a length. Negative lengths are measured in reverse from end of the linear geometry. Out-of-range values are clamped. Ambiguous indexes are resolved to the lowest possible location value.

  Parameters:
    `length` - the length index
  Returns:
    the corresponding LinearLocation

### getLocation

    public LinearLocation getLocation(double length,
                                      boolean resolveLower)

  Compute the `LinearLocation` corresponding to a length. Negative lengths are measured in reverse from end of the linear geometry. Out-of-range values are clamped. Ambiguous indexes are resolved to the lowest or highest possible location value, depending on the value of `resolveLower`

  Parameters:
    `length` - the length index
  Returns:
    the corresponding LinearLocation

### getLength

    public double getLength(LinearLocation loc)

Overview | Package | Class | Tree | Deprecated | Index | Help
| JTS Topology Suite version 1.13
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD