|
GDAL
|
Triangle class. More...
#include <ogr_geometry.h>
Public Member Functions | |
| OGRTriangle () | |
| Constructor. | |
| OGRTriangle (const OGRPoint &p, const OGRPoint &q, const OGRPoint &r) | |
| Construct a triangle from points. | |
| OGRTriangle (const OGRTriangle &other) | |
| Copy constructor. | |
| OGRTriangle (const OGRPolygon &other, OGRErr &eErr) | |
| Constructs an OGRTriangle from a valid OGRPolygon. | |
| OGRTriangle & | operator= (const OGRTriangle &other) |
| Assignment operator. | |
| virtual | ~OGRTriangle () |
| Destructor. | |
| virtual const char * | getGeometryName () const CPL_OVERRIDE |
| Fetch WKT name for geometry type. | |
| virtual OGRwkbGeometryType | getGeometryType () const CPL_OVERRIDE |
| Fetch geometry type. | |
| virtual OGRErr | importFromWkb (unsigned char *, int=-1, OGRwkbVariant=wkbVariantOldOgc) CPL_OVERRIDE |
| Assign geometry from well known binary data. | |
| virtual OGRErr | addRingDirectly (OGRCurve *poNewRing) CPL_OVERRIDE |
| Add a ring to a polygon. | |
Triangle class.
| OGRTriangle::OGRTriangle | ( | const OGRPoint & | p, |
| const OGRPoint & | q, | ||
| const OGRPoint & | r | ||
| ) |
Construct a triangle from points.
| p | Point 1 |
| q | Point 2 |
| r | Point 3 |
| OGRTriangle::OGRTriangle | ( | const OGRPolygon & | other, |
| OGRErr & | eErr | ||
| ) |
Constructs an OGRTriangle from a valid OGRPolygon.
In case of error, NULL is returned.
| other | the Polygon we wish to construct a triangle from |
| eErr | encapsulates an error code; contains OGRERR_NONE if the triangle is constructed successfully |
| OGRTriangle::~OGRTriangle | ( | ) | [virtual] |
Destructor.
| OGRErr OGRTriangle::addRingDirectly | ( | OGRCurve * | poNewRing | ) | [virtual] |
Add a ring to a polygon.
If the polygon has no external ring (it is empty) this will be used as the external ring, otherwise it is used as an internal ring. Ownership of the passed ring is assumed by the OGRCurvePolygon, but otherwise this method operates the same as OGRCurvePolygon::AddRing().
This method has no SFCOM analog.
| poNewRing | ring to be added to the polygon. |
Reimplemented from OGRCurvePolygon.
| const char * OGRTriangle::getGeometryName | ( | ) | const [virtual] |
Fetch WKT name for geometry type.
There is no SFCOM analog to this method.
This method is the same as the C function OGR_G_GetGeometryName().
Reimplemented from OGRPolygon.
| OGRwkbGeometryType OGRTriangle::getGeometryType | ( | ) | const [virtual] |
Fetch geometry type.
Note that the geometry type may include the 2.5D flag. To get a 2D flattened version of the geometry type apply the wkbFlatten() macro to the return result.
This method is the same as the C function OGR_G_GetGeometryType().
Reimplemented from OGRPolygon.
| OGRErr OGRTriangle::importFromWkb | ( | unsigned char * | pabyData, |
| int | nSize = -1, |
||
| OGRwkbVariant | eWkbVariant = wkbVariantOldOgc |
||
| ) | [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().
| pabyData | the binary input data. |
| nSize | the size of pabyData in bytes, or zero if not known. |
| eWkbVariant | if wkbVariantPostGIS1, special interpretation is done for curve geometries code |
Reimplemented from OGRPolygon.
| OGRTriangle & OGRTriangle::operator= | ( | const OGRTriangle & | other | ) |
Assignment operator.
| other | A triangle passed as a parameter |
1.7.6.1.