Inheritance diagram for code::PolyLineShapeType:

Public Types | |
| ESRI_Null = 0 | |
| ESRI_Point = 1 | |
| ESRI_PolyLine = 3 | |
| ESRI_Polygon = 5 | |
| ESRI_MultiPoint = 8 | |
| ESRI_PointZ = 11 | |
| ESRI_PolyLineZ = 13 | |
| ESRI_PolygonZ = 15 | |
| ESRI_MultipointZ = 18 | |
| ESRI_PointM = 21 | |
| ESRI_PolyLineM = 23 | |
| ESRI_PolygonM = 25 | |
| ESRI_MultipointM = 28 | |
| ESRI_MultiPatch = 31 | |
| enum | ESRI_Shape { ESRI_Null = 0, ESRI_Point = 1, ESRI_PolyLine = 3, ESRI_Polygon = 5, ESRI_MultiPoint = 8, ESRI_PointZ = 11, ESRI_PolyLineZ = 13, ESRI_PolygonZ = 15, ESRI_MultipointZ = 18, ESRI_PointM = 21, ESRI_PolyLineM = 23, ESRI_PolygonM = 25, ESRI_MultipointM = 28, ESRI_MultiPatch = 31 } |
Public Member Functions | |
| PolyLineShapeType () | |
| virtual | ~PolyLineShapeType () |
| size_t | numLines () const |
| std::pair< size_t, size_t > | getLine (size_t i) const |
| Returns the starting index into the pts array and one past the ending index for the ith line's end-points ( i is [0,numLines) ). | |
| virtual void | createObject (InputStream &is) throw (std::string) |
| Fill the object with the InputStream. | |
| virtual void | createNetworkFormat (OutputStream &os) const |
| Write a network representation into the stream. | |
Static Public Member Functions | |
| static SmartPtr< ShapeType > | createShape (int type) |
Public Attributes | |
| double | minx |
| double | miny |
| double | maxx |
| double | maxy |
| int | num_parts |
| A polyline shape type is comprised of lines. | |
| int | num_pts |
| std::vector< int > | parts |
| std::vector< PointShapeType > | pts |
| ESRI_Shape | type |
| ESRI's types . | |
enum code::ShapeType::ESRI_Shape [inherited] |
| code::PolyLineShapeType::PolyLineShapeType | ( | ) |
| virtual code::PolyLineShapeType::~PolyLineShapeType | ( | ) | [inline, virtual] |
| virtual void code::PolyLineShapeType::createNetworkFormat | ( | OutputStream & | os | ) | const [virtual] |
Write a network representation into the stream.
The shape type is also written in and should not be written before hand. NOTE: ESRI's data are stored in Intel format. So, these createObject and getNetworkFormat functions should be invoked on an Intel-byte ordered stream.
Implements code::ShapeType.
| virtual void code::PolyLineShapeType::createObject | ( | InputStream & | is | ) | throw (std::string) [virtual] |
Fill the object with the InputStream.
the first integer should be used to obtain the right ShapeType to invoke this function on. NOTE: ESRI's data are stored in Intel format. So, these createObject and getNetworkFormat functions should be invoked on an Intel-byte ordered stream.
Implements code::ShapeType.
| std::pair<size_t,size_t> code::PolyLineShapeType::getLine | ( | size_t | i | ) | const |
Returns the starting index into the pts array and one past the ending index for the ith line's end-points ( i is [0,numLines) ).
Example usage of this function to obtain a linestrip:
for (int i=0; i < maxShapes; ++i){
const PolyLineShapeType* polyshape =
ConstDynamicCast<ShapeType>( &(shp.getShapeType(i)) ).
get<PolyLineShapeType>();
if ( polyshape == 0 ){
ErrorLogSevere << "Not a valid PolyLine shape!\n";
return;
}
for (size_t s=0; s < polyshape->numLines(); ++s){
cout << "Next line strip is:\n\t";
std::pair<size_t,size_t> endpts = polyshape->getLine(s);
for (size_t j=endpts.first; j < endpts.second; ++j)
{
cout << polyshape->pts[j].getLocation().getLatitude() << ","
<< polyshape->pts[j].getLocation().getLongitude()<< " ";
}
cout << "\n\n";
}
}
| size_t code::PolyLineShapeType::numLines | ( | ) | const [inline] |
A polyline shape type is comprised of lines.
The parts array provides an index to the pts array. This index is the starting point for this part.
| std::vector<int> code::PolyLineShapeType::parts |
| std::vector<PointShapeType> code::PolyLineShapeType::pts |
ESRI_Shape code::ShapeType::type [inherited] |
ESRI's types .
.. 0 is Null, 1 is Point, etc.
1.4.7