Skip to content

Commit 2b3b079

Browse files
authored
Update contrib.gis.gdal.geometries (typeddjango#2460)
Signed-off-by: SaJH <[email protected]>
1 parent 786f735 commit 2b3b079

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

django-stubs/contrib/gis/gdal/geometries.pyi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ class OGRGeometry(GDALBase):
4545
def empty(self) -> bool: ...
4646
@property
4747
def extent(self) -> tuple[float, float, float, float]: ...
48+
@property
49+
def is_3d(self) -> bool: ...
50+
def set_3d(self, value: bool) -> None: ...
51+
@property
52+
def is_measured(self) -> bool: ...
53+
def set_measured(self, value: bool) -> None: ...
4854
srid: int | None
4955
@property
5056
def geos(self) -> GEOSGeometry: ...
@@ -84,6 +90,8 @@ class OGRGeometry(GDALBase):
8490
def intersection(self, other: OGRGeometry) -> OGRGeometry: ...
8591
def sym_difference(self, other: OGRGeometry) -> OGRGeometry: ...
8692
def union(self, other: OGRGeometry) -> OGRGeometry: ...
93+
@property
94+
def centroid(self) -> Point: ...
8795

8896
class Point(OGRGeometry):
8997
@property

scripts/stubtest/allowlist_todo_django51.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,7 @@ django.contrib.gis.db.models.functions.FromWKB.output_field
4343
django.contrib.gis.db.models.functions.FromWKT.output_field
4444
django.contrib.gis.forms.ModelChoiceField.validate_no_null_characters
4545
django.contrib.gis.forms.RadioSelect.__slotnames__
46-
django.contrib.gis.gdal.OGRGeometry.centroid
47-
django.contrib.gis.gdal.OGRGeometry.is_3d
48-
django.contrib.gis.gdal.OGRGeometry.is_measured
49-
django.contrib.gis.gdal.OGRGeometry.set_3d
50-
django.contrib.gis.gdal.OGRGeometry.set_measured
5146
django.contrib.gis.gdal.geometries.LineString.m
52-
django.contrib.gis.gdal.geometries.OGRGeometry.centroid
53-
django.contrib.gis.gdal.geometries.OGRGeometry.is_3d
54-
django.contrib.gis.gdal.geometries.OGRGeometry.is_measured
55-
django.contrib.gis.gdal.geometries.OGRGeometry.set_3d
56-
django.contrib.gis.gdal.geometries.OGRGeometry.set_measured
5747
django.contrib.gis.gdal.geometries.Point.m
5848
django.contrib.gis.gdal.prototypes.ds.GDAL_OF_ALL
5949
django.contrib.gis.gdal.prototypes.ds.GDAL_OF_RASTER

0 commit comments

Comments
 (0)