How do I create an attribute list from points that run along roads in a shapefile containing road data?
The points don't intersect the road centre lines and are not consistent in their distance from the roads.
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
If you want to bring both the points and the roads into a spatialite database, then you can use the ST_Distance function to find points within a certain threshold from the roads:
SELECT p.* FROM points AS p, roads AS r WHERE ST_Distance(r.geometry, p.geometry) < threshold GROUP BY p.id;
(The GROUP BY will insure that if a point is within the threshold distance to two different roads - at an intersection for example - then it will appear only once)
Like ako's suggestion but with a twist, another approach would be to make a points layer with points at regular intervals along the road centerline, say 20m apart. (aka 'Chainages' - or 'Linear Referencing'). Then buffer those points to a diameter of say 19 or 19.5m or so, as large as you can without quite touching each other. The new points you want to identify can then also be buffered at around 4 or 5m diameter circles, sized so they cannot quite fit within 20m either side of your centerline without intersecting at least one of the centerline point buffers, or chainages. The chainage points layer should contain the road name and number and of course the chainages, so when you join those two layers you end up with a new layer with just your new points and with the road name, number and chainage (distance) to identify each of the new points. The new points could be the positions of geotagged photos of road sign or culvert headwalls or whatever other things you might find beside the road that may need documenting. The photo2shape plugin in QGIS is great for importing geotagged photos into a shapefile as a points layer.