Skip to main content

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

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


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.

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.

 

 


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


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:


Reply