Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How do I create an attribute list from points that run along roads in a shape file containing road data? The points don't intersect the road centre lines and are not consistent in their distance from the roads.

share|improve this question
6  
Sounds like you need to decide how far from the road you will consider "along" it. Then run a buffer on your road feature and select points using that. Both functions are found under the vector menu, under Geoprocessing Tools and Research Tools, respectively. –  ako May 3 '13 at 6:38
add comment

2 Answers 2

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)

share|improve this answer
    
This is of course assuming they have a PostGIS (or other enterprise DB set up that supports OGC compliant queries) that they are querying the data from. This query wouldn't be possible with, for example, shapefiles. –  RyanDalton Aug 3 '13 at 1:45
    
Using spatialite it's certainly possible. –  Micha Aug 3 '13 at 16:29
    
Sorry that I didn't notice the spatialite reference. Thanks for pointing is out. –  RyanDalton Aug 4 '13 at 17:51
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.