05-27-2018 09:40 PM
I notice an existing ideation board entry to add ability to flip / mirror data - https://community.hexagongeospatial.com/t5/Product-Ideas/Flip-geometries-in-the-map-window/idi-p/193...
Wondering if anyone has a workaround to allow it today?
Solved! Go to Solution.
05-28-2018 05:39 PM
For a feature , like a symbol with a rotation , and you want to do in bulk,you can use Update Attributes
For other features:
You can Mirror/flip Horizontally or vertically in bulk using Functional Attributes (2 queries)
For example have polygon string and Mirror on Y axis around first point in string
Get the coordinates of the points in string
x_pts - X(POINTS(Input.Geometry), ProjectedMeas, Meter)
y_pts - Y(POINTS(Input.Geometry), ProjectedMeas, Meter)
Choose the point you want to Mirror about, i've used Startpoint in this example. Could be centrepoint, or something else.
x_spt - X(STARTPOINT(Input.Geometry), ProjectedMeas, Meter)
y_spt - Y(STARTPOINT(Input.Geometry), ProjectedMeas, Meter)
I'm only going to Mirror about Y horizontal axis, similar syntax for X vertical axis
y_mpt - Output.y_pts-Output.y_spt
The negative sign in front of the 2 is the direction of the flip, ie above or below the axis
PTS - MOVE(POINTS(Input.Geometry), 0, -2*Output.y_mpt, 0, ProjectedMeas)
Mirrored_line - CREATEPOLYLINE(Output.PTS)
You now have the mirrored line in query as secondary geometry
Create a new query to get the mirrored line, which you can save or whatever
Mirrored - FILTERLINEAR(Input.mirrored_line)
05-28-2018 06:30 PM
Nice - thanks Roland.
Works for simple geometries which I believe is all we need in this case.
Swapped the CREATEPOLYLINE to CREATEPOLYGON and seems good on my test dataset.
If using complex geometries (e.g. collections, polygons with holes etc) will need manual cleanup afterwards.