Closed lizhi501 closed 2 years ago
The XY to line tool is for creating a line where two coordinates are specified in the attribute table. There is a Processing Toolbox algorithm called "Points to path" that will create a line from points which is what I am thinking you are asking there at the end. The reason I don't have it implemented is because it is already a part of QGIS.
The XY to line tool allows you to specify the input CRS and output CRS for your data so it should work properly for 28356. Make sure you have the correct settings. I have tested it on this sample data which is in 28356 and it worked correctly. id,start_y,start_x,end_y,end_x 1,6270077.57,346702.50,6954103.08,522491.61 2,6562270.47,583874.00,6713771.23,346976.46
Closing because of lack of response.
I have successfully used the XY Line tool before in a project, and found it super effective and straightforward. Thanks for developing the tool!
A colleague of mine wanted to achieve similar results and I was walking him through the process, however we ran into issues that seem to be the result of a CRS mismatch. His workspace was EPSG:28356, which uses an easting and northing grid coordinate system instead of lat long geographic coordinates. I converted the grid reference values to lat long, but the XY tool output (the line layer) was then read as grid reference, even if I selected 4326 as the CRS to use in the tool. I ended up having to create a new 4326 workspace, run the tool to create the line layer, then import it to the 28356 workspace to get it to work, which just seemed a bit clunky.
It would be great (though I say this with no knowledge of how much work it would take) if we could use other geographic reference systems and not just lat-long. Although as I'm guessing an obscure Australia grid reference system probably still wouldn't make the cut, do you have any other suggestions for how to overcome this issue?
Also just as a separate point, I saw in issue #37 there was a comment about the XY line tool failing to make lines between all the points in a layer. This is actually quite a useful feature in my line of work, where we create maps showing origin-destination paths and how many people are travelling between pairs of points. If it would be possible to have the ability to use the tool directly on a point layer and create a line between each pair of points (expect the self-self point pair), that would be hugely useful. In your comment on issue #37 you did mention it was possible, you just didn't see the need.