File Geodatabase API
FileGDBAPI::MultiPartShapeBuffer Class Reference

MultiPart Shape Buffer accessor functions. More...

Inherits FileGDBAPI::ShapeBuffer.

Public Member Functions

fgdbError GetExtent (double *&extent) const
 Get a pointer to the geomtries extent. More...
 
fgdbError GetNumParts (int &numParts) const
 Get the number of parts. More...
 
fgdbError GetNumPoints (int &numPoints) const
 Get the number of coordinates in the geometry. More...
 
fgdbError GetParts (int *&parts) const
 Get a pointer to the parts array. More...
 
fgdbError GetPoints (Point *&points) const
 Get a pointer to the point array. More...
 
fgdbError GetZExtent (double *&zExtent) const
 Get a pointer to the z extent. More...
 
fgdbError GetZs (double *&zArray) const
 Get a pointer to the z array. More...
 
fgdbError GetMExtent (double *&mExtent) const
 Get a pointer to the m extent. More...
 
fgdbError GetMs (double *&mArray) const
 Get a pointer to the m array. More...
 
fgdbError GetNumCurves (int &numCurves) const
 Get the number of curves in the geometry. More...
 
fgdbError GetCurves (byte *&curves) const
 Get a pointer to the curve array. More...
 
fgdbError GetIDs (int *&ids) const
 Get a pointer to the id array. More...
 
fgdbError Setup (ShapeType shapeType, int numParts, int numPoints, int numCurves=0)
 Setup a shape buffer for insert. More...
 
fgdbError CalculateExtent (void)
 Calculates the extent for the shape after all of the coordinate arrays have been filled. More...
 
fgdbError PackCurves (void)
 Remove excess space allocated for curves. More...
 
- Public Member Functions inherited from FileGDBAPI::ShapeBuffer
bool Allocate (size_t length)
 Allocates a byte array of the specified size. More...
 
bool IsEmpty (void) const
 Is the ShapeBuffer empty. More...
 
void SetEmpty (void)
 Set the ShapeBuffer empty.
 
fgdbError GetShapeType (ShapeType &shapeType) const
 Gets the shape type from the shape buffer. More...
 
fgdbError GetGeometryType (GeometryType &geometryType) const
 Gets the geometry type which corresponds to the shape type in the shape buffer. More...
 
 ShapeBuffer (size_t length=0)
 The class constructor.
 
virtual ~ShapeBuffer ()
 The class destructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from FileGDBAPI::ShapeBuffer
static bool HasZs (ShapeType shapeType)
 Does the shape buffer contain Z values. More...
 
static bool HasMs (ShapeType shapeType)
 Does the shape buffer contain Ms. More...
 
static bool HasIDs (ShapeType shapeType)
 Does the shape buffer contain IDs. More...
 
static bool HasCurves (ShapeType shapeType)
 Does the shape buffer contain Curves. More...
 
static bool HasNormals (ShapeType shapeType)
 Does the shape buffer includes Normals. More...
 
static bool HasTextures (ShapeType shapeType)
 Does the shape buffer include Textures. More...
 
static bool HasMaterials (ShapeType shapeType)
 Does the shape buffer include Materials. More...
 
static GeometryType GetGeometryType (ShapeType shapeType)
 Gets the geometry type from a shape type. More...
 
- Public Attributes inherited from FileGDBAPI::ShapeBuffer
byte * shapeBuffer
 The underlying byte array.
 
size_t allocatedLength
 The capacity of the byte array.
 
size_t inUseLength
 The number of bytes being used in the array.
 

Detailed Description

MultiPart Shape Buffer accessor functions.

These functions provide access to the shape buffer. Consult the extended shapefile format document for the buffer layout. When reading a multipart shape buffer you should first create the appropriate shape buffer, get the geometry, get the number of points, get the number of parts, get the number of curves, get a pointer to the part array, get a pointer to the point array, and, if present pointers to the z, m, and id arrays. To write a multipart shape buffer create a row buffer, create a shape buffer, set up the shape buffer, get the points, assign the coordinates to the point array, get the part array and populate the array as needed, and if needed get the z, m, id and curve arrays and populate, calculate the extent of the geometry, set the geometry and insert the row. If curves were added Pact the curves before setting the geometry. To improve load use Table::LoadOnlyMode. Set it to true before you insert any rows and set it too false when finished. If all grid size values in the spatial index are zero, the values will be calculated based on the existing geometries.

Member Function Documentation

fgdbError FileGDBAPI::MultiPartShapeBuffer::GetExtent ( double *&  extent) const

Get a pointer to the geomtries extent.

Parameters
[out]extentA pointer to the geometries extent.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::GetNumParts ( int &  numParts) const

Get the number of parts.

Parameters
[out]numPartsThe number of parts in the geometry.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::GetNumPoints ( int &  numPoints) const

Get the number of coordinates in the geometry.

Parameters
[out]numPointsThe number of points.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::GetParts ( int *&  parts) const

Get a pointer to the parts array.

Parameters
[out]partsA pointer to the parts array.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::GetPoints ( Point *&  points) const

Get a pointer to the point array.

Parameters
[out]pointsA pointer to the point array.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::GetZExtent ( double *&  zExtent) const

Get a pointer to the z extent.

Parameters
[out]zExtentA pointer to the z extent.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::GetZs ( double *&  zArray) const

Get a pointer to the z array.

Parameters
[out]zArrayA pointer to the z array.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::GetMExtent ( double *&  mExtent) const

Get a pointer to the m extent.

Parameters
[out]mExtentA pointer to the m extent.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::GetMs ( double *&  mArray) const

Get a pointer to the m array.

Parameters
[out]mArrayA pointer to the m array.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::GetNumCurves ( int &  numCurves) const

Get the number of curves in the geometry.

Parameters
[out]numCurvesThe number of curves.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::GetCurves ( byte *&  curves) const

Get a pointer to the curve array.

Parameters
[out]curvesA pointer to the curve array.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::GetIDs ( int *&  ids) const

Get a pointer to the id array.

Parameters
[out]idsA pointer to the id array.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::Setup ( ShapeType  shapeType,
int  numParts,
int  numPoints,
int  numCurves = 0 
)

Setup a shape buffer for insert.

Allocates the correct length buffer for the selected shape type.

Parameters
[in]shapeTypeThe shape type of the buffer. Shape Type
[in]numPartsThe number of parts that the geometry will contain.
[in]numPointsThe number of points that the geometry will contain.
[in]numCurvesThe number of curves that the geometry will contain, defaults to zero.
Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::CalculateExtent ( void  )

Calculates the extent for the shape after all of the coordinate arrays have been filled.

Returns
Error code indicating whether the method finished successfully.
fgdbError FileGDBAPI::MultiPartShapeBuffer::PackCurves ( void  )

Remove excess space allocated for curves.

Setup allocates space for curves based of the max size that could be required. Depending on the curves loaded, all of the allocated space may not be required.

Returns
Error code indicating whether the method finished successfully.