Skip to main content
Solved

create point on rotated areas

  • September 24, 2017
  • 5 replies
  • 6 views

franco69
Contributor
Forum|alt.badge.img+6

i have a lot of areas which are exactly the same size but they have certain kind of rotations

 

now i have to create point which is located on the down right corner with an offset of ca. 50 -x and 50 +y

problems:

 

when i solve the polygon into points (PointVertexReplacer) not every point on the right down corner has the same IDs (vertexID)...

when i set an offset the points will go other directions because of the different rotations of the areas

hope someone can help me there

Thank you and Greetz

Cheers

Franco

Best answer by takashi

As long as seeing your screenshot, your desired corner seems to be "right end node of lower long side" for each rectangle. If so, assuming all the rectangles have the same size, a possible way is:

View original
Did this help you find an answer to your question?

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+48

If you use the BoundsExtractor and then create a point on the _xmax and _ymin coordinates you have the down right corner of the bounding box. Plug that into a NeighborFinder along with the original geometry (and group by a unique id, use a Counter to create one if you don't have one) and then you'll get the most down-right coordinates of the original geometry as the _closest_candidate_x and _closest_candidate_y


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • September 24, 2017

I'm afraid it's not so simple.

The meaning of "down right corner" is not obvious. To simplify the problem, even you assume the shape is rectangle, there are at least two possible definitions for "down right corner".

Lower vertex in two right-hand vertices:

Right-hand vertex in two lower vertices:

First of all, you have to define what "down right corner" is for the actual shape, I think.

redgeographics
Celebrity
Forum|alt.badge.img+48
takashi wrote:

I'm afraid it's not so simple.

The meaning of "down right corner" is not obvious. To simplify the problem, even you assume the shape is rectangle, there are at least two possible definitions for "down right corner".

Lower vertex in two right-hand vertices:

Right-hand vertex in two lower vertices:

First of all, you have to define what "down right corner" is for the actual shape, I think.
You're right, my assumption is that the down right corner is the vertex that's closest to the down right corner of the feature's bounding box, but thay may indeed lead to "strange" results sometimes.

 

 


franco69
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • September 25, 2017

My mapsheets are on screenshot.....i rotate the layout always that mapsheet is horizontal

 

The right down corner from this horizontal mapsheet finally is meant.

Greetz

Franco


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • September 25, 2017

As long as seeing your screenshot, your desired corner seems to be "right end node of lower long side" for each rectangle. If so, assuming all the rectangles have the same size, a possible way is:


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