OGRLinearRing Class Reference

#include <ogr_geometry.h>

Inheritance diagram for OGRLinearRing:

OGRLineString OGRCurve OGRGeometry List of all members.

Public Member Functions

virtual int isClockwise () const
virtual void closeRings ()
virtual double get_Area () const
virtual OGRErr importFromWkb (unsigned char *, int=-1)

Friends

class OGRPolygon

Detailed Description

Concrete representation of a closed ring.

This class is functionally equivelent to an OGRLineString, but has a separate identity to maintain alignment with the OpenGIS simple feature data model. It exists to serve as a component of an OGRPolygon.


Member Function Documentation

void OGRLinearRing::closeRings  )  [virtual]
 

Force rings to be closed.

If this geometry, or any contained geometries has polygon rings that are not closed, they will be closed by adding the starting point at the end.

Reimplemented from OGRGeometry.

double OGRLinearRing::get_Area  )  const [virtual]
 

Compute area of ring.

The area is computed according to Green's Theorem:

Area is "Sum(x(i)*y(i+1) - x(i+1)*y(i))/2" for i = 0 to pointCount-1, assuming the last point is a duplicate of the first.

Returns:
computed area.

OGRErr OGRLinearRing::importFromWkb unsigned char *  pabyData,
int  nSize = -1
[virtual]
 

Assign geometry from well known binary data.

The object must have already been instantiated as the correct derived type of geometry object to match the binaries type. This method is used by the OGRGeometryFactory class, but not normally called by application code.

This method relates to the SFCOM IWks::ImportFromWKB() method.

This method is the same as the C function OGR_G_ImportFromWkb().

Parameters:
pabyData the binary input data.
nSize the size of pabyData in bytes, or zero if not known.
Returns:
OGRERR_NONE if all goes well, otherwise any of OGRERR_NOT_ENOUGH_DATA, OGRERR_UNSUPPORTED_GEOMETRY_TYPE, or OGRERR_CORRUPT_DATA may be returned.

Reimplemented from OGRLineString.

int OGRLinearRing::isClockwise  )  const [virtual]
 

Returns TRUE if the ring has clockwise winding.

Returns:
TRUE if clockwise otherwise FALSE.


The documentation for this class was generated from the following files:
Generated on Mon Jan 9 18:03:32 2006 for OGR by  doxygen 1.4.6