forked from lukeroth/gdal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged relevant changes from airmap/gdal
- Loading branch information
Showing
5 changed files
with
142 additions
and
37 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright 2019 AirMap Inc. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
#include "go_ogr_wkb.h" | ||
|
||
#include <gdal_version.h> | ||
|
||
#if GDAL_COMPUTE_VERSION(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, GDAL_VERSION_PATCH) >= GDAL_COMPUTE_VERSION(2, 3, 0) | ||
|
||
OGRErr go_CreateFromWkb(void* pabyData, OGRSpatialReferenceH hSRS, OGRGeometryH* phGeometry, int nBytes) { | ||
return OGR_G_CreateFromWkb(pabyData, hSRS, phGeometry, nBytes); | ||
} | ||
|
||
OGRErr go_ImportFromWkb(OGRGeometryH hGeom, void* pabyData, int nSize) { | ||
return OGR_G_ImportFromWkb(hGeom, pabyData, nSize); | ||
} | ||
|
||
OGRErr go_ExportToWkb(OGRGeometryH hGeom, OGRwkbByteOrder eOrder, unsigned char* pabyDstBuffer) { | ||
return OGR_G_ExportToWkb(hGeom, eOrder, pabyDstBuffer); | ||
} | ||
|
||
#elif GDAL_COMPUTE_VERSION(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, GDAL_VERSION_PATCH) < GDAL_COMPUTE_VERSION(2, 3, 0) | ||
|
||
OGRErr go_CreateFromWkb(void* pabyData, OGRSpatialReferenceH hSRS, OGRGeometryH* phGeometry, int nBytes) { | ||
return OGR_G_CreateFromWkb((unsigned char*)pabyData, hSRS, phGeometry, nBytes); | ||
} | ||
|
||
OGRErr go_ImportFromWkb(OGRGeometryH hGeom, void* pabyData, int nSize) { | ||
return OGR_G_ImportFromWkb(hGeom, (unsigned char*)pabyData, nSize); | ||
} | ||
|
||
OGRErr go_ExportToWkb(OGRGeometryH hGeom, OGRwkbByteOrder eOrder, unsigned char* pabyDstBuffer) { | ||
return OGR_G_ExportToWkb(hGeom, eOrder, pabyDstBuffer); | ||
} | ||
|
||
#endif // GDAL_COMPUTE_VERSION(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, GDAL_VERSION_PATCH) >= GDAL_COMPUTE_VERSION(2, 3, 0) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2019 AirMap Inc. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
#ifndef GO_OGR_WKB_H_ | ||
#define GO_OGR_WKB_H_ | ||
|
||
#include <ogr_api.h> | ||
|
||
// go_CreateFromWkb helps us in handling an API/ABI break introduced by gdal 2.3.0. | ||
OGRErr go_CreateFromWkb(void *pabyData, OGRSpatialReferenceH hSRS, OGRGeometryH* phGeometry, int nBytes); | ||
|
||
// go_CreateFromWkb helps us in handling an API/ABI break introduced by gdal 2.3.0. | ||
OGRErr go_ImportFromWkb(OGRGeometryH hGeom, void* pabyData, int nSize); | ||
|
||
// go_ExportToWkb helps us in handling an API/ABI break introduced by gdal 2.3.0. | ||
OGRErr go_ExportToWkb(OGRGeometryH hGeom, OGRwkbByteOrder eOrder, unsigned char* pabyDstBuffer); | ||
|
||
#endif // GO_OGR_WKB_H_ |
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