Skip to content

Commit

Permalink
Trying load GeoData module from ODA
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis DELFORGES committed Jan 21, 2025
1 parent fa0622b commit 059282d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions ogr/ogrsf_frmts/dwg/dwg_headers.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@
#include "FdField.h"

#include "DbGeoData.h"
#include "DynamicLinker.h"

#endif // TEIGHA_HEADERS_H
15 changes: 15 additions & 0 deletions ogr/ogrsf_frmts/dwg/ogrdwglayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ void OGRDWGLayer::AddSRSIfPresent()
{
if(!poDS) return;

OdRxModulePtr pOdSpatialReferenceModule = odrxDynamicLinker()->loadModule(L"OdSpatialReference");
if (pOdSpatialReferenceModule.isNull())
{
CPLError(CE_Failure, CPLE_AppDefined, "Cannot load OdSpatialReference.tx The setup of MENTOR_DICTIONARY_PATH (or CS_MAP_DIR) is probably missing");
return;
}

OdRxModulePtr pOdGeoDataModule = odrxDynamicLinker()->loadModule(L"OdGeoData");
if (pOdGeoDataModule.isNull())
{
CPLError(CE_Failure, CPLE_AppDefined, "Cannot load OdGeoData.tx . GEO Protocol Extension (PE) interfaces couldn't have been loaded");
return;
}


OdDbDatabasePtr pDb = poDS->GetDB();
if (pDb.isNull())
{
Expand Down

0 comments on commit 059282d

Please sign in to comment.