OTB  9.0.0
Orfeo Toolbox
otbDataNode.hxx
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbDataNode_hxx
22 #define otbDataNode_hxx
23 
24 #include "otbDataNode.h"
25 #include "otbMetaDataKey.h"
26 
27 namespace otb
28 {
29 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
31 {
32  m_NodeType = ROOT;
33  m_NodeId = "";
34  m_Data.valid = false;
35 }
36 
37 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
39 {
40  m_NodeType = type;
41  m_Data.valid = false;
42 }
43 
44 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
46 {
47  m_NodeType = FEATURE_POINT;
48  m_Data.point = point;
49  m_Data.valid = true;
50 }
51 
52 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
54 {
55  m_NodeType = FEATURE_LINE;
56  m_Data.line = line;
57  m_Data.valid = true;
58 }
59 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
61 {
62  m_NodeType = FEATURE_POLYGON;
63  m_Data.exteriorRing = polygon;
64  if (!m_Data.interiorRings)
65  {
66  m_Data.interiorRings = PolygonListType::New();
67  }
68  m_Data.valid = true;
69 }
70 
71 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
73 {
74  m_NodeType = FEATURE_POLYGON;
75  m_Data.interiorRings = polygonList;
76  if (!m_Data.exteriorRing)
77  {
78  m_Data.exteriorRing = PolygonType::New();
79  }
80  m_Data.valid = true;
81 }
82 
83 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
85 {
86  if (!IsPointFeature())
87  {
88  itkGenericExceptionMacro(<< "Node " << m_NodeId << " is not a point.");
89  }
90  if (!m_Data.valid)
91  {
92  itkGenericExceptionMacro(<< "Invalid point node.");
93  }
94  return m_Data.point;
95 }
96 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
98 {
99  if (!IsLineFeature())
100  {
101  itkGenericExceptionMacro(<< "Node " << m_NodeId << " is not a line.");
102  }
103  if (!m_Data.valid)
104  {
105  itkGenericExceptionMacro(<< "Invalid line node.");
106  }
107  return m_Data.line;
108 }
109 
110 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
112 {
113  if (!IsPolygonFeature())
114  {
115  itkGenericExceptionMacro(<< "Node " << m_NodeId << " is not a polygon.");
116  }
117  if (!m_Data.valid || !m_Data.exteriorRing)
118  {
119  itkGenericExceptionMacro(<< "Invalid polygon node.");
120  }
121  return m_Data.exteriorRing;
122 }
123 
124 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
127 {
128  if (!IsPolygonFeature())
129  {
130  itkGenericExceptionMacro(<< "Node " << m_NodeId << " is not a polygon.");
131  }
132  if (!m_Data.valid || !m_Data.interiorRings)
133  {
134  itkGenericExceptionMacro(<< "Invalid polygon node.");
135  }
136  return m_Data.interiorRings;
137 }
138 
139 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
140 void DataNode<TPrecision, VDimension, TValuePrecision>::PrintSelf(std::ostream& os, itk::Indent indent) const
141 {
142  os << indent << this->GetNodeTypeAsString();
143 }
144 
145 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
147 {
148  std::ostringstream oss;
149  switch (m_NodeType)
150  {
151  case ROOT:
152  {
153  oss << "Root (" << m_NodeId << ")";
154  break;
155  }
156  case DOCUMENT:
157  {
158  oss << "Document (" << m_NodeId << ")";
159  break;
160  }
161  case FOLDER:
162  {
163  oss << "Folder (" << m_NodeId << ")";
164  break;
165  }
166  case FEATURE_POINT:
167  {
168  oss << "Point (" << m_NodeId << ") " << m_Data.point;
169  break;
170  }
171  case FEATURE_LINE:
172  {
173  oss << "Line (" << m_NodeId << ") " << m_Data.line->GetVertexList()->Size() << " points";
174  break;
175  }
176  case FEATURE_POLYGON:
177  {
178  oss << "Polygon (" << m_NodeId << ") " << this->GetPolygonExteriorRing()->GetVertexList()->Size() << " points, " << this->GetPolygonInteriorRings()->Size()
179  << " interior rings";
180  break;
181  }
182  case FEATURE_MULTIPOINT:
183  {
184  oss << "MultiPoint (" << m_NodeId << ")";
185  break;
186  }
187  case FEATURE_MULTILINE:
188  {
189  oss << "MultiLine (" << m_NodeId << ")";
190  break;
191  }
193  {
194  oss << "MultiPolygon (" << m_NodeId << ")";
195  break;
196  }
197  case FEATURE_COLLECTION:
198  {
199  oss << "Collection (" << m_NodeId << ")";
200  break;
201  }
202  }
203  if (GetMetaDataDictionary().HasKey(MetaDataKey::VectorDataKeywordlistKey))
204  {
206  itk::ExposeMetaData<VectorDataKeywordlist>(GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, kwl);
207  oss << "\n -> Metadata: " << kwl;
208  }
209  return oss.str();
210 }
211 /*
212 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
213 void
214 DataNode<TPrecision, VDimension, TValuePrecision>
215 ::SetField(const std::string& key, const std::string& value)
216 {
217  m_FieldMap[key] = value;
218 }
219 */
220 
221 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
222 void DataNode<TPrecision, VDimension, TValuePrecision>::SetFieldAsString(const std::string& key, const std::string& value)
223 {
225  itk::ExposeMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, kwl);
226  kwl.SetFieldAsString(key, value);
227  itk::EncapsulateMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, kwl);
228 }
229 
230 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
232 {
234  itk::ExposeMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, kwl);
235  kwl.SetFieldAsInt(key, value);
236  itk::EncapsulateMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, kwl);
237 }
238 
239 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
241 {
243  itk::ExposeMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, kwl);
244 
245  kwl.SetFieldAsDouble(key, value);
246  itk::EncapsulateMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, kwl);
247 }
248 
249 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
251 {
252  VectorDataKeywordlist keywordlist;
253  if (HasField(key))
254  {
255  itk::ExposeMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, keywordlist);
256 
257  return keywordlist.GetFieldAsDouble(key);
258  }
259  return 0;
260 }
261 
262 /*
263 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
264 std::string
265 DataNode<TPrecision, VDimension, TValuePrecision>
266 ::GetField(const std::string& key) const
267 {
268  if (HasField(key))
269  {
270  return (*m_FieldMap.find(key)).second;
271  }
272  else
273  {
274  return "Unknown Key";
275  }
276 }*/
277 
278 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
280 {
281  VectorDataKeywordlist keywordlist;
282  if (HasField(key))
283  {
284  itk::ExposeMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, keywordlist);
285  return keywordlist.GetFieldAsString(key);
286  }
287  return "";
288 }
289 
290 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
292 {
293  VectorDataKeywordlist keywordlist;
294  if (HasField(key))
295  {
296  itk::ExposeMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, keywordlist);
297 
298  return keywordlist.GetFieldAsInt(key);
299  }
300  return 0;
301 }
302 
303 /*
304 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
305 void
306 DataNode<TPrecision, VDimension, TValuePrecision>
307 ::RemoveField(const std::string& key)
308 {
309  m_FieldMap.erase(key);
310 }
311 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
312 bool
313 DataNode<TPrecision, VDimension, TValuePrecision>
314 ::HasField(const std::string& key) const
315 {
316  return (m_FieldMap.find(key)!=m_FieldMap.end());
317 }
318 */
319 
320 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
322 {
323  VectorDataKeywordlist keywordlist;
324  if (this->GetMetaDataDictionary().HasKey(MetaDataKey::VectorDataKeywordlistKey))
325  {
326  itk::ExposeMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, keywordlist);
327  return keywordlist.HasField(key);
328  }
329  return false;
330 }
331 
332 /*
333 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
334 typename DataNode<TPrecision, VDimension, TValuePrecision>
335 ::FieldType
336 DataNode<TPrecision, VDimension, TValuePrecision>
337 ::GetNthField(unsigned int index) const
338 {
339  if (index<GetNumberOfFields())
340  {
341  FieldMapType::iterator it = m_FieldMap.begin();
342 
343  for (unsigned int i = 0; i<index; ++i)
344  {
345  ++it;
346  }
347  return (*it);
348  }
349  return FieldType("No key","No value");
350 }
351 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
352 unsigned int
353 DataNode<TPrecision, VDimension, TValuePrecision>
354 ::GetNumberOfFields() const
355 {
356  return m_FieldMap.size();
357 }
358 */
359 
360 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
362 {
363  // The source keywordlist where to get the feature list to copy
365  itk::ExposeMetaData<VectorDataKeywordlist>(dataNode->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, srcKwl);
366 
368  itk::ExposeMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, kwl);
369 
370  kwl.CopyFieldList(srcKwl);
371  itk::EncapsulateMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, kwl);
372 }
373 
374 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
376 {
377  VectorDataKeywordlist keywordlist;
378  if (this->GetMetaDataDictionary().HasKey(MetaDataKey::VectorDataKeywordlistKey))
379  {
380  itk::ExposeMetaData<VectorDataKeywordlist>(this->GetMetaDataDictionary(), MetaDataKey::VectorDataKeywordlistKey, keywordlist);
381  return keywordlist.GetFieldList();
382  }
383  std::vector<std::string> empty;
384  return empty;
385 }
386 
387 /*
388 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
389 void
390 DataNode<TPrecision, VDimension, TValuePrecision>
391 ::ClearFields()
392 {
393  m_FieldMap.clear();
394 }*/
395 
396 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
398 {
399  return m_NodeType == DOCUMENT;
400 }
401 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
403 {
404  return m_NodeType == ROOT;
405 }
406 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
408 {
409  return m_NodeType == FOLDER;
410 }
411 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
413 {
414  return m_NodeType == FEATURE_POINT;
415 }
416 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
418 {
419  return m_NodeType == FEATURE_LINE;
420 }
421 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
423 {
424  return m_NodeType == FEATURE_POLYGON;
425 }
426 
427 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
429 {
430  return m_NodeType == FEATURE_MULTIPOINT;
431 }
432 
433 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
435 {
436  return m_NodeType == FEATURE_MULTILINE;
437 }
438 
439 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
441 {
442  return m_NodeType == FEATURE_MULTIPOLYGON;
443 }
444 
445 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
447 {
448  return m_NodeType == FEATURE_COLLECTION;
449 }
450 
451 
452 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
454 {
455  switch (dataNode->GetNodeType())
456  {
457  case FEATURE_POINT:
458  {
459  OGRPoint* ogrPoint = (OGRPoint*)OGRGeometryFactory::createGeometry(wkbPoint);
460  ogrPoint->setX(dataNode->GetPoint()[0]);
461  ogrPoint->setY(dataNode->GetPoint()[1]);
462  return ogrPoint;
463  }
464  break;
465  case FEATURE_LINE:
466  {
467  // Build the ogrObject
468  OGRLineString* ogrLine = (OGRLineString*)OGRGeometryFactory::createGeometry(wkbLineString);
469  VertexListConstPointerType vertexList = dataNode->GetLine()->GetVertexList();
470  typename VertexListType::ConstIterator vIt = vertexList->Begin();
471 
472  while (vIt != vertexList->End())
473  {
474  OGRPoint ogrPoint;
475  ogrPoint.setX(vIt.Value()[0]);
476  ogrPoint.setY(vIt.Value()[1]);
477  if (Dimension > 2)
478  {
479  ogrPoint.setZ(vIt.Value()[2]);
480  }
481  ogrLine->addPoint(&ogrPoint);
482  ++vIt;
483  }
484  return ogrLine;
485  }
486  break;
487  case FEATURE_POLYGON:
488  {
489  OGRPolygon* polygon = (OGRPolygon*)OGRGeometryFactory::createGeometry(wkbPolygon);
490  OGRLinearRing* ogrExternalRing = (OGRLinearRing*)OGRGeometryFactory::createGeometry(wkbLinearRing);
491 
492  VertexListConstPointerType vertexList = dataNode->GetPolygonExteriorRing()->GetVertexList();
493 
494  typename VertexListType::ConstIterator vIt = vertexList->Begin();
495 
496  while (vIt != vertexList->End())
497  {
498  OGRPoint ogrPoint;
499  ogrPoint.setX(vIt.Value()[0]);
500  ogrPoint.setY(vIt.Value()[1]);
501  if (Dimension > 2)
502  {
503  ogrPoint.setZ(vIt.Value()[2]);
504  }
505 
506  ogrExternalRing->addPoint(&ogrPoint);
507  ++vIt;
508  }
509  polygon->addRing(ogrExternalRing);
510  // Close the polygon
511  polygon->closeRings();
512  OGRGeometryFactory::destroyGeometry(ogrExternalRing);
513  return polygon;
514  }
515  break;
516  default:
517  break;
518  }
519 
520  return nullptr;
521 }
522 
523 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
525 {
526  // Convert the nodes to OGRGeometries
527  OGRGeometry* dstGeomtery = this->ConvertDataNodeToOGRGeometry(node);
528  OGRGeometry* currentGeometry = this->ConvertDataNodeToOGRGeometry(this);
529 
530  // Compute the distance
531  return currentGeometry->Distance(dstGeomtery);
532 }
533 
534 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
536 {
537  // Convert Point to point to ogrPoint
538  OGRPoint ogrPointSrc;
539  ogrPointSrc.setX(point[0]);
540  ogrPointSrc.setY(point[1]);
541 
542  // Convert the current datanode to an OGRGeometry
543  OGRGeometry* currentGeometry = this->ConvertDataNodeToOGRGeometry(this);
544 
545  // return the distance
546  return currentGeometry->Distance(&ogrPointSrc);
547 }
548 
549 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
551 {
552  // Convert the nodes to OGRGeometries
553  OGRGeometry* dstGeomtery = this->ConvertDataNodeToOGRGeometry(node);
554  OGRGeometry* currentGeometry = this->ConvertDataNodeToOGRGeometry(this);
555 
556  //
557  return currentGeometry->Intersects(dstGeomtery);
558 }
559 
560 template <class TPrecision, unsigned int VDimension, class TValuePrecision>
562 {
563  // Convert the nodes to OGRGeometries
564  OGRGeometry* dstGeomtery = this->ConvertDataNodeToOGRGeometry(node);
565  OGRGeometry* currentGeometry = this->ConvertDataNodeToOGRGeometry(this);
566 
567  //
568  return currentGeometry->Within(dstGeomtery);
569 }
570 
571 
572 } // end namespace otb
573 
574 #endif
otb::FEATURE_POINT
@ FEATURE_POINT
Definition: otbDataNode.h:43
otb::VectorDataKeywordlist::HasField
bool HasField(const std::string &key) const
otb::DataNode::SetFieldAsInt
void SetFieldAsInt(const std::string &key, int value)
Definition: otbDataNode.hxx:231
otb::DataNode::DataNode
DataNode()
Definition: otbDataNode.hxx:30
otb::DataNode::GetPolygonExteriorRing
PolygonPointerType GetPolygonExteriorRing() const
Definition: otbDataNode.hxx:111
otb::DataNode::GetFieldAsDouble
double GetFieldAsDouble(const std::string &key) const
Definition: otbDataNode.hxx:250
otb::DataNode::IsMultiPointFeature
bool IsMultiPointFeature() const
Definition: otbDataNode.hxx:428
otb::FEATURE_MULTIPOLYGON
@ FEATURE_MULTIPOLYGON
Definition: otbDataNode.h:48
otb::DataNode::GetNodeTypeAsString
std::string GetNodeTypeAsString() const
Definition: otbDataNode.hxx:146
otb::DataNode::PointType
itk::Point< PrecisionType, VDimension > PointType
Definition: otbDataNode.h:93
otb::DOCUMENT
@ DOCUMENT
Definition: otbDataNode.h:41
otb::DataNode::SetPoint
void SetPoint(PointType point)
Definition: otbDataNode.hxx:45
otb::VectorDataKeywordlist::GetFieldAsInt
int GetFieldAsInt(const std::string &key) const
otb::DataNode::GetLine
LinePointerType GetLine() const
Definition: otbDataNode.hxx:97
otb::DataNode::IsRoot
bool IsRoot() const
Definition: otbDataNode.hxx:402
otb::DataNode
This class represents a node of data in a vector data hierarchy.
Definition: otbDataNode.h:73
otb::DataNode::IsMultiLineFeature
bool IsMultiLineFeature() const
Definition: otbDataNode.hxx:434
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::FEATURE_LINE
@ FEATURE_LINE
Definition: otbDataNode.h:44
otb::DataNode::GetFieldAsString
std::string GetFieldAsString(const std::string &key) const
Definition: otbDataNode.hxx:279
otb::DataNode::SetFieldAsString
void SetFieldAsString(const std::string &key, const std::string &value)
Definition: otbDataNode.hxx:222
otb::DataNode::GetNodeType
virtual NodeType GetNodeType() const
otb::VectorDataKeywordlist::CopyFieldList
void CopyFieldList(const Self &kwl)
otb::DataNode::PolygonPointerType
PolygonType::Pointer PolygonPointerType
Definition: otbDataNode.h:100
otb::VectorDataKeywordlist::SetFieldAsDouble
void SetFieldAsDouble(const std::string &key, double value)
otb::MetaDataKey::VectorDataKeywordlistKey
OTBMetadata_EXPORT char const * VectorDataKeywordlistKey
otb::DataNode::LinePointerType
LineType::Pointer LinePointerType
Definition: otbDataNode.h:95
otb::DataNode::IsCollectionFeature
bool IsCollectionFeature() const
Definition: otbDataNode.hxx:446
otb::FOLDER
@ FOLDER
Definition: otbDataNode.h:42
otb::DataNode::IsLineFeature
bool IsLineFeature() const
Definition: otbDataNode.hxx:417
otb::DataNode::CopyFieldList
void CopyFieldList(const DataNode *dataNode)
Definition: otbDataNode.hxx:361
otb::VectorDataKeywordlist::SetFieldAsString
void SetFieldAsString(const std::string &key, const std::string &value)
otb::DataNode::Within
bool Within(const DataNode *node)
Definition: otbDataNode.hxx:561
otb::DataNode::GetPoint
PointType GetPoint() const
Definition: otbDataNode.hxx:84
otb::DataNode::ConvertDataNodeToOGRGeometry
OGRGeometry * ConvertDataNodeToOGRGeometry(const DataNode *dataNode)
Definition: otbDataNode.hxx:453
otb::DataNode::IsPolygonFeature
bool IsPolygonFeature() const
Definition: otbDataNode.hxx:422
otb::DataNode::IsDocument
bool IsDocument() const
Definition: otbDataNode.hxx:397
otb::DataNode::Intersects
bool Intersects(const DataNode *node)
Definition: otbDataNode.hxx:550
otb::NodeType
NodeType
Definition: otbDataNode.h:39
otb::VectorDataKeywordlist::GetFieldAsString
std::string GetFieldAsString(const std::string &key) const
otb::DataNode::EuclideanDistanceMetric
double EuclideanDistanceMetric(const DataNode *node)
Definition: otbDataNode.hxx:524
otb::DataNode::GetFieldList
std::vector< std::string > GetFieldList() const
Definition: otbDataNode.hxx:375
otb::DataNode::GetPolygonInteriorRings
PolygonListPointerType GetPolygonInteriorRings() const
Definition: otbDataNode.hxx:126
otb::DataNode::VertexListConstPointerType
VertexListType::ConstPointer VertexListConstPointerType
Definition: otbDataNode.h:99
otb::DataNode::IsMultiPolygonFeature
bool IsMultiPolygonFeature() const
Definition: otbDataNode.hxx:440
otbMetaDataKey.h
otb::DataNode::SetNodeType
void SetNodeType(NodeType type)
Definition: otbDataNode.hxx:38
otb::FEATURE_POLYGON
@ FEATURE_POLYGON
Definition: otbDataNode.h:45
otb::PolyLineParametricPathWithValue
This class implement a PolyLineParametricPath for which a value can be set. The value is stored in th...
Definition: otbPolyLineParametricPathWithValue.h:50
otb::DataNode::GetFieldAsInt
int GetFieldAsInt(const std::string &key) const
Definition: otbDataNode.hxx:291
otbDataNode.h
otb::DataNode::PrintSelf
void PrintSelf(std::ostream &os, itk::Indent indent) const override
Definition: otbDataNode.hxx:140
otb::FEATURE_MULTIPOINT
@ FEATURE_MULTIPOINT
Definition: otbDataNode.h:46
otb::DataNode::IsFolder
bool IsFolder() const
Definition: otbDataNode.hxx:407
otb::DataNode::IsPointFeature
bool IsPointFeature() const
Definition: otbDataNode.hxx:412
otb::VectorDataKeywordlist::GetFieldAsDouble
double GetFieldAsDouble(const std::string &key) const
otb::DataNode::PolygonListPointerType
PolygonListType::Pointer PolygonListPointerType
Definition: otbDataNode.h:103
otb::DataNode::SetPolygonExteriorRing
void SetPolygonExteriorRing(PolygonType *polygon)
Definition: otbDataNode.hxx:60
otb::Polygon
This class represent a 2D polygon.
Definition: otbPolygon.h:44
otb::FEATURE_COLLECTION
@ FEATURE_COLLECTION
Definition: otbDataNode.h:49
otb::DataNode::SetLine
void SetLine(LineType *line)
Definition: otbDataNode.hxx:53
otb::FEATURE_MULTILINE
@ FEATURE_MULTILINE
Definition: otbDataNode.h:47
otb::VectorDataKeywordlist::SetFieldAsInt
void SetFieldAsInt(const std::string &key, int value)
otb::ROOT
@ ROOT
Definition: otbDataNode.h:40
otb::ObjectList
This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >.
Definition: otbObjectList.h:40
otb::DataNode::SetFieldAsDouble
void SetFieldAsDouble(const std::string &key, double value)
Definition: otbDataNode.hxx:240
otb::DataNode::HasField
bool HasField(const std::string &key) const
Definition: otbDataNode.hxx:321
otb::DataNode::SetPolygonInteriorRings
void SetPolygonInteriorRings(PolygonListType *polygonList)
Definition: otbDataNode.hxx:72
otb::VectorDataKeywordlist
this class handle the metadata of vector data.
Definition: otbVectorDataKeywordlist.h:57
otb::VectorDataKeywordlist::GetFieldList
std::vector< std::string > GetFieldList() const