com.ibm.geolib.geom

Interface GeometryFactory



  • public interface GeometryFactory
    Geometry factory interface for the creation of the supported geometry types
    • Method Detail

      • getPolygon

        Polygon getPolygon(LinearRing exteriorBoundary)
        Create a polygon given its exterior boundary
        Parameters:
        exteriorBoundary - of the requested polygon
        Returns:
        a polygon
      • getPolygon

        Polygon getPolygon(LinearRing exteriorBoundary,
                         boolean allowNonSimplicity)
        Create a polygon given its exterior boundary with option create a non-simple polygon
        Parameters:
        exteriorBoundary - of the requested polygon
        allowNonSimplicity - if true then do not enforce simplicity of the polygon
        Returns:
        a polygon
      • getPolygon

        Polygon getPolygon(Point firstVertex,
                         Point... restOfVertices)
        Create a polygon given its exterior boundary vertices. The polygon defined with this method will have no associated holes
        Parameters:
        firstVertex -
        restOfVertices -
        Returns:
        a polygon
      • getPolygon

        Polygon getPolygon(java.util.List<Point> vertices)
        Create a polygon given a list of its exterior boundary vertices. The polygon defined with this method will have no associated holes
        Parameters:
        vertices -
        Returns:
        a polygon
      • getPolygon

        Polygon getPolygon(java.util.List<Point> vertices,
                         boolean allowNonSimplicity)
        Create a polygon given a list of its exterior boundary vertices, with option to create a non-simple polygon. The polygon defined with this method will have no associated holes
        Parameters:
        vertices -
        allowNonSimplicity - if true then do not enforce simplicity of the polygon
        Returns:
        a polygon
      • getPolygon

        Polygon getPolygon(LinearRing exteriorBoundary,
                         LinearRing... restOfInteriorBoundaries)
        Create a polygon given its exterior boundary and a collection of holes
        Parameters:
        exteriorBoundary - of the requested polygon
        interiorBoundary - - a hole in the polygon
        restOfInteriorBoundaries - are rest of holes inside the requested polygon
        Returns:
        a polygon
      • getPolygon

        Polygon getPolygon(LinearRing exteriorBoundary,
                         java.lang.Iterable<LinearRing> interiorBoundaries)
        Create a polygon given its exterior boundary and a collection of holes
        Parameters:
        exteriorBoundary - of the requested polygon
        interiorBoundaries - are holes inside the requested polygon
        Returns:
        a polygon
      • getPolygon

        Polygon getPolygon(LinearRing exteriorBoundary,
                         java.lang.Iterable<LinearRing> interiorBoundaries,
                         boolean allowNonSimplicity)
      • getLineString

        LineString getLineString(Point firstVertex,
                               Point... restOfVertices)
        Create a line string given its vertices.
        Parameters:
        firstVertex -
        restOfVertices -
        Returns:
        a line string
      • getLineString

        LineString getLineString(java.util.List<Point> vertices)
        Create a line string given a list of vertices. The list must not be empty.
        Parameters:
        vertices -
        Returns:
        a line string
      • getLine

        Line getLine(Point firstVertex,
                   Point secondVertex)
        Create a line segment given its two end points.
        Parameters:
        firstVertex -
        restOfVertices -
        Returns:
        a line string
      • getVector

        Vector getVector(double... coords)
        Create a vector given its coordinates.
        Parameters:
        coordinates -
      • getLinearRing

        LinearRing getLinearRing(Point firstVertex,
                               Point... restOfVertices)
        Create a linear ring given its vertices.
        Parameters:
        firstVertex -
        restOfVertices. - The last vertex doesn't have to close the ring and be equal to the first one
        Returns:
        a line ring out of the given vertices
      • getLinearRing

        LinearRing getLinearRing(java.util.List<Point> vertices)
        Create a linear ring given a list of vertices
        Parameters:
        vertices - of the ring. The last vertex doesn't have to close the ring and be equal to the first one
        Returns:
        a line ring out of the given vertices
      • getPoint

        Point getPoint(CoordinateReferenceSystem crs,
                     double coord1,
                     double coord2)
        Create a point in the specified 2-dimensional coordinate reference system
        Parameters:
        crs - the required coordinate reference system
        coord1 - - first coordinate
        coord2 - - second coordinate
        Returns:
        a point geometry in the specified coordinate reference system
      • getPoint

        Point getPoint(CoordinateReferenceSystem crs,
                     double coord1,
                     double coord2,
                     double coord3)
        Create a point in the specified 3-dimensional coordinate reference system
        Parameters:
        crs - the required coordinate reference system
        coord1 - - first coordinate
        coord2 - - second coordinate
        coord3 - - third coordinate
        Returns:
        a point geometry in the specified coordinate reference system
      • getPoint

        Point getPoint(CoordinateReferenceSystem crs,
                     double... coordinates)
        Create a point in the specified coordinate reference system
        Parameters:
        crs - the required coordinate reference system
        coordinates - coordinates
        Returns:
        a point geometry in the specified coordinate reference system
      • getPoint

        Point getPoint(double longitude,
                     double latitude)
        Create a point in geographic coordinate system (longitude, latitude)
        Parameters:
        longitude -
        latitude -
        Returns:
        a point geometry in the geographic coordinate system
      • getMultiGeometry

        MultiGeometry getMultiGeometry(java.lang.Iterable<Geometry> geometries)
        Create multi-geometry object of mixed geometry type - each member can be of a different Geometry type
        Parameters:
        geometries -
        Returns:
        multi geometry geometry that holds the given 'geometries'
      • getMultiGeometry

        MultiGeometry getMultiGeometry(Geometry... geometries)
        Create multi-geometry object of mixed geometry type - each member can be of a different Geometry type
        Parameters:
        geometries -
        Returns:
        multi geometry geometry that holds the given 'geometries'
      • getMultiPoint

        MultiPoint getMultiPoint(Point... points)
        Creates a MultiPoint geometry
        Parameters:
        points -
        Returns:
        a multi-point geometry composed of the given 'points'
      • getMultiPoint

        MultiPoint getMultiPoint(java.lang.Iterable<Point> points)
        Creates a MultiPoint geometry
        Parameters:
        points -
        Returns:
        a multi-point geometry composed of the given 'points'
      • getMultiPolygon

        MultiPolygon getMultiPolygon(Polygon... polygons)
        Creates a MultiPolygon geometry
        Parameters:
        polygons -
        Returns:
        a multi-polygon geometry composed of the given 'polygons'
      • getMultiPolygon

        MultiPolygon getMultiPolygon(java.lang.Iterable<Polygon> polygons)
        Creates a MultiPolygon geometry
        Parameters:
        polygons -
        Returns:
        a multi-polygon geometry composed of the given 'polygons'
      • getMultiLinearRing

        MultiLinearRing getMultiLinearRing(LinearRing... linearRings)
        Create a multi-linear ring
        Parameters:
        linearRings -
        Returns:
        a multi-linear ring geometry composed of the given linear rings
      • getMultiLinearRing

        MultiLinearRing getMultiLinearRing(java.lang.Iterable<LinearRing> linearRings)
        Create a multi-linear ring
        Parameters:
        linearRings -
        Returns:
        a multi-linear ring geometry composed of the given linear rings
      • getMultiLineString

        MultiLineString getMultiLineString(LineString... lineStrings)
        Create a multi-line string
        Parameters:
        lineStrings -
        Returns:
        a multi-line string geometry composed of the given line strings
      • getMultiLineString

        MultiLineString getMultiLineString(java.lang.Iterable<LineString> lineStrings)
        Create a multi-line string
        Parameters:
        lineStrings -
        Returns:
        a multi-line string geometry composed of the given line strings
      • getBoundingBox

        BBox getBoundingBox(Point lowerLeft,
                          Point topRight)
        Create a bounding box
        Parameters:
        lowerLeft -
        topRight -
        Returns:
        a bounding box with specified range
      • getPolygonalRepresentation

        Surface getPolygonalRepresentation(BBox bBOx)
        Create a polygonal representation of the bounding box
        Parameters:
        bBOx -
        Returns:
        a polygonal representation of the bounding box
      • coordsToPoints

        java.util.List<Point> coordsToPoints(CoordinateReferenceSystem crs,
                                           double[][] coords)
        Create a list of points from a 2-dimensional array of coordinates.
        Parameters:
        crs - coordinate reference system
        coords - 2-dimensional array of coordinates. An coords[i] element is an array of coordinates for the i-th point
        Returns:
        the list of points
      • coordsToPoints

        java.util.List<Point> coordsToPoints(double[][] coords)
        Create a list of points from a 2-dimensional array of coordinates, in the geographic coordinate system (lon, lat)
        Parameters:
        coords - 2-dimensional array of coordinates. An coords[i] element is an array of coordinates for the i-th point
        Returns:
        the list of points
      • coordsToPointsArray

        Point[] coordsToPointsArray(CoordinateReferenceSystem crs,
                                  double[][] coords)
        Create an array of points from a 2-dimensional array of coordinates.
        Parameters:
        crs - coordinate reference system
        coords - 2-dimensional array of coordinates. An coords[i] element is an array of coordinates for the i-th point
        Returns:
        the array of points
      • coordsToPointsArray

        Point[] coordsToPointsArray(double[][] coords)
        Create an array of points from a 2-dimensional array of coordinates in the geographic coordinate system (lon, lat)
        Parameters:
        crs - coordinate reference system
        coords - 2-dimensional array of coordinates. An coords[i] element is an array of coordinates for the i-th point
        Returns:
        the array of points

© Copyright IBM 2017