Package: liblas / 1.8.1-10

0001-WITH_GDAL-fix-build-with-DDEBUG.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Description: WITH_GDAL: fix build with -DDEBUG
Author: Even Rouault <even.rouault@spatialys.com>
Origin: https://github.com/libLAS/libLAS/commit/464635186b1208c8ff37f5570c90cf8f5f468f07

--- a/src/spatialreference.cpp
+++ b/src/spatialreference.cpp
@@ -581,7 +581,7 @@ std::string SpatialReference::GetWKT(WKT
             else
                 poSRS->exportToWkt( &pszWKT );
 
-            OSRDestroySpatialReference( poSRS );
+            OGRSpatialReference::DestroySpatialReference( poSRS );
 
             result_wkt = pszWKT;
             CPLFree( pszWKT );
@@ -615,7 +615,7 @@ std::string SpatialReference::GetWKT(WKT
             CPLFree( pszWKT );
             pszWKT = NULL;
             poSRS->exportToPrettyWkt(&pszWKT, false);
-            OSRDestroySpatialReference( poSRS );
+            OGRSpatialReference::DestroySpatialReference( poSRS );
 
         }
 
@@ -646,7 +646,7 @@ std::string SpatialReference::GetWKT(WKT
             else
                 poSRS->exportToWkt( &pszWKT );
 
-            OSRDestroySpatialReference( poSRS );
+            OGRSpatialReference::DestroySpatialReference( poSRS );
         }
 #else
         boost::ignore_unused_variable_warning(mode_flag);
--- a/src/transform.cpp
+++ b/src/transform.cpp
@@ -127,7 +127,8 @@ void ReprojectionTransform::Initialize(c
     m_in_ref_ptr = ReferencePtr(OSRNewSpatialReference(0), OGRSpatialReferenceDeleter());
     m_out_ref_ptr = ReferencePtr(OSRNewSpatialReference(0), OGRSpatialReferenceDeleter());
     
-    int result = OSRSetFromUserInput(m_in_ref_ptr.get(), inSRS.GetWKT(liblas::SpatialReference::eCompoundOK).c_str());
+    int result = OSRSetFromUserInput(reinterpret_cast<OGRSpatialReferenceH>(m_in_ref_ptr.get()),
+                                     inSRS.GetWKT(liblas::SpatialReference::eCompoundOK).c_str());
     if (result != OGRERR_NONE) 
     {
         std::ostringstream msg; 
@@ -137,7 +138,8 @@ void ReprojectionTransform::Initialize(c
         throw std::runtime_error(msg.str());
     }
     
-    result = OSRSetFromUserInput(m_out_ref_ptr.get(), outSRS.GetWKT(liblas::SpatialReference::eCompoundOK).c_str());
+    result = OSRSetFromUserInput(reinterpret_cast<OGRSpatialReferenceH>(m_out_ref_ptr.get()),
+                                 outSRS.GetWKT(liblas::SpatialReference::eCompoundOK).c_str());
     if (result != OGRERR_NONE) 
     {
         std::ostringstream msg; 
@@ -147,7 +149,9 @@ void ReprojectionTransform::Initialize(c
         std::string message(msg.str());
         throw std::runtime_error(message);
     }
-    m_transform_ptr = TransformPtr(OCTNewCoordinateTransformation( m_in_ref_ptr.get(), m_out_ref_ptr.get()), OSRTransformDeleter());
+    m_transform_ptr = TransformPtr(OCTNewCoordinateTransformation( reinterpret_cast<OGRSpatialReferenceH>(m_in_ref_ptr.get()),
+                                                                   reinterpret_cast<OGRSpatialReferenceH>(m_out_ref_ptr.get())),
+                                   OSRTransformDeleter());
 #else
 
     boost::ignore_unused_variable_warning(inSRS);
@@ -170,7 +174,7 @@ bool ReprojectionTransform::transform(Po
     double y = point.GetY();
     double z = point.GetZ();
 
-    ret = OCTTransform(m_transform_ptr.get(), 1, &x, &y, &z);    
+    ret = OCTTransform(reinterpret_cast<OGRCoordinateTransformationH>(m_transform_ptr.get()), 1, &x, &y, &z);
     if (!ret)
     {
         std::ostringstream msg;