QGIS – Fixing Empty Output in ShapeTools XY to Line Conversion

convertqgisqgis-plugins

I have a shapefile with 2 points.

I am using the XY to Line tool in the ShapeTools plugin to create a Geodesic, Great Circle, and Simple Line. However, in each case, the tool is running successfully, but producing empty outputs.

The following screenshots shows the parameters:

enter image description here

The straight line connecting the 2 points is getting successfully created if I use the Points to Path tool.

The aim of this exercise is to be able to see the difference in geodetic distance and Euclidean distance. I also want to show how the projection of the geodetic line connecting the two points look like on a flat map.

If I do not check the optional check boxes, Use the point geometry for the line starting point and Use the point geometry for the line ending point, the tool show the error Please select valid starting and ending point columns.

I am using QGIS 3.4.1

Best Answer

You seem to have checked both 'Use point geometry for the line starting/ending point'. However, this tool is meant to work with 1 feature > 1 line, not 2 features > 1 line. Try to include all the info (start/end x/y fields) in one single record per line that you want to create.

The tool help states the following : 'One of the coordinates can be from a point layer geometry', so you can only use a point geometry for one of the coordinates, and the other coordinate pair would have to be in 2 fields (x/y) in the table.

Related Question