- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/shp/ESRIShapeReaderWriter.cpp
r11535 r13041 24 24 25 25 virtual const char* className() { return "ESRI Shape ReaderWriter"; } 26 26 27 27 virtual bool acceptsExtension(const std::string& extension) const 28 28 { … … 36 36 { 37 37 std::string ext = osgDB::getFileExtension(file); 38 if (!acceptsExtension(ext)) 38 if (!acceptsExtension(ext)) 39 39 return ReadResult::FILE_NOT_HANDLED; 40 40 … … 47 47 useDouble = true; 48 48 } 49 50 49 50 51 51 ESRIShape::ESRIShapeParser sp(fileName, useDouble); 52 52 53 53 54 54 std::string xbaseFileName(osgDB::getNameLessExtension(fileName) + ".dbf"); 55 55 ESRIShape::XBaseParser xbp(xbaseFileName); 56 57 56 57 58 58 if (sp.getGeode() && (xbp.getAttributeList().empty() == false)) 59 59 { … … 67 67 osg::Geode * geode = sp.getGeode(); 68 68 unsigned int i = 0; 69 69 70 70 ESRIShape::XBaseParser::ShapeAttributeListList::iterator it, end = xbp.getAttributeList().end(); 71 71 for (it = xbp.getAttributeList().begin(); it != end; ++it, ++i) … … 74 74 } 75 75 } 76 } 76 } 77 77 78 78 if (sp.getGeode()) 79 79 { 80 80 81 81 std::string projFileName(osgDB::getNameLessExtension(fileName) + ".prj"); 82 82 if (osgDB::fileExists(projFileName)) … … 98 98 99 99 } 100 100 101 101 if (!projstring.empty()) 102 102 { … … 109 109 } 110 110 } 111 111 112 112 } 113 113
