I have two postgis layers:
- The first layer contains the sidewalks of my town (polygons in blue).
- The second one contains the pavements (roads) of my town (polygons in brown).
The map looks like this in QGIS with both layers activated:
Ok, now I have to obtain a layer with the curbs (lines) in the town starting from these two layers. The new layer must be composed of linestrings. Each element in this new layer should be a linestring where every of the greometries of the two layers intersect.
In the following snapshot I manually painted the geometries that should be created in this particual area:
Sorry about my bad pulse. I hope it helps to understand me better.
Ok, if I just add the layers to QGIS, for example, and intersect one layer with another I get the following layer:
The new green layer is the obtained curbs layer. I have two snags with this layer:
- It is composed of polygons
- Not all the curvs are drawn.
With this last evidence I discover that the sidewalks and roads layers were not precisely delineated one next to the other, so I need some kind of tolerance in the operation to get the layer I am looking for. As I told before it should be a linestring layer.
I don't mind if the query is directly done in postgis or using QGIS or other software's tools, I just can't figure out right now how to solve this.