I have a small road portion of a country in a form of linestrings. I want to compare it with the whole area of country(also linestrings) and get the features of the matching linestrings. The matching should be so exact that no extra points from whole country should appear in matching linestrings that does not appear to be in the small road portion. I have been comparing them with ST_intersect but the area I got contains some extra linestrings from the whole Area of country that are not in small portion of road. The techniques I have been reading suggests that I should be creating a some kind of a buffer to create the comparison. Somebody know an technique to get the exact comparison of these two linestring?. I have just started using POSTGIS so I am newbie.
The query I am using is this one but contains extra lines from WholeAreaTable which are not in SmallPortionTable
CREATE Table ExtraLineArea AS select id ,link.Geometry from WholeAreaTable WAT, SmallPortionTable SPT where
ST_Intersects(WAT.Geometry,SPT.Geometry)
I am selecting the id and geometry of WholeAreaTable when both geometries intersect. In the image brown line represents that intersecting area of both geometries. As WholeAreaTable contains all the geometries of country it is giving some extra line other then intersecting area which is purple line in the image(see on top of image single purple line).
I want comparison of WholeAreaTable and SmallPortionTable in such a way that this purple line should not appear in the final result.