From 72502201ae30084b1656ad8d0fb5081882cbd4cf Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 7 Feb 2025 18:43:43 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Dan Baston --- swig/include/python/docs/ogr_geometry_docs.i | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/swig/include/python/docs/ogr_geometry_docs.i b/swig/include/python/docs/ogr_geometry_docs.i index 472c4fc6728a..e3217d8041be 100644 --- a/swig/include/python/docs/ogr_geometry_docs.i +++ b/swig/include/python/docs/ogr_geometry_docs.i @@ -915,6 +915,14 @@ Y: float y coordinate of point to add. Z: float z coordinate of point to add. Defaults to 0 + +Examples +------- +>>> ogr.GeometryTypeToName(pt.GetGeometryType()) +'Point' +>>> pt.AddPoint(3, 7) +>>> ogr.GeometryTypeToName(pt.GetGeometryType()) +'3D Point' "; %feature("docstring") AddPoint_2D " @@ -936,4 +944,12 @@ Y: float y coordinate of point to add. "; +Examples +-------- +>>> pt = ogr.Geometry(ogr.wkbPoint) +>>> ogr.GeometryTypeToName(pt.GetGeometryType()) +'Point' +>>> pt.AddPoint_2D(3, 7) +>>> ogr.GeometryTypeToName(pt.GetGeometryType()) +'Point' }