Add support for 64 bit field types in GDAL 2.0 - closes #2685

This commit is contained in:
Dane Springmeyer 2015-05-19 22:39:39 -07:00
parent c37720066d
commit 093d857ddc
2 changed files with 14 additions and 0 deletions

View file

@ -334,6 +334,9 @@ void ogr_datasource::init(mapnik::parameters const& params)
switch (type_oid)
{
case OFTInteger:
#if GDAL_VERSION_MAJOR >= 2
case OFTInteger64:
#endif
desc_.add_descriptor(attribute_descriptor(fld_name, mapnik::Integer));
break;
@ -351,6 +354,9 @@ void ogr_datasource::init(mapnik::parameters const& params)
break;
case OFTIntegerList:
#if GDAL_VERSION_MAJOR >= 2
case OFTInteger64List:
#endif
case OFTRealList:
case OFTStringList:
case OFTWideStringList: // deprecated !

View file

@ -43,6 +43,8 @@
#include "ogr_converter.hpp"
#include "ogr_index.hpp"
#include <gdal_version.h>
using mapnik::query;
using mapnik::box2d;
using mapnik::feature_ptr;
@ -139,6 +141,9 @@ feature_ptr ogr_index_featureset<filterT>::next()
switch (type_oid)
{
case OFTInteger:
#if GDAL_VERSION_MAJOR >= 2
case OFTInteger64:
#endif
{
feature->put<mapnik::value_integer>(fld_name,poFeature->GetFieldAsInteger (i));
break;
@ -158,6 +163,9 @@ feature_ptr ogr_index_featureset<filterT>::next()
}
case OFTIntegerList:
#if GDAL_VERSION_MAJOR >= 2
case OFTInteger64List:
#endif
case OFTRealList:
case OFTStringList:
case OFTWideStringList: // deprecated !