Class Geometries


  • public class Geometries
    extends Object
    A Factory for Geometrys

    This Factory allows generically creating Geometries

    Author:
    Karel Maesen, Geovise BVBA creation-date: 5/15/14
    • Constructor Detail

      • Geometries

        public Geometries()
    • Method Detail

      • mkEmptyPoint

        public static <P extends PositionPoint<P> mkEmptyPoint​(CoordinateReferenceSystem<P> crs)
        Creates an empty Point for a coordinate reference system
        Type Parameters:
        P - the type of Position
        Parameters:
        crs - the coordinate reference system for the created Point
        Returns:
        an empty Point with the specified coordinate reference system
      • mkEmptyLineString

        public static <P extends PositionLineString<P> mkEmptyLineString​(CoordinateReferenceSystem<P> crs)
        Creates an empty LineString for a coordinate reference system
        Type Parameters:
        P - the type of Position
        Parameters:
        crs - the coordinate reference system for the created LineString
        Returns:
        an empty LineString with the specified coordinate reference system
      • mkEmptyPolygon

        public static <P extends PositionPolygon<P> mkEmptyPolygon​(CoordinateReferenceSystem<P> crs)
        Creates an empty Polygon for a coordinate reference system
        Type Parameters:
        P - the type of Position
        Parameters:
        crs - the coordinate reference system for the created Polygon
        Returns:
        an empty Polygon with the specified coordinate reference system
      • mkEmptyMultiPoint

        public static <P extends PositionMultiPoint<P> mkEmptyMultiPoint​(CoordinateReferenceSystem<P> crs)
        Creates an empty MultiPoint for a coordinate reference system
        Type Parameters:
        P - the type of Position
        Parameters:
        crs - the coordinate reference system for the created MultiPoint
        Returns:
        an empty MultiPoint with the specified coordinate reference system
      • mkEmptyMultiLineString

        public static <P extends PositionMultiLineString<P> mkEmptyMultiLineString​(CoordinateReferenceSystem<P> crs)
        Creates an empty MultiLineString for a coordinate reference system
        Type Parameters:
        P - the type of Position
        Parameters:
        crs - the coordinate reference system for the created MultiLineString
        Returns:
        an empty MultiLineString with the specified coordinate reference system
      • mkEmptyMultiPolygon

        public static <P extends PositionMultiPolygon<P> mkEmptyMultiPolygon​(CoordinateReferenceSystem<P> crs)
        Creates an empty MultiPolygon for a coordinate reference system
        Type Parameters:
        P - the type of Position
        Parameters:
        crs - the coordinate reference system for the created MultiPolygon
        Returns:
        an empty MultiPolygon with the specified coordinate reference system
      • mkEmptyGeometryCollection

        public static <P extends PositionGeometryCollection<P> mkEmptyGeometryCollection​(CoordinateReferenceSystem<P> crs)
        Creates an empty GeometryCollection for a coordinate reference system
        Type Parameters:
        P - the type of Position
        Parameters:
        crs - the coordinate reference system for the created GeometryCollection
        Returns:
        an empty GeometryCollection with the specified coordinate reference system
      • mkPoint

        public static <P extends PositionPoint<P> mkPoint​(P pos,
                                                            CoordinateReferenceSystem<P> crs)
        Creates a Point from a Position and coordinate reference system
        Type Parameters:
        P - the type of Position
        Parameters:
        pos - the position for the created Point
        crs - the coordinate reference system for the created Point
        Returns:
        a Point with the specified position and coordinate reference system
      • mkLineString

        public static <P extends PositionLineString<P> mkLineString​(PositionSequence<P> seq,
                                                                      CoordinateReferenceSystem<P> crs)
        Creates a LineString from a PositionSequence and coordinate reference system
        Type Parameters:
        P - the type of Position
        Parameters:
        seq - the PositionSequence for the created LineString
        crs - the coordinate reference system for the created LineString
        Returns:
        a LineString with the specified positions and coordinate reference system
      • mkLinearRing

        public static <P extends PositionLinearRing<P> mkLinearRing​(PositionSequence<P> seq,
                                                                      CoordinateReferenceSystem<P> crs)
        Creates a LinearRing from a PositionSequence and coordinate reference system
        Type Parameters:
        P - the type of Position
        Parameters:
        seq - the PositionSequence for the created LinearRing
        crs - the coordinate reference system for the created LinearRing
        Returns:
        a LinearRing with the specified positions and coordinate reference system