{{{
TRANSFORM_TO_WGS84 = CoordTransform(SpatialReference('EPSG:32040'),
SpatialReference('EPSG:4326'))
points.transform(TRANSFORM_TO_WGS84)
}}}
You can see the polygon that is **incorrectly** intersecting the driveway.
When I use pyproj to do the same transformation, it works as expected:
{{{
def project_array(coordinates):
p1 = pyproj.Proj(init='epsg:32040')
p2 = pyproj.Proj(init='epsg:4326')
fx, fy = pyproj.transform(p1, p2, coordinates[:,0], coordinates[:,1])
return np.dstack([fy, fx])[0]
points = project_array(np.array(points.coords[0]))
}}}
You can see the polygon that is **correctly** bounding the driveway.
Why doesn't the GeoDjango transform behave the same as the pyproj
transform?
--
Ticket URL: <https://code.djangoproject.com/ticket/33181>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "Screen Shot 2021-10-08 at 3.16.53 PM.jpg" added.
* Attachment "Screen Shot 2021-10-08 at 3.31.07 PM.jpg" added.
* status: new => closed
* resolution: => needsinfo
Comment:
Django mostly just delegates to GDAL, so it could be a bug there, I guess,
but this ticket tracker is for reporting confirmed bugs, not for getting
help to debug your issues. For that, you could try the
[https://forum.djangoproject.com/c/internals/geodjango/13 geodjango topic]
on the Django forum. Please reopen this ticket with details if you confirm
Django is at fault. Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/33181#comment:1>