I need some help because I do not know how to model this issue:
I have two polyline shapefiles. They have an attribute that I need to be compared. These are roads from different sources. So, I have their names and attributes.
My intention is to make this comparison within each GRID cell, so, I created a GRID with the fishnet tool, and then "Intersected" each polyline with the GRID, I have something like this:
BUT, I think that it is important to use the "NAME" attribute, for a better comparison between elements with same name. I should need to distinguish polylines, like this example:
For example, If it compares the SE attribute with the one that crosses (it has SW), it gives me something wrong.
Maybe, another possibility is taking into account their bearing, or something related with its angle, because it happens to be, in most cases parallels.
Sorry, but I'm a bit lost. I think it is something tricky, but I hope there is a possible methodology for this purpose. Any ideas?
---- Edit ----
I'm thinking about the bearing question. This is my idea:
- Select all the GRID cell that intersect with my desired geo (the black one).
- Export to a new layer the selected. So I only have grid cells spatially containing my geo and possibly the geo to contrast (red one).
- Compute the bearing for each line Black and Red (previously intersected with the GRID cells).
- Start a WHILE-clause loop with:
WHILE counter > 0
Count the number of Black features contained into the cell. "var counter"
Select a black feature.
Take value of the QUESTIONED attribute (for example NE);
IF the red geo has a bearing value +-5% from the blacks value THEN
take (in another var) the red questioned attribute (for example NE); IF var1 == var2 THEN write "SAME" into a String field from Red geo. ELSE IF Write "ERROR" into the same string field.
Counter = Counter - 1 Next feature
I have never implemented such a pseudocode, any help for this? maybe is a good starting...
Anyone would adventure in that?