From 2b3b0791e792acfcd758350e5fe652582f85261d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=82=AC=EC=9E=AC=ED=98=81?= Date: Sat, 7 Dec 2024 04:40:45 +0900 Subject: [PATCH] Update contrib.gis.gdal.geometries (#2460) Signed-off-by: SaJH --- django-stubs/contrib/gis/gdal/geometries.pyi | 8 ++++++++ scripts/stubtest/allowlist_todo_django51.txt | 10 ---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/django-stubs/contrib/gis/gdal/geometries.pyi b/django-stubs/contrib/gis/gdal/geometries.pyi index dc6d2a12f..23aaeb245 100644 --- a/django-stubs/contrib/gis/gdal/geometries.pyi +++ b/django-stubs/contrib/gis/gdal/geometries.pyi @@ -45,6 +45,12 @@ class OGRGeometry(GDALBase): def empty(self) -> bool: ... @property def extent(self) -> tuple[float, float, float, float]: ... + @property + def is_3d(self) -> bool: ... + def set_3d(self, value: bool) -> None: ... + @property + def is_measured(self) -> bool: ... + def set_measured(self, value: bool) -> None: ... srid: int | None @property def geos(self) -> GEOSGeometry: ... @@ -84,6 +90,8 @@ class OGRGeometry(GDALBase): def intersection(self, other: OGRGeometry) -> OGRGeometry: ... def sym_difference(self, other: OGRGeometry) -> OGRGeometry: ... def union(self, other: OGRGeometry) -> OGRGeometry: ... + @property + def centroid(self) -> Point: ... class Point(OGRGeometry): @property diff --git a/scripts/stubtest/allowlist_todo_django51.txt b/scripts/stubtest/allowlist_todo_django51.txt index 665574ff8..acf99ff42 100644 --- a/scripts/stubtest/allowlist_todo_django51.txt +++ b/scripts/stubtest/allowlist_todo_django51.txt @@ -43,17 +43,7 @@ django.contrib.gis.db.models.functions.FromWKB.output_field django.contrib.gis.db.models.functions.FromWKT.output_field django.contrib.gis.forms.ModelChoiceField.validate_no_null_characters django.contrib.gis.forms.RadioSelect.__slotnames__ -django.contrib.gis.gdal.OGRGeometry.centroid -django.contrib.gis.gdal.OGRGeometry.is_3d -django.contrib.gis.gdal.OGRGeometry.is_measured -django.contrib.gis.gdal.OGRGeometry.set_3d -django.contrib.gis.gdal.OGRGeometry.set_measured django.contrib.gis.gdal.geometries.LineString.m -django.contrib.gis.gdal.geometries.OGRGeometry.centroid -django.contrib.gis.gdal.geometries.OGRGeometry.is_3d -django.contrib.gis.gdal.geometries.OGRGeometry.is_measured -django.contrib.gis.gdal.geometries.OGRGeometry.set_3d -django.contrib.gis.gdal.geometries.OGRGeometry.set_measured django.contrib.gis.gdal.geometries.Point.m django.contrib.gis.gdal.prototypes.ds.GDAL_OF_ALL django.contrib.gis.gdal.prototypes.ds.GDAL_OF_RASTER