Skip to main content
Fixed naming
Source Link

I want to convert ESPGEPSG:7844 toESPGEPSG:4326 by using django.contrib.gis.gdal. I define CoordTransform in this way:

from django.contrib.gis.gdal import CoordTransform, SpatialReference
ct = CoordTransform(SpatialReference(7844), SpatialReference(4326))
print(ct)

Output:

Transform from "GDA2020" to "WGS 84"

Then I define point

from django.contrib.gis.geos import Point
point = Point(335810.4049635191, 6235191.808044555, srid=7844)
print(point)

Output:

SRID=7844;POINT (335810.4049635191 6235191.808044555)

And when I apply the transformation, it seems it does not work:

point.transform(ct)
print(point)

Output:

SRID=4326;POINT (335810.4049635191 6235191.808044555)

Does django.contrib.gis.gdal support such transformations? If yes, what am I missing here?

I want to convert ESPG:7844 toESPG:4326 by using django.contrib.gis.gdal. I define CoordTransform in this way:

from django.contrib.gis.gdal import CoordTransform, SpatialReference
ct = CoordTransform(SpatialReference(7844), SpatialReference(4326))
print(ct)

Output:

Transform from "GDA2020" to "WGS 84"

Then I define point

from django.contrib.gis.geos import Point
point = Point(335810.4049635191, 6235191.808044555, srid=7844)
print(point)

Output:

SRID=7844;POINT (335810.4049635191 6235191.808044555)

And when I apply the transformation, it seems it does not work:

point.transform(ct)
print(point)

Output:

SRID=4326;POINT (335810.4049635191 6235191.808044555)

Does django.contrib.gis.gdal support such transformations? If yes, what am I missing here?

I want to convert EPSG:7844 toEPSG:4326 by using django.contrib.gis.gdal. I define CoordTransform in this way:

from django.contrib.gis.gdal import CoordTransform, SpatialReference
ct = CoordTransform(SpatialReference(7844), SpatialReference(4326))
print(ct)

Output:

Transform from "GDA2020" to "WGS 84"

Then I define point

from django.contrib.gis.geos import Point
point = Point(335810.4049635191, 6235191.808044555, srid=7844)
print(point)

Output:

SRID=7844;POINT (335810.4049635191 6235191.808044555)

And when I apply the transformation, it seems it does not work:

point.transform(ct)
print(point)

Output:

SRID=4326;POINT (335810.4049635191 6235191.808044555)

Does django.contrib.gis.gdal support such transformations? If yes, what am I missing here?

Source Link

django.contrib.gis.gdal.CoordTransform does not work

I want to convert ESPG:7844 toESPG:4326 by using django.contrib.gis.gdal. I define CoordTransform in this way:

from django.contrib.gis.gdal import CoordTransform, SpatialReference
ct = CoordTransform(SpatialReference(7844), SpatialReference(4326))
print(ct)

Output:

Transform from "GDA2020" to "WGS 84"

Then I define point

from django.contrib.gis.geos import Point
point = Point(335810.4049635191, 6235191.808044555, srid=7844)
print(point)

Output:

SRID=7844;POINT (335810.4049635191 6235191.808044555)

And when I apply the transformation, it seems it does not work:

point.transform(ct)
print(point)

Output:

SRID=4326;POINT (335810.4049635191 6235191.808044555)

Does django.contrib.gis.gdal support such transformations? If yes, what am I missing here?