4

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.

6

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.

  • 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
2

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".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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