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 table of stream reaches with xy coordinates for their respective tops and bottoms.

I'd like to convert the table to a feature, using the xy coordinates as the endpoints of the line.

Any suggestions as to the best workflow for doing this would be fantastic. I've googled, but either my vocabulary is off or this isn't a task that's given others much trouble.

Thanks

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

The Points2One Plugin might be helpful here. Your data will have to be in the following format:

id,      order, x,       y
stream1, 1,     x_start, y_start
stream1, 2,     x_end,   y_end
stream2, 1,     x_start, y_start
stream2, 2,     x_end,   y_end

After loading a file like this, you should get four points displayed. In Points2One Plugin, you can chose that points should be connected to lines grouped by the "id" value and sorted by the "order" value.

share|improve this answer
    
Perfect. Checking it out now. –  Jacques Tardie Oct 19 '11 at 13:03
    
Where is it that you can get hold of or install the points to one plug in? –  user6607 Mar 29 '12 at 11:00
    
@sam Plugins menu - Fetch Python Plugins. Search for Points2One. –  underdark Mar 29 '12 at 11:22
add comment

In QGIS, try the "Points2One" plugin, and set the output geometry to lines. It requires the features you wish to be grouped together to have the same IDs.

EDIT: I see you have the data in a table. You would need to first import the table to a point shapefile (using the Delimited Text plugin). Then use the shapefile in the Points2One plugin.

Kosmo GIS also has a tool for this - "Get Lines From Points".

share|improve this answer
    
Thanks so much ! Great help to suggest the pointsto2 –  user6610 Mar 29 '12 at 11:55
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.