Can you tell me the difference between ogr methods ogr.geometry() and ogr.GetGeometryRef()? Is there any difference in returned object in Python?


The main difference is that ogr.geometry() is the constructor of a geometry, while ogr.GetGeometryRef() fetch the pointer to a feature geometry. The objects they return are respectively an OGRGeometry and an OGRFeature.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.