GDAL Provider: access files in a folder

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GDAL Provider: access files in a folder

Vito Rifino
Hello all,

with SHP Provider I can access shapefile in a folder; I create the connection to the folder:

FdoIConnection *m_connection;
FdoPtr<IConnectionManager> manager = FdoFeatureAccessManager::GetConnectionManager();
m_connection = manager->CreateConnection(L"OSGeo.SHP");
m_connection->SetConnectionString(L"DefaultFileLocation=/mnt/data/shp");

If /mnt/data/shp path contains the shapefile shpxxx.shp I can read it:

FdoPtr<FdoISelect> command = (FdoISelect *)m_connection->CreateCommand(FdoCommandType_Select);
command->SetFeatureClassName(L"shpxxx");

I tried the same thing with Gdal Provider, without success:

FdoIConnection *m_connection;
FdoPtr<IConnectionManager> manager = FdoFeatureAccessManager::GetConnectionManager();
m_connection = manager->CreateConnection(L"OSGeo.Gdal");
m_connection->SetConnectionString(L"DefaultRasterFileLocation=/mnt/data/tif");
FdoPtr<FdoISelect> command = (FdoISelect *)m_connection->CreateCommand(FdoCommandType_Select);
command->SetFeatureClassName(L"tifxxx");

I get "Feature class 'tifxxx' not found in schema." error.

Any ideas?
Thanks,
Vito
Reply | Threaded
Open this post in threaded view
|

Re: GDAL Provider: access files in a folder

lifan-tg
This post has NOT been accepted by the mailing list yet.
Hi Vito,

I got the same problem, have you figured out the problem now?

Thanks,
James