On Tue, Jun 21, 2011 at 9:57 AM, cathal coffey <[email protected]> wrote:
> Chris thank you for your quick reply.
> The original example I posted used test data, below is as far as I
> have gotten with real numbers.
>
> from sympy.geometry import *
>
> # Define a Line given two points p1 and p2.
> p1 = Point(-694310.42867240659, 7051910.5392115889)
> p2 = Point(-694286.161023414, 7051916.4164796043)
> l = Line(p1, p2)
>
> # Get the Segment perpendicular to l given p.
> p = Point(-694210.80222825997, 7051914.7562929001)
> s = l.perpendicular_segment(p)
> distance = s.length
>
> This throws the following error
> In [61]: s = l.perpendicular_segment(p)
> ERROR: An unexpected error occurred while tokenizing input
> The following traceback may be corrupted or invalid
> The error message is: ('EOF in multi-line statement', (102, 0))
>
> In my attempt to figure out why this error is happening I devised the
> below test.
>
> l2 = l.perpendicular_line(p)
> l.is_perpendicular(l2)
> Out[56]: False
>
> You might ask why my points have such large co-ordinates? They are
> Points using the Google Spherical Merchant projection. As I said
> originally I have been using PostGis and Django Geos for a long time.
> This is the format of data that I work with.

What is the Google Spherical Merchant projection?  I searched for it
on Google, but the only exact match I found was this thread.

Aaron Meurer

>
> Any ideas?
>
> Kind Regards,
> Cathal
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to