Hello Guys
I have a polygon we need to know the length of each segment and which direction the segment is facing
north , south , East or Ouest.
Thanks
Hello Guys
I have a polygon we need to know the length of each segment and which direction the segment is facing
north , south , East or Ouest.
Thanks
Hi
Could you share the polygons for us?
Thanks in Advance,
Danilo
You can use the Chopper (max vertices = 2) to divide the polygon into segments, then use the HorizontalAngleCalculator to get their individual orientation, and the LengthCalculator to get their length.
You can use the Chopper (max vertices = 2) to divide the polygon into segments, then use the HorizontalAngleCalculator to get their individual orientation, and the LengthCalculator to get their length.
Use the GeometryCoercer first to ensure the polygons become lines, otherwise you’ll end up with smaller polygons.
Also be careful with the coordinate system in use: If that is not a projected one (ie you have lat/lon instead of x/y), the angle- and length calculations will be incorrect.
The PolylineAnalyzer might be the most elegant solution.
Use the GeometryCoercer first to ensure the polygons become lines, otherwise you’ll end up with smaller polygons.
That isn’t necessary, the output from the Chopper will only contain lines if max vertices = 2.
Also be careful with the coordinate system in use: If that is not a projected one (ie you have lat/lon instead of x/y), the angle- and length calculations will be incorrect.
True, you can also use the GeographicLengthCalculator if that is an issue.
The PolylineAnalyzer might be the most elegant solution.
I wasn’t aware of that one, looks interesting. It seems to have the same issue as the LengthCalculator regarding ground units, however?
could you please explain how output of the angle and the azimuth from the Angle calculator will give me the orientation , Est ,West ,North and South
Thanks
could you please explain how output of the angle and the azimuth from the Angle calculator will give me the orientation , Est ,West ,North and South
Thanks
The azimuth values increase clockwise from the reference point of north (which represents zero degrees). So you could e.g. say that _azimuth values in the range 315-45 = North, 45-135 = East, etc.
Example:
Source: https://academic.brooklyn.cuny.edu/geology/leveson/core/linksa/comp.html