com.gisgraphy.hibernate.projection

## Class SpatialProjection

- java.lang.Object
- - com.gisgraphy.hibernate.projection.SpatialProjection

-     public class SpatialProjection
      extends Object

  Author:
    David Masclet Some Spatial Projections. distance_sphere...

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DISTANCE_FUNCTION`
    `static String` | `DISTANCE_SPHERE_FUNCTION`
    `static String` | `LINEMERGE_FUNCTION`
    `static String` | `ST_CLOSEST_POINT`
    `static String` | `ST_LINE_INTERPOLATE_POINT_FUNCTION`
    `static String` | `ST_LINE_LOCATE_POINT_FUNCTION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpatialProjection()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.hibernate.criterion.SimpleProjection` | `distance_pointToLine(com.vividsolutions.jts.geom.Point point, String lineStringColumnName)` projection to get the distance_sphere between a point and a LineString
    `static org.hibernate.criterion.SimpleProjection` | `distance_sphere(com.vividsolutions.jts.geom.Point point, String locationColumnName)` projection to get the distance_sphere of a point if you're on a Cartesian ref use `distance(Point, String)`
    `static org.hibernate.criterion.SimpleProjection` | `distance(com.vividsolutions.jts.geom.Point point, String locationColumnName)` projection to get the distance from a point if you're on a lat/long ref, use @link `distance_sphere(Point, String)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DISTANCE_FUNCTION

          public static final String DISTANCE_FUNCTION

      See Also:
        Constant Field Values

    - #### DISTANCE_SPHERE_FUNCTION

          public static final String DISTANCE_SPHERE_FUNCTION

      See Also:
        Constant Field Values

    - #### ST_LINE_INTERPOLATE_POINT_FUNCTION

          public static String ST_LINE_INTERPOLATE_POINT_FUNCTION

    - #### ST_CLOSEST_POINT

          public static String ST_CLOSEST_POINT

    - #### ST_LINE_LOCATE_POINT_FUNCTION

          public static String ST_LINE_LOCATE_POINT_FUNCTION

    - #### LINEMERGE_FUNCTION

          public static String LINEMERGE_FUNCTION

  - ### Constructor Detail

    - #### SpatialProjection

          public SpatialProjection()

  - ### Method Detail

    - #### distance_pointToLine

          public static org.hibernate.criterion.SimpleProjection distance_pointToLine(com.vividsolutions.jts.geom.Point point,
                                                                      String lineStringColumnName)

      projection to get the distance_sphere between a point and a LineString
      Parameters:
        `point` - the point to get the distance
        `lineStringColumnName` - the name of the lineString column
      Returns:
        the projection
      See Also:
        `distance(Point, String)`

    - #### distance_sphere

          public static org.hibernate.criterion.SimpleProjection distance_sphere(com.vividsolutions.jts.geom.Point point,
                                                                 String locationColumnName)

      projection to get the distance_sphere of a point if you're on a Cartesian ref use `distance(Point, String)`
      Parameters:
        `point` - the point to get the distance
        `locationColumnName` - the name of the column we want the distance
      Returns:
        the projection
      See Also:
        `distance(Point, String)`

    - #### distance

          public static org.hibernate.criterion.SimpleProjection distance(com.vividsolutions.jts.geom.Point point,
                                                          String locationColumnName)

      projection to get the distance from a point if you're on a lat/long ref, use @link `distance_sphere(Point, String)`
      Parameters:
        `point` - the point to get the distance
        `locationColumnName` - the name of the column we want the distance
      Returns:
        the projection
      See Also:
        `distance_sphere(Point, String)`

Copyright © 2015. All rights reserved.