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:
parent
d19f8ac009
commit
200e9096e9
1 changed files with 3 additions and 3 deletions
|
@ -114,14 +114,14 @@ int main (int argc,char** argv)
|
||||||
}
|
}
|
||||||
while (itr != shape_files.end())
|
while (itr != shape_files.end())
|
||||||
{
|
{
|
||||||
clog << "processing " << *itr << endl;
|
|
||||||
//shape_file shp;
|
|
||||||
std::string shapename (*itr++);
|
std::string shapename (*itr++);
|
||||||
|
boost::algorithm::ireplace_last(shapename,".shp","");
|
||||||
|
clog << "processing " << *itr << endl;
|
||||||
std::string shapename_full (shapename+".shp");
|
std::string shapename_full (shapename+".shp");
|
||||||
|
|
||||||
if (! boost::filesystem::exists (shapename_full))
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue