Skip to content

Commit

Permalink
iuse GTIFGetOGISDefn and GTIFSetFromOGISDefn from GDAL.
Browse files Browse the repository at this point in the history
Don't define any TIFF/GeoTIFF objects if we don't have them
because newer versions of GDAL might be totally renaming them.
  • Loading branch information
hobu committed Jan 10, 2016
1 parent 7948cab commit 833c96e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
10 changes: 5 additions & 5 deletions io/las/GeotiffSupport.cpp
Expand Up @@ -41,12 +41,12 @@
#include <sstream>

PDAL_C_START
#ifdef __geotiff_h_

char PDAL_DLL * GTIFGetOGISDefn(GTIF*, GTIFDefn*);
int PDAL_DLL GTIFSetFromOGISDefn(GTIF*, const char*);
// These functions are available from GDAL, but they
// aren't exported.
char CPL_DLL * GTIFGetOGISDefn(GTIF*, GTIFDefn*);
int CPL_DLL GTIFSetFromOGISDefn(GTIF*, const char*);

#endif // defined __geotiff_h_
PDAL_C_END


Expand Down Expand Up @@ -105,7 +105,7 @@ int GeotiffSupport::setKey(int tag, void *data, int size, int type)
count = size / sizeof(double);
break;
default:
count = size;
count = size;
break;
}
return ST_SetKey(m_tiff, tag, count, type, data);
Expand Down
10 changes: 1 addition & 9 deletions io/las/GeotiffSupport.hpp
Expand Up @@ -45,14 +45,6 @@
#include <cpl_conv.h>
#endif

// Fake out the compiler if we don't have libgeotiff includes already
#if !defined(__geotiff_h_)
typedef struct GTIFS *GTIF;
#endif
#if !defined(__geo_simpletags_h_)
typedef struct ST_TIFFS *ST_TIFF;
#endif

#include <string>
#include <stdexcept>

Expand All @@ -65,7 +57,7 @@ class PDAL_DLL GeotiffSupport
GeotiffSupport() : m_gtiff(0), m_tiff(0)
{}
~GeotiffSupport();

void resetTags();
int setKey(int tag, void *data, int size, int type);
size_t getKey(int tag, int *count, void **data_ptr) const;
Expand Down

0 comments on commit 833c96e

Please sign in to comment.