|
|
/****************************************************************************** | /****************************************************************************** |
* $Id: ogrili2layer.cpp,v 1.4 2005/11/21 14:56:31 pka Exp $ |
* $Id: ogrili2layer.cpp,v 1.5 2006/06/06 17:49:07 pka Exp $ |
* | * |
* Project: Interlis 2 Translator | * Project: Interlis 2 Translator |
* Purpose: Implements OGRILI2Layer class. | * Purpose: Implements OGRILI2Layer class. |
|
|
****************************************************************************** | ****************************************************************************** |
* | * |
* $Log: ogrili2layer.cpp,v $ | * $Log: ogrili2layer.cpp,v $ |
|
* Revision 1.5 2006/06/06 17:49:07 pka |
|
* STL compatibility (Bug 1178) |
|
* |
* Revision 1.4 2005/11/21 14:56:31 pka | * Revision 1.4 2005/11/21 14:56:31 pka |
* Fix for call of GetNextFeature without ResetReading (Interlis 2) | * Fix for call of GetNextFeature without ResetReading (Interlis 2) |
* Fix for polygonizer crash on Linux with GEOS 2.1.3 (Interlis 1) | * Fix for polygonizer crash on Linux with GEOS 2.1.3 (Interlis 1) |
|
|
#include "cpl_conv.h" | #include "cpl_conv.h" |
#include "cpl_string.h" | #include "cpl_string.h" |
| |
CPL_CVSID("$Id: ogrili2layer.cpp,v 1.4 2005/11/21 14:56:31 pka Exp $"); |
CPL_CVSID("$Id: ogrili2layer.cpp,v 1.5 2006/06/06 17:49:07 pka Exp $"); |
| |
/************************************************************************/ | /************************************************************************/ |
/* OGRILI2Layer() */ | /* OGRILI2Layer() */ |
|
|
poFeatureDefn->SetGeomType( eReqType ); | poFeatureDefn->SetGeomType( eReqType ); |
| |
bWriter = bWriterIn; | bWriter = bWriterIn; |
listFeatureIt = 0; |
|
} | } |
| |
/************************************************************************/ | /************************************************************************/ |
|
|
| |
OGRErr OGRILI2Layer::SetFeature (OGRFeature *poFeature) { | OGRErr OGRILI2Layer::SetFeature (OGRFeature *poFeature) { |
listFeature.push_back(poFeature); | listFeature.push_back(poFeature); |
|
if (listFeature.size() == 1) ResetReading(); |
return OGRERR_NONE; | return OGRERR_NONE; |
} | } |
| |
|
|
/************************************************************************/ | /************************************************************************/ |
| |
OGRFeature *OGRILI2Layer::GetNextFeature() { | OGRFeature *OGRILI2Layer::GetNextFeature() { |
if (listFeatureIt == 0) listFeatureIt = listFeature.begin(); |
|
if (listFeatureIt != listFeature.end()) | if (listFeatureIt != listFeature.end()) |
return *(listFeatureIt++); | return *(listFeatureIt++); |
return NULL; | return NULL; |