MCPcopy Create free account
hub / github.com/Kitware/VTK / AddFeatureProperty

Method AddFeatureProperty

IO/GeoJSON/vtkGeoJSONReader.cxx:382–409  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

380
381//------------------------------------------------------------------------------
382void vtkGeoJSONReader::AddFeatureProperty(const char* name, vtkVariant& typeAndDefaultValue)
383{
384 GeoJSONReaderInternal::GeoJSONProperty property;
385
386 // Traverse internal list checking if name already used
387 std::vector<GeoJSONReaderInternal::GeoJSONProperty>::iterator iter =
388 this->Internal->PropertySpecs.begin();
389 for (; iter != this->Internal->PropertySpecs.end(); ++iter)
390 {
391 if (iter->Name == name)
392 {
393 vtkGenericWarningMacro(<< "Overwriting property spec for name " << name);
394 property.Name = name;
395 property.Value = typeAndDefaultValue;
396 *iter = property;
397 break;
398 }
399 }
400
401 // If not found, add to list
402 if (iter == this->Internal->PropertySpecs.end())
403 {
404 property.Name = name;
405 property.Value = typeAndDefaultValue;
406 this->Internal->PropertySpecs.push_back(property);
407 vtkDebugMacro(<< "Added feature property " << property.Name);
408 }
409}
410
411//------------------------------------------------------------------------------
412int vtkGeoJSONReader::RequestData(vtkInformation* vtkNotUsed(request),

Callers 1

load_geojsonFunction · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by 1

load_geojsonFunction · 0.64