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.

I have a OSM-Shapefile containing all roads of a given area. I need an overlay cut out of this source-Shapefile that contains only some routes that I want to highlight on my map. I have some GPX-Tracks that show those routes, but they aren't precise enough to use them directly as an overlay. How can I use those GPX-Tracks to select the corresponding roads of the original shapefile, cut them out and copy them in a new shapefile? Is it possible to set a certain "buffer area" for selecting lines also if they don't exactly overlay with the GPX-file? I'm using QGIS normally, and possibly I'm searching for a opensource solution. Thank you!

share|improve this question
    
Which software are you working with? –  Stefan Dec 12 '12 at 7:12
    
My normal workflow is QGIS, Globalmapper, Avenza Mapublisher (plugin for Adobe Illustrator) - but I would take every Opensource-Tool that can do this task. –  Ralf Glaser Dec 12 '12 at 7:28
    
I dont have any idea how you do this in QGIS without PostGIS layer , but here is SQL select for it 'select * from roads as r , (select st_union(st_buffer(the_geom),10) as the_geom from gps ) as g where ST_Contains(g.the_geom, r.the_geom) IS TRUE' But that logic should return only and only roads that gps route follows. You can't use intersect or within because that will give you too many roads at road intersections. Value 10 in st_buffer should be little bit bigger than you highest value from distance calculation between gps point and closest road. This assumes that your data is good. –  simplexio Dec 12 '12 at 8:42
    
Hello simplexio, thank you very much. Doesn't sound that easy... since I haven't yet experience with SQL - is there a way to do it in QGIS WITH a Post GIS Layer? –  Ralf Glaser Dec 12 '12 at 8:52
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.