strip the file extention of '.shp', if provided, as the shapefile driver does not expect the ext. This allows a directory of shapefiles to be indexed like:

This commit is contained in:
Dane Springmeyer 2010-07-16 23:28:53 +00:00
parent d19f8ac009
commit 200e9096e9

View file

@ -114,14 +114,14 @@ int main (int argc,char** argv)
}
while (itr != shape_files.end())
{
clog << "processing " << *itr << endl;
//shape_file shp;
std::string shapename (*itr++);
boost::algorithm::ireplace_last(shapename,".shp","");
clog << "processing " << *itr << endl;
std::string shapename_full (shapename+".shp");
if (! boost::filesystem::exists (shapename_full))
{
clog << "error : file " << shapename_full << " doesn't exists" << endl;
clog << "error : file " << shapename_full << " does not exist" << endl;
continue;
}