Skip to main content
Question

How to draw lines from distance and decimal degrees


Forum|alt.badge.img

I have a starting easting and northing and from that I would like to build lines from a number decimal degrees and distances

13 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

Assuming the decimal degrees are a rotation:

Use a CoordinateExtractor to get the coordinates of your starting point, then use the VertexCreator to create a line from your starting location pointing straight north with the required length. Then a Rotator to rotate the line using the start coordinates as the origin.

Note that the Rotator rotates counterclockwise, if you want to make it rotate clockwise multiply the rotation by -1


takashi
Contributor
  • June 7, 2018

Hi @shanetorrens3, assuming that x, y, distance, angle (degrees) are given as attributes of each input feature, a possible way is:

  1. VertexCreator (Mode: Replace with Point): Create the starting point (x, y).
  2. VertexCreator_2 (Mode: Add Point): Add a point (x + distance, y) to the starting point to create a horizontal line segment having the distance.
  3. Rotator (Rotation Angle: angle, X Origin: x, Y Origin: y): Rotate the line segment around the starting point (x, y) by the angle.

takashi
Contributor
  • June 7, 2018
takashi wrote:

Hi @shanetorrens3, assuming that x, y, distance, angle (degrees) are given as attributes of each input feature, a possible way is:

  1. VertexCreator (Mode: Replace with Point): Create the starting point (x, y).
  2. VertexCreator_2 (Mode: Add Point): Add a point (x + distance, y) to the starting point to create a horizontal line segment having the distance.
  3. Rotator (Rotation Angle: angle, X Origin: x, Y Origin: y): Rotate the line segment around the starting point (x, y) by the angle.
oops, exactly same approach! @redgeographics

 


redgeographics
Celebrity
Forum|alt.badge.img+49
takashi wrote:
oops, exactly same approach! @redgeographics

 

Yes, looks like we were writing our responses at the same time :)

 

 


Forum|alt.badge.img

Thanks for the feedback, I'm a bit stuck however. I managed to create the first line but what do I need to do to continue the traverse with say another 8 azimuth and distance?


takashi
Contributor
  • June 8, 2018
shanetorrens3 wrote:

Thanks for the feedback, I'm a bit stuck however. I managed to create the first line but what do I need to do to continue the traverse with say another 8 azimuth and distance?

That depends on how the 8 sets of angle and distance are given. It's hard to find a solution unless you clarify the conditions specifically.

 

 


Forum|alt.badge.img

Hi Takashi,

all the azimuth are decimal degrees with an associated distance. I have worked out my starting point and have managed the first bearing and distance using the solution you guys provided however to add another bearing and distance to that...and then so on?


takashi
Contributor
  • June 8, 2018
shanetorrens3 wrote:

Hi Takashi,

all the azimuth are decimal degrees with an associated distance. I have worked out my starting point and have managed the first bearing and distance using the solution you guys provided however to add another bearing and distance to that...and then so on?

The conditions are still unclear. Does the point have a list attribute storing the angles and distances? Or, are the angles and distances read from an external table?

 

 


Forum|alt.badge.img
shanetorrens3 wrote:

Hi Takashi,

all the azimuth are decimal degrees with an associated distance. I have worked out my starting point and have managed the first bearing and distance using the solution you guys provided however to add another bearing and distance to that...and then so on?

the angles and distances are read from an external excel sheet.

 

 


takashi
Contributor
  • June 8, 2018
shanetorrens3 wrote:

Hi Takashi,

all the azimuth are decimal degrees with an associated distance. I have worked out my starting point and have managed the first bearing and distance using the solution you guys provided however to add another bearing and distance to that...and then so on?

A possible way is: merge all the pairs of angle and distance unconditionally to the point feature and store those values in a list attribute, explode the list to create features for every pair of angle and distance, then perform creating desired lines with the method we have suggested before.

 

The workflow looks like this. In the FeatureMerger, you can perform unconditional merging by setting an identical constant (e.g. 1) to the Join On parameter in both Requestor side and Supplier side. If the Requestor feature has a point geometry originally, the first VertexCreator is not necessary.

 

 

 

 

 


Forum|alt.badge.img
shanetorrens3 wrote:

Hi Takashi,

all the azimuth are decimal degrees with an associated distance. I have worked out my starting point and have managed the first bearing and distance using the solution you guys provided however to add another bearing and distance to that...and then so on?

Thanks Takashi, I will work with this. Thanks.

 

 


sta-koe-ru
Participant
Forum|alt.badge.img
  • Participant
  • July 25, 2024
takashi wrote:

Hi @shanetorrens3, assuming that x, y, distance, angle (degrees) are given as attributes of each input feature, a possible way is:

  1. VertexCreator_2 (Mode: Add Point): Add a point (x + distance, y) to the starting point to create a horizontal line segment having the distance.

I have a similar problem. How do I create the line exactly? In my understanding I only create a second point.

 

Thanks


jkr_wrk
Influencer
Forum|alt.badge.img+28
  • July 25, 2024

If you have a feature and connect two consecutive VertexCreators. First with Replace with Point and the Second with Add Point. Both having different x and or y you get a line.

@sta-koe-ru Could it be your question is a different problem than topic starter? Might be better to start your own question explaining your situation.

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings