Skip to content

Commit

Permalink
Add a transform test case
Browse files Browse the repository at this point in the history
  • Loading branch information
mjakob committed Nov 16, 2022
1 parent 2d33d68 commit 55567b0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/typecheck/contrib/gis/test_gdal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
- case: test_transform
main: |
from django.contrib.gis.gdal import CoordTransform, OGRGeometry, SpatialReference
from django.contrib.gis.geos import Point
source = SpatialReference("EPSG:3006")
target = SpatialReference(4326)
coordtransform = CoordTransform(source, target)
ogr_geom = OGRGeometry("Point (0 0)", source)
ogr_geom.transform(coordtransform)
ogr_geom.transform(target)
ogr_geom.transform("EPSG:4326")
ogr_geom.transform(4326)
geos_geom = Point(0, 0, srid=source)
geos_geom.transform(coordtransform)
geos_geom.transform(target)
geos_geom.transform("EPSG:4326")
geos_geom.transform(4326)

0 comments on commit 55567b0

Please sign in to comment.