#33181: GeoDjango CoordTransform slightly offset from pyproj transform
--------------------------------------+------------------------
               Reporter:  hbradlow    |          Owner:  nobody
                   Type:  Bug         |         Status:  new
              Component:  GIS         |        Version:  3.2
               Severity:  Normal      |       Keywords:
           Triage Stage:  Unreviewed  |      Has patch:  0
    Needs documentation:  0           |    Needs tests:  0
Patch needs improvement:  0           |  Easy pickings:  0
                  UI/UX:  0           |
--------------------------------------+------------------------
 When I use the GeoDjango CoordTransform function to transform points they
 end up slightly offset from reality:



 {{{
 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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.861ff5aa8df3d28d30142080d097f278%40djangoproject.com.

Reply via email to