NationalSecurityAgency / qgis-shapetools-plugin

Shape Tools creates geodesic shapes and includes a number of geodesic tools for QGIS including the XY to Line tool, geodesic densify tool, geodesic line break, geodesic measure tool, geodesic measurement layer, geodesic scale, rotate and translate tool, and digitize points at an azimuth & distance tools.
GNU General Public License v2.0
157 stars 66 forks source link

XY to Line: feat.req: interpret 1 lat & 1 lon col as start/stop #16

Closed SimonDedman closed 6 years ago

SimonDedman commented 6 years ago

Notwithstanding I see the logic of having the users specify start & stop lat/lons as separate columns for cases of multiple A-to-B lines, it would be nice if the code could give the users the option to use only a single lat & lon and have this interpreted as a continuous line, defaulting to the order set in the layer unless another field is specified. For lat & lon columns of length N this would be something like (language-generic code):

x=1 for (x in 1:N-1) { From lat/lon x to lat/lon x+1 x = x+1 }

hamiltoncj commented 6 years ago

@SimonDedman Let me see if I understand the question. I believe that you are asking for the capability to create a single line from a table that has multiple points and basically join all the points together by a line. Each row in the table would be another point in the line. There may already be a plugin for this. Is this what you are asking for?

http://plugins.qgis.org/plugins/pointstopaths_v02/

SimonDedman commented 6 years ago

It seems to be, yes. Thanks!

SimonDedman commented 6 years ago

Spoke too soon: that plugin is incompatible with QGIS v3 so if you do happen to be minded to tack on this functionality, I believe it would be welcomed. Cheers!

hamiltoncj commented 6 years ago

I did some more searching and QGIS 3 in the Processing Toolbox, under "Vector creation" has a function called "Points to path". I think that will do what you need.

SimonDedman commented 6 years ago

It does indeed. Thanks for sleuthing this out. Seems the timeline of qgis versions & their orphaned compatible plugins means internet searching can turn up a load of defunct hits, while functionality being recently boiled into the core program can be under-documented. Have a cracking weekend.