-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a56c957
commit 36a90d6
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36a90d6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[21:51] * EvenR surprised to see OGR typedefs being redefined in QGIS files ! Why not including OGR headers ??
[21:51] #include "ogr_api.h" et #include "ogr_srs_api.h" should do it
[21:52] that would make the #ifdef DEBUG #else stuff non necessary
36a90d6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the
void* hCRS = OSRNewSpatialReference( NULL );
line shoud be just replaced by :
OGRSpatialReferenceH hCRS = OSRNewSpatialReference( NULL );
would work in DEBUG and non DEBUG mode
36a90d6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, for gdalprovider, it is better to use OGRSpatialReferenceH directly.
In qgsvectorfilewriter.h, we cannot include ogr headers because there are problems compiling the python bindings if the ogr data structures are visible.
36a90d6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
36a90d6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it seems to compile if I just remove the typedef section... Don't know what the reason for the typedefs was then (it seems to come from the c-api port five years ago)