Hi, I have a problem with getting spatial reference of one layer in MS SQL Server. When I run following command everything is just file, I'm getting WKT description of layer's spatial reference.
ogrinfo -so MSSQL:server=ORASRV;database=uap;uid=xxx;pwd=xxx SDE.USES_p --config GDAL_DATA D:\projekty\GDAL\install\data But when I do something similar with C++ API, I'm getting NULL :-( OGRDataSource *ds; OGRLayer *layer; OGRSpatialReference *sr; CPLSetConfigOption("GDAL_DATA", "D:\projekty\GDAL\install\data"); ds = OGRSFDriverRegistrar::Open("MSSQL:server=ORASRV;database=uap;uid=xxx;pwd=xxx"); layer = ds->GetLayerByName("SDE.USES_p"); sr = layer->GetSpatialRef(); Am I doing something wrong? Thanks a lot for your help. Michal
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev