FDO .NET API Reference Feature Data Objects
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

OSGeo::FDO::Spatial::SpatialUtility Class Reference

List of all members.

Detailed Description

A Spatial utility class.


Static Public Member Functions

OSGeo::FDO::Geometry::IGeometryApproximateGeometryWithLineStrings (OSGeo::FDO::Geometry::IGeometry *geometry, System::Double maxSpacing, System::Double maxOffset, OSGeo::FDO::Geometry::GeometryFactoryAbstract *geometryFactory)
 Approximates a geometry, which may contain parametric curve components, with a geometry that only contains straight, linear components.
System::Double ComputeLinearRingArea (OSGeo::FDO::Geometry::ILinearRing *ring)
 Computes the area of a ring.
System::Double ComputeLinearRingLength (OSGeo::FDO::Geometry::ILinearRing *ring)
 Computes the length (perimeter) of a ring.
OSGeo::FDO::Geometry::IGeometryCreateGeometryFromRings (OSGeo::FDO::Geometry::LinearRingCollection *rings, System::Boolean relateRings)
 Creates a Polygon or a MultiPolygon from a collection of rings.
System::Boolean Evaluate (OSGeo::FDO::Geometry::IGeometry *g1, OSGeo::FDO::Filter::SpatialOperations op, OSGeo::FDO::Geometry::IGeometry *g2)
 Evaluates if two FDO geometric objects spatially interact with each other based on a user supplied spatial operator. For example: Contains, Crosses, Disjoint, Equals, Intersects, Overlaps, Touches, Within, CoveredBy, Inside, EnvelopeIntersects.
System::Void GetExtents (System::Byte bytes[], System::Double *minX, System::Double *minY, System::Double *minZ, System::Double *maxX, System::Double *maxY, System::Double *maxZ)
 Gets the extents of a geometry contained in a byte array.
System::Void GetExtents (System::Byte bytes[], System::Double *minX, System::Double *minY, System::Double *maxX, System::Double *maxY)
 Gets the extents of a geometry contained in a byte array.
System::Boolean IsCircularArcValid (OSGeo::FDO::Geometry::ICircularArcSegment *arc, System::Double tolerance)
 Checks the geometric validity of a circular arc. E.g. Checks whether the points describing the arc are collinear within a tolerance.
System::Boolean PointInPolygon (OSGeo::FDO::Geometry::IPolygon *polygon, System::Double coordinateX, System::Double coordinateY)
 Tests whether a point is within a polygon (including its islands) or not.
System::Boolean PointInPolygon (OSGeo::FDO::Geometry::IPolygon *polygon, System::Double coordinateX, System::Double coordinateY, System::Boolean *isOnExtBoundary)
 Tests whether a point is within a polygon (including its islands) or not.
System::Boolean PointInPolygon (OSGeo::FDO::Geometry::IPolygon *polygon, System::Double coordinateX, System::Double coordinateY, System::Boolean *isOnExtBoundary, System::Boolean *isOnInBoundary)
 Tests whether a point is within a polygon (including its islands) or not.
System::Boolean PointInRing (OSGeo::FDO::Geometry::ILinearRing *ring, System::Double coordinateX, System::Double coordinateY)
 Tests whether a point is within a ring or not.
System::Boolean PointInRing (OSGeo::FDO::Geometry::ILinearRing *ring, System::Double coordinateX, System::Double coordinateY, System::Boolean *isOnBoundary)
 Tests whether a point is within a ring or not.
OSGeo::FDO::Geometry::IGeometryTesselateCurve (OSGeo::FDO::Geometry::IGeometry *curve)
 Tesselates a curve geometry into a set of line strings that approximate the curve geometry.
OSGeo::FDO::Spatial::SpatialGeometryValidity ValidateGeometryByType (OSGeo::FDO::Geometry::IGeometry *geometry, OSGeo::FDO::Common::GeometryType geometryTypes[], OSGeo::FDO::Common::GeometryComponentType geometryComponentTypes[], System::Int32 dimensionality)
 Tests whether a geometry can be supported using the given types and dimensionality.

Member Function Documentation

OSGeo ::FDO ::Geometry ::IGeometry* OSGeo::FDO::Spatial::SpatialUtility::ApproximateGeometryWithLineStrings OSGeo::FDO::Geometry::IGeometry geometry,
System::Double  maxSpacing,
System::Double  maxOffset,
OSGeo::FDO::Geometry::GeometryFactoryAbstract geometryFactory
[static]
 

Approximates a geometry, which may contain parametric curve components, with a geometry that only contains straight, linear components.

Remarks:
If the given geometry does not require approximation, this method returns the input geometry, and thus avoids unnecessary object creation. Tolerances are in same units as the geometry's ordinates. If the given tolerances are both zero, a tesselated geometry is produced, wherein arcs are represented using only their three defining positions. Math performed is all in implicit Cartesian (rectilinear) coordinate system. Measurement ("M") ordinates of interpolated positions undergo linear interpolation from an arc's start position to end position (possibly disregarding an "M" ordinate in the arc's mid position). Unless the arc is too short for any interpolation, the "mid" point parameter used to define arcs is not guaranteed to appear among interpolated points.
Parameters:
geometry Input Geometry to approximate
maxSpacing Input Maximum length of each line segment used to approximate parametric curves. Ignored if zero.
maxOffset Input Maximum distance that a line segment may be from the curve that it approximates (error tolerance). Ignored if zero.
geometryFactory Input Geometry factory for the creation of the approximated geometry.
Returns:
Returns An approximation of the given geometry.

System::Double OSGeo::FDO::Spatial::SpatialUtility::ComputeLinearRingArea OSGeo::FDO::Geometry::ILinearRing ring  )  [static]
 

Computes the area of a ring.

Parameters:
ring Input Ring to test
Returns:
Returns The area. The value may be positive (counterclockwise orientation) or negative (clockwise orientation)

System::Double OSGeo::FDO::Spatial::SpatialUtility::ComputeLinearRingLength OSGeo::FDO::Geometry::ILinearRing ring  )  [static]
 

Computes the length (perimeter) of a ring.

Parameters:
ring Input Ring to test
Returns:
Returns The length.

OSGeo ::FDO ::Geometry ::IGeometry* OSGeo::FDO::Spatial::SpatialUtility::CreateGeometryFromRings OSGeo::FDO::Geometry::LinearRingCollection rings,
System::Boolean  relateRings
[static]
 

Creates a Polygon or a MultiPolygon from a collection of rings.

Remarks:
/
Parameters:
rings Input Collection of rings
relateRings Input Flag indicating if polygon formation is desired. If not desired (FALSE) a MultiPolygon containing only external polygons will be returned. When TRUE, the rings will be associated with each other, resulting in a polygon(s) with exterior/interior rings.
Returns:
Returns The geometry containing the input rings.
Given a collection of rings the method may return, depending on flag relateRings:

System::Boolean OSGeo::FDO::Spatial::SpatialUtility::Evaluate OSGeo::FDO::Geometry::IGeometry g1,
OSGeo::FDO::Filter::SpatialOperations  op,
OSGeo::FDO::Geometry::IGeometry g2
[static]
 

Evaluates if two FDO geometric objects spatially interact with each other based on a user supplied spatial operator. For example: Contains, Crosses, Disjoint, Equals, Intersects, Overlaps, Touches, Within, CoveredBy, Inside, EnvelopeIntersects.

Parameters:
g1 Input Left hand Geometry to Evaluate
op Input The spatial operation to apply to the left and right hand geometries
g2 Input Right hand Geometry to Evaluate
Returns:
Returns The tesselated Geometry.

System::Void OSGeo::FDO::Spatial::SpatialUtility::GetExtents System::Byte  bytes[],
System::Double *  minX,
System::Double *  minY,
System::Double *  minZ,
System::Double *  maxX,
System::Double *  maxY,
System::Double *  maxZ
[static]
 

Gets the extents of a geometry contained in a byte array.

Parameters:
bytes Input Geometry whose extents will be returned
minX Output The minimim x position of the geometry
minY Output The minimim y position of the geometry
minZ Output The minimim z position of the geometry
maxX Output The maximum x position of the geometry
maxY Output The maximum y position of the geometry
maxZ Output The maximum z position of the geometry

System::Void OSGeo::FDO::Spatial::SpatialUtility::GetExtents System::Byte  bytes[],
System::Double *  minX,
System::Double *  minY,
System::Double *  maxX,
System::Double *  maxY
[static]
 

Gets the extents of a geometry contained in a byte array.

Parameters:
bytes Input Geometry whose extents will be returned
minX Output The minimim x position of the geometry
minY Output The minimim y position of the geometry
maxX Output The maximum x position of the geometry
maxY Output The maximum y position of the geometry

System::Boolean OSGeo::FDO::Spatial::SpatialUtility::IsCircularArcValid OSGeo::FDO::Geometry::ICircularArcSegment arc,
System::Double  tolerance
[static]
 

Checks the geometric validity of a circular arc. E.g. Checks whether the points describing the arc are collinear within a tolerance.

Parameters:
arc Input Circular arc to test
tolerance Input Allowed tolerance
Returns:
Returns Flag indicating whether the arc has collinear points.

System::Boolean OSGeo::FDO::Spatial::SpatialUtility::PointInPolygon OSGeo::FDO::Geometry::IPolygon polygon,
System::Double  coordinateX,
System::Double  coordinateY
[static]
 

Tests whether a point is within a polygon (including its islands) or not.

Parameters:
polygon Input Polygon to test
coordinateX Input X ordinate.
coordinateY Input Y ordinate.
Returns:
Returns TRUE if the point is within polygon or on its boundary, FALSE otherwise.

System::Boolean OSGeo::FDO::Spatial::SpatialUtility::PointInPolygon OSGeo::FDO::Geometry::IPolygon polygon,
System::Double  coordinateX,
System::Double  coordinateY,
System::Boolean *  isOnExtBoundary
[static]
 

Tests whether a point is within a polygon (including its islands) or not.

Parameters:
polygon Input Polygon to test
coordinateX Input X ordinate.
coordinateY Input Y ordinate.
isOnExtBoundary Output Specifies if the specified point is on the exterior boundary of the polygon.
Returns:
Returns TRUE if the point is within polygon or on its boundary, FALSE otherwise.

System::Boolean OSGeo::FDO::Spatial::SpatialUtility::PointInPolygon OSGeo::FDO::Geometry::IPolygon polygon,
System::Double  coordinateX,
System::Double  coordinateY,
System::Boolean *  isOnExtBoundary,
System::Boolean *  isOnInBoundary
[static]
 

Tests whether a point is within a polygon (including its islands) or not.

Parameters:
polygon Input Polygon to test
coordinateX Input X ordinate.
coordinateY Input Y ordinate.
isOnExtBoundary Output Specifies if the specified point is on the exterior boundary of the polygon.
isOnInBoundary Output Specifies if the specified point is on the interior boundary of the polygon.
Returns:
Returns TRUE if the point is within polygon or on its boundary, FALSE otherwise.

System::Boolean OSGeo::FDO::Spatial::SpatialUtility::PointInRing OSGeo::FDO::Geometry::ILinearRing ring,
System::Double  coordinateX,
System::Double  coordinateY
[static]
 

Tests whether a point is within a ring or not.

Parameters:
ring Input Ring to test
coordinateX Input X ordinate.
coordinateY Input Y ordinate.
Returns:
Returns TRUE if the point is within ring or on its boundary, FALSE otherwise.

System::Boolean OSGeo::FDO::Spatial::SpatialUtility::PointInRing OSGeo::FDO::Geometry::ILinearRing ring,
System::Double  coordinateX,
System::Double  coordinateY,
System::Boolean *  isOnBoundary
[static]
 

Tests whether a point is within a ring or not.

Parameters:
ring Input Ring to test
coordinateX Input X ordinate.
coordinateY Input Y ordinate.
isOnBoundary Output Specifies if the specified point is on the boundary of the ring.
Returns:
Returns TRUE if the point is within ring or on its boundary, FALSE otherwise.

OSGeo ::FDO ::Geometry ::IGeometry* OSGeo::FDO::Spatial::SpatialUtility::TesselateCurve OSGeo::FDO::Geometry::IGeometry curve  )  [static]
 

Tesselates a curve geometry into a set of line strings that approximate the curve geometry.

Parameters:
curve Input Geometry to tesselate
Returns:
Returns The tesselated Geometry.

OSGeo ::FDO ::Spatial ::SpatialGeometryValidity OSGeo::FDO::Spatial::SpatialUtility::ValidateGeometryByType OSGeo::FDO::Geometry::IGeometry geometry,
OSGeo::FDO::Common::GeometryType  geometryTypes[],
OSGeo::FDO::Common::GeometryComponentType  geometryComponentTypes[],
System::Int32  dimensionality
[static]
 

Tests whether a geometry can be supported using the given types and dimensionality.

Parameters:
geometry Input Geometry to validate
geometryTypes Input Array of allowed geometry types. NULL is valid if geometryTypesCount is zero.
geometryComponentTypes Input Array of allowed geometry component types. NULL is valid if geometryComponentTypesCount is zero.
dimensionality Input Bit-mask of allowed dimensionalities (see Dimensionality).
Returns:
Returns An enumeration indicating support for the given geometry.

Comments or suggestions? Send us feedback.