Skip to content
Browse files

ogr: fix reading of geometry type for datasources like geojson that n…

…eed to read first feature to detect the type propertly
  • Loading branch information...
1 parent 44d7a38 commit e947d7eac9bfae9eb71e6bc456630c6d2d22b162 @springmeyer springmeyer committed
Showing with 3 additions and 0 deletions.
  1. +3 −0 plugins/input/ogr/ogr_datasource.cpp
View
3 plugins/input/ogr/ogr_datasource.cpp
@@ -386,6 +386,9 @@ boost::optional<mapnik::datasource::geometry_t> ogr_datasource::get_geometry_typ
if (dataset_ && layer_.is_valid())
{
OGRLayer* layer = layer_.layer();
+ // only new either reset of setNext
+ //layer->ResetReading();
+ layer->SetNextByIndex(0);
ogr_feature_ptr feat(layer->GetNextFeature());
if ((*feat) != NULL)
{

0 comments on commit e947d7e

Please sign in to comment.
Something went wrong with that request. Please try again.