App: [skip ci] add GeoFeaturePy::getPropertyOfGeometry
This commit is contained in:
@@ -62,7 +62,8 @@ PyObject* GeoFeaturePy::getGlobalPlacement(PyObject * args) {
|
||||
PyObject* GeoFeaturePy::getPropertyNameOfGeometry(PyObject * args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
GeoFeature* object = this->getGeoFeaturePtr();
|
||||
const PropertyComplexGeoData* prop = object->getPropertyOfGeometry();
|
||||
const char* name = prop ? prop->getName() : 0;
|
||||
@@ -72,6 +73,19 @@ PyObject* GeoFeaturePy::getPropertyNameOfGeometry(PyObject * args)
|
||||
return Py::new_reference_to(Py::None());
|
||||
}
|
||||
|
||||
PyObject* GeoFeaturePy::getPropertyOfGeometry(PyObject * args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
GeoFeature* object = this->getGeoFeaturePtr();
|
||||
const PropertyComplexGeoData* prop = object->getPropertyOfGeometry();
|
||||
if (prop) {
|
||||
return const_cast<PropertyComplexGeoData*>(prop)->getPyObject();
|
||||
}
|
||||
return Py::new_reference_to(Py::None());
|
||||
}
|
||||
|
||||
PyObject *GeoFeaturePy::getCustomAttributes(const char* /*attr*/) const
|
||||
{
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user