diff --git a/django-stubs/contrib/gis/gdal/geometries.pyi b/django-stubs/contrib/gis/gdal/geometries.pyi index 409ea5e89..a9f3927ae 100644 --- a/django-stubs/contrib/gis/gdal/geometries.pyi +++ b/django-stubs/contrib/gis/gdal/geometries.pyi @@ -1,5 +1,6 @@ from typing import Any +from django.contrib.gis.gdal import CoordTransform, SpatialReference from django.contrib.gis.gdal.base import GDALBase as GDALBase class OGRGeometry(GDALBase): @@ -63,7 +64,7 @@ class OGRGeometry(GDALBase): def ewkt(self) -> Any: ... def clone(self) -> Any: ... def close_rings(self) -> None: ... - def transform(self, coord_trans: Any, clone: bool = ...) -> Any: ... + def transform(self, coord_trans: CoordTransform | SpatialReference | str | int, clone: bool = ...) -> Any: ... def intersects(self, other: Any) -> Any: ... def equals(self, other: Any) -> Any: ... def disjoint(self, other: Any) -> Any: ... diff --git a/django-stubs/contrib/gis/gdal/srs.pyi b/django-stubs/contrib/gis/gdal/srs.pyi index cb298d363..cfac30a7b 100644 --- a/django-stubs/contrib/gis/gdal/srs.pyi +++ b/django-stubs/contrib/gis/gdal/srs.pyi @@ -11,7 +11,7 @@ class SpatialReference(GDALBase): destructor: Any axis_order: Any ptr: Any - def __init__(self, srs_input: str = ..., srs_type: str = ..., axis_order: Any | None = ...) -> None: ... + def __init__(self, srs_input: str | int = ..., srs_type: str = ..., axis_order: Any | None = ...) -> None: ... def __getitem__(self, target: Any) -> Any: ... def attr_value(self, target: Any, index: int = ...) -> Any: ... def auth_name(self, target: Any) -> Any: ... @@ -64,4 +64,4 @@ class SpatialReference(GDALBase): class CoordTransform(GDALBase): destructor: Any ptr: Any - def __init__(self, source: Any, target: Any) -> None: ... + def __init__(self, source: SpatialReference, target: SpatialReference) -> None: ... diff --git a/django-stubs/contrib/gis/geos/geometry.pyi b/django-stubs/contrib/gis/geos/geometry.pyi index bd64571cd..0d68ce5c3 100644 --- a/django-stubs/contrib/gis/geos/geometry.pyi +++ b/django-stubs/contrib/gis/geos/geometry.pyi @@ -1,6 +1,7 @@ from typing import Any, TypeVar from _typeshed import Self +from django.contrib.gis.gdal import CoordTransform, SpatialReference from django.contrib.gis.geometry import hex_regex as hex_regex # noqa: F401 from django.contrib.gis.geometry import json_regex as json_regex from django.contrib.gis.geometry import wkt_regex as wkt_regex @@ -92,7 +93,7 @@ class GEOSGeometryBase(GEOSBase): @property def crs(self) -> Any: ... ptr: Any - def transform(self, ct: Any, clone: bool = ...) -> Any: ... + def transform(self, ct: CoordTransform | SpatialReference | str | int, clone: bool = ...) -> Any: ... @property def boundary(self) -> Any: ... def buffer(self, width: Any, quadsegs: int = ...) -> Any: ...