I'm adding map data from a new source that needs to be projected so I 
transform the query set like this:

 q = 
Polyline.objects.filter(overlay='63979e90-a578-4d18-af0a-8bd75279d923').transform(93997).svg()


The resulting SVG attribute isn't transformed. The documentation says:

Attaches a SVG attribute to every model in the queryset that contains the 
Scalable 
Vector Graphics (SVG) <http://www.w3.org/Graphics/SVG/> path data of the 
geometry fields.


Which seems to confirm my suspicion - at least how I read it. Printing the 
query confirms that the SVG attribute isn't transformed:

print q.query
SELECT (ST_AsSVG("airmap_polyline"."the_geom",0,8)) AS "svg", 
"airmap_polyline"."id", "airmap_polyline"."overlay_id", 
ST_Transform("airmap_polyline"."the_geom", 93997) FROM "airmap_polyline" 
WHERE "airmap_polyline"."overlay_id" = 63979e90-a578-4d18-af0a-8bd75279d923


Is there a way to apply the transform to the SVG attribute? I can get it 
working using raw SQL but I thought I should be able to use the ORM. Thanks


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e0603cff-5283-41db-9587-c97b09ef8a67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to