## GeoMedia

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for
Do you mean
Highlighted
Contributor
Posts: 43
Registered: ‎08-21-2017

# functional attribut for a feature on the right side of an other feature

Hi all,

I've got a featureclass that contains a lot of sequences of lines. These are allways situated on the left and right side of any< other featureclass (see picture).

Now I would like to select all the sequences that are situated on the right side of the other feature. Is there any functional attribute that is able to select features this way? Or does anyone know another way to solve this?

I couldn't find anything so far.

Thanks for any help.

Regards,

Christian

Regular Contributor
Posts: 207
Registered: ‎05-25-2016

## Re: functional attribut for a feature on the right side of an other feature

Hi Christian

An possible idea: If the distance between the sequences of lines is constant you can try with a buffer geometry.

Create a buffer geometry around the right side feature with the distance between the sequences of lines (or a bit more). Make an intersection between the buffer geometry and the midline geometry and look - because of overlaps - for the longest intersected line geometry inside the buffer. This longest line geometry should be the corresponding midline. Now you can join/connect the middle line with the right line via IDs.

That should works if the distance between the sequences of lines is (nearly) constant and the proportion of the lines are "line-like".

Maybe this is an approach.

Regards,

hesrah

Staff
Posts: 132
Registered: ‎05-26-2016

## Re: functional attribut for a feature on the right side of an other feature

If the lines to left and right of a given feature class are of another feature class and may not  be parallel or a similar length to midline,

the you could probably use POINTS(Input .geometry) to show the points of these left and right lines. The ID of the points inherits the ID of the associated line.  You can determine which points are on left/right of the midline. Any single point thus identifies the associated ID of the line.

Here's an old document I wrote which shows two methods to determine what side of a line a point resides. It is however based on direction line was digitized. We used this in I/CAD applications.  It may be of use.

Contributor
Posts: 67
Registered: ‎10-10-2017

## Re: functional attribut for a feature on the right side of an other feature

[ Edited ]

Hi Chirstian and everyone.

Here is a relatively easy solution to disntinguish between right and left side of 2 parallel lines (Lines)taking into consideration that the 2 parallel lines  should have the same direction:

1. Turn the lines into segments in order to attribute to each of them a clear direction: FA :Segments(Lines). name it Segments_Lines and name the geometry field: Geometry_Segments.
2. Attribute to each segment(the result of 1) its angle and its center point coordinates: FA:
1. Angle=ANGLE(Input.Geometry_Segments, ProjectedMeas, Degree)
2. X1=X(CENTROID(Input.Geometry_Segments), ProjectedMeas, Meter)
3. Y1=Y(CENTROID(Input.Geometry_Segments), ProjectedMeas, Meter)
3. Determine the distance between the 2 parallel segments by aggregating the resutl of 2 to itself, setting the spatial aggregation to :are within distance of: Maximum distance between 2 parallel lines and the output to :
Distance=MIN(IF(Detail.ID<>Input.ID, DISTANCE(Input.Geometry_Segments, Detail.Geometry_Segments), MaxDistance))
MaxDistance is a long integer set by user that should be > Maximum possible distance between 2 parallel segments.
The If condition was added in order to exclude the segments on the same side (which have the same ID) from the aggregation.
ID is the orginal ID of each line set as autonumber.

4. FA on the result of 3 :
X2=Input.X1+Input.Distance*COS(Input.Angle*PI()/180)
Y2=Input.Y1-Input.Distance*SIN(Input.Angle*PI()/180)

5. Geocode the result of 4  setting the positive East to : X2 and the positive North to :Y2
This will output 1 point for each segment: name it Segments_Points.

6. Aggregate the orignal lines(Lines) to Segments_Points setting the spatial aggregation to : within distance of: 1 m ,  and the output to CountSpa=Count(*).

7. The Lines which intersect the Segments_Points are the lines on the Right side.
The Lines which do not intersect the Segments_Points are the lines on the Left side.
Attribute query on the result of 6: CountSpa>0 flters the lines on the Right side.
Attribute query on the result of 6: CountSpa=0 flters the lines on the Left side.

8. Mission accomplished.

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.