Discussion:
[Community] how can I define ray line in shapely?
KIA
2014-08-30 15:57:14 UTC
Permalink
hi
i have some code in python and i use shapely module in that
I need to define ray line with specific origin and angle to intersect
with some other shape
but shapely module does not have any object like ray line
I have tried to use ray object from sympy module but I cant intersect
sympy object with shape object...
could you please give me an idea about how can I define ray line with
specific origin and angle with shapely?...
thank you so much in advance
Sean Gillies
2014-08-31 19:30:05 UTC
Permalink
To be clear, you want to find the intersection of any geometric object with
a ray that has an origin and an angle?
hi
i have some code in python and i use shapely module in that
I need to define ray line with specific origin and angle to intersect
with some other shape
but shapely module does not have any object like ray line
I have tried to use ray object from sympy module but I cant intersect
sympy object with shape object...
could you please give me an idea about how can I define ray line with
specific origin and angle with shapely?...
thank you so much in advance
_______________________________________________
Community mailing list
Community at lists.gispython.org
http://lists.gispython.org/mailman/listinfo/community
--
Sean Gillies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gispython.org/pipermail/community/attachments/20140831/2847f7c8/attachment.htm>
Kia
2014-09-01 07:15:33 UTC
Permalink
Yes, that is true
To be clear, you want to find the intersection of any geometric object with a ray that has an origin and an angle?
hi
i have some code in python and i use shapely module in that
I need to define ray line with specific origin and angle to intersect with some other shape
but shapely module does not have any object like ray line
I have tried to use ray object from sympy module but I cant intersect sympy object with shape object...
could you please give me an idea about how can I define ray line with specific origin and angle with shapely?...
thank you so much in advance
_______________________________________________
Community mailing list
Community at lists.gispython.org
http://lists.gispython.org/mailman/listinfo/community
--
Sean Gillies
_______________________________________________
Community mailing list
Community at lists.gispython.org
http://lists.gispython.org/mailman/listinfo/community
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gispython.org/pipermail/community/attachments/20140901/dddf2f99/attachment.htm>
Sean Gillies
2014-09-02 18:44:50 UTC
Permalink
There is no ray object in Shapely. You could approximate one in the context
of a given geometric object target like this:

1. Determine the bounds of the target (target.bounds)
2. Using your ray origin and angle, find a point along the angle that is on
the other side of the target bounds from the origin
3. Combine that with the origin to make a line

Of course, if the origin is within the target you will have to extend the
line in both directions.
Post by Kia
Yes, that is true
To be clear, you want to find the intersection of any geometric object
with a ray that has an origin and an angle?
hi
i have some code in python and i use shapely module in that
I need to define ray line with specific origin and angle to intersect
with some other shape
but shapely module does not have any object like ray line
I have tried to use ray object from sympy module but I cant intersect
sympy object with shape object...
could you please give me an idea about how can I define ray line with
specific origin and angle with shapely?...
thank you so much in advance
_______________________________________________
Community mailing list
Community at lists.gispython.org
http://lists.gispython.org/mailman/listinfo/community
--
Sean Gillies
_______________________________________________
Community mailing list
Community at lists.gispython.org
http://lists.gispython.org/mailman/listinfo/community
_______________________________________________
Community mailing list
Community at lists.gispython.org
http://lists.gispython.org/mailman/listinfo/community
--
Sean Gillies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gispython.org/pipermail/community/attachments/20140902/8b66e3bc/attachment.htm>
Loading...