38 "ossimEsriShapeFileFilter",
42 static const ossimTrace traceDebug(
"ossimEsriShapeFileFilter:debug");
50 theMaxQuadTreeLevels(10),
51 thePenColor(255,255,255),
52 theBrushColor(255,255,255),
55 thePointWidthHeight(1, 1),
119 <<
"ossimEsriShapeFileFilter::addObject\n" 120 <<
"Can't add objects to layer, must go through Esri loadShapeFile" 130 std::multimap<int, ossimAnnotationObject*>::iterator iter =
theShapeCache.begin();
135 ossimDrect rect = (*iter).second->getBoundingRect();
209 boundsMin[0] = boundsRect.
ul().
x;
210 boundsMin[1] = boundsRect.
lr().
y;
212 boundsMax[0] = boundsRect.
lr().
x;
213 boundsMax[1] = boundsRect.
ul().
y;
226 for(
int i = 0; i <
n; ++i)
228 std::multimap<int, ossimAnnotationObject*>::iterator iter =
theShapeCache.find(array[i]);
229 while( ((*iter).first == array[i]) && (iter !=
theShapeCache.end()) )
243 std::multimap<int, ossimAnnotationObject*>::iterator iter =
theShapeCache.begin();
252 if(!tempGeom)
return;
294 std::multimap<int, ossimAnnotationObject*>::iterator iter =
theShapeCache.begin();
301 (*iter).second->unref();
351 switch(obj.getType())
378 <<
"ossimEsriShapeFileFilter::loadShapeFile\n" 379 <<
"SHAPE " << obj.getTypeByName()
380 <<
" Not supported" << endl;
416 vector<ossimGpt> groundPolygon;
422 <<
"ossimEsriShapeFileFilter::loadPolygon\n" 424 <<
" not supported for shape = " 428 groundPolygon.
clear();
429 for(
ossim_int32 vertexNumber = starti; vertexNumber < endi; ++vertexNumber)
529 vector<ossimGpt> groundPolygon;
535 <<
"ossimEsriShapeFileFilter::loadArc\n" 537 <<
" not supported for shape = " 541 groundPolygon.
clear();
542 for(
ossim_int32 vertexNumber = starti; vertexNumber < endi; ++vertexNumber)
581 const char* prefix)
const 630 border +=
" degrees";
647 newPrefix +=
"view_proj.";
726 else if(s2 ==
"METERS")
730 else if(s2 ==
"FEET")
753 newPrefix +=
"view_proj.";
virtual void computeBoundingRect()
virtual void loadPoint(ossimShapeObject &obj)
void clear()
Erases the entire container.
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
virtual bool isSourceEnabled() const
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
This will return the bounding rect of the source.
virtual void setName(const ossimString &name)
int getPartType(ossim_uint32 partIndex) const
static const char * BRUSH_COLOR_KW
void setProjection(ossimProjection *projection)
Sets the projection to be used for local-to-world coordinate transformation.
static ossimString upcase(const ossimString &aString)
ossimString getTypeByName() const
unsigned char getR() const
ossimDrect theBoundingRect
ossim_uint32 getNumberOfParts() const
double lond() const
Will convert the radian measure to degrees.
virtual void setEllipseWidthHeightUnitType(ossimUnitType type)
void stretchOut(ossimGeoPolygon &newPolygon, double displacement)
virtual SHPHandle getHandle()
Represents serializable keyword/value map.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Attempts to initialize a transform and a projection given the KWL.
const char * find(const char *key) const
double nan()
Method to return ieee floating point double precision NAN.
const ossimDpt & ul() const
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
static ossimString toString(bool aValue)
Numeric to string methods.
void checkAndSetDefaultView()
RTTI_DEF2(ossimEsriShapeFileFilter, "ossimEsriShapeFileFilter", ossimAnnotationSource, ossimViewInterface)
ossimRgbVector theBrushColor
virtual void setImageGeometry(ossimImageGeometry *projection)
virtual void transform(ossimImageGeometry *projection)=0
const ossimIpt & ul() const
virtual bool open(const ossimFilename &file, const ossimString &flags=ossimString("rb"))
ossimDrect combine(const ossimDrect &rect) const
~ossimEsriShapeFileFilter()
double latd() const
Will convert the radian measure to degrees.
const ossimIpt & ll() const
virtual void setNumberOfBands(ossim_uint32 bands)
ossimString theFeatureName
ossimEsriShapeFileFilter(ossimImageSource *inputSource=NULL)
virtual ossimObject * getView()
static const char * MAX_QUADTREE_LEVELS_KW
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
static const char * FEATURE_NAME_KW
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
int SHPAPI_CALL1 * SHPTreeFindLikelyShapes(SHPTree *hTree, double *padfBoundsMin, double *padfBoundsMax, int *);int SHPAPI_CALL SHPCheckBoundsOverlap(double *, double *, double *, double *, int
SHPTree SHPAPI_CALL1 * SHPCreateTree(SHPHandle hSHP, int nDimension, int nMaxDepth, double *padfBoundsMin, double *padfBoundsMax);void SHPAPI_CALL SHPDestroyTree(SHPTree *hTree
virtual bool loadShapeFile(const ossimFilename &shapeFile)
bool loadShape(const ossimShapeFile &shapeFile, long shapeRecord)
bool localToWorld(const ossimDpt &local_pt, ossimGpt &world_pt) const
Exposes the 3D projection from image to world coordinates.
ossimUnitType theBorderSizeUnits
ossim_uint32 getNumberOfVertices() const
os2<< "> n<< " > nendobj n
virtual void drawAnnotations(ossimRefPtr< ossimImageData > tile)
ossimDpt thePointWidthHeight
bool toBool() const
String to numeric methods.
unsigned int ossim_uint32
static const char * FILL_FLAG_KW
static const char * BORDER_SIZE_KW
std::multimap< int, ossimAnnotationObject * > theShapeCache
virtual ossimIrect getImageRectangle() const
const std::vector< ossimGpt > & getVertexList() const
unsigned char getB() const
const ossimIpt & lr() const
ossimString getPartByName(ossim_uint32 partIndex) const
virtual void loadPolygon(ossimShapeObject &obj)
ossimRefPtr< ossimImageGeometry > theImageGeometry
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
const ossimIpt & ur() const
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
std::multimap< int, ossimAnnotationObject * >::iterator theCurrentObject
unsigned char getG() const
long toLong() const
toLong's deprecated, please use the toInts...
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=NULL)
ossimShapeFile theShapeFile
void getBounds(double &minX, double &minY, double &minZ, double &minM, double &maxX, double &maxY, double &maxZ, double &maxM) const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
ossimRefPtr< ossimRgbImage > theImage
virtual bool setView(ossimObject *baseObject)
virtual bool addObject(ossimAnnotationObject *anObject)
virtual long getNumberOfShapes() const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
static const char * PEN_COLOR_KW
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Saves the transform (if any) and projection (if any) states to the KWL.
SHPObject * getShapeObject()
ossimRgbVector thePenColor
std::basic_istringstream< char > istringstream
Class for char input memory streams.
static const char * POINT_WIDTH_HEIGHT_KW
void setCurrentImageData(ossimRefPtr< ossimImageData > &imageData)
Allows you to change the image data that this RgbImage object operates on.
void removeViewProjection()
const ossimDpt & lr() const
static const char * FILENAME_KW
static const char * THICKNESS_KW
const ossimFilename & getFilename() const
virtual void loadArc(ossimShapeObject &obj)
unsigned char ossim_uint8
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
virtual void drawAnnotations(ossimRefPtr< ossimImageData > tile)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=NULL) const
virtual void transformObjects(ossimImageGeometry *geom=0)