Skip to main content
added 140 characters in body
Source Link
Xeppit
  • 1.4k
  • 6
  • 12

It's a fast fix:

The basic idea is to convert your points to a WKT Well-known text representation of geometry in EXCEL and export it as CSV data into QGIS. Therefore we create a new field (column) in EXCEL and call it geometry and construct a WKT LineString as Textthat can be read in qgis csv import.

In WKT two point coordinates (x,y) a seperated by a whitespace and the next point is seperated by a comma ",".

We can use:

POINT (30 10)

LINESTRING (30 10, so10 30, 40 40)

POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))

and some other options.

So we can construct a WKT for each row with the function TEXTJOIN in EXCEL.

In ExcelEXCEL use:

="LINESTRING(" & TEXTJOIN(" ";TRUE;A2;B2) & "," & TEXTJOIN(" ";TRUE;C2;D2) & ")"

enter image description here

Now you have a column called geometry

Important hint As you live in a country with a comma as decimal sepertaor you must convert your coordinates to a format with "." instead of ",".

enter image description here

Save your file as CSV in EXCEL.

Now in qgis import your CSV from menu --> Layer --> Add delimated Text Layer. Your geometry defintion is WKT and your geometry field is the geometry field you created in EXCEL. Choose Line as geometry type and your CRS.

enter image description here

Now you have a regular line layer with your fields and attributes in qgis and you can calculate what ever you want. Perhaps you must reproject your layer to get the length in km.

It's a fast fix:

The basic idea is to convert your points to a WKT Well-known text representation of geometry in EXCEL and export it as CSV data into QGIS. Therefore we create a new field (column) in EXCEL and call it geometry and construct a WKT LineString as Textthat can be read in qgis csv import.

In WKT two point coordinates (x,y) a seperated by a whitespace and the next point is seperated by a comma ",", so we can construct a WKT for each row with the function TEXTJOIN in EXCEL.

In Excel use:

="LINESTRING(" & TEXTJOIN(" ";TRUE;A2;B2) & "," & TEXTJOIN(" ";TRUE;C2;D2) & ")"

enter image description here

Now you have a column called geometry

Important hint As you live in a country with a comma as decimal sepertaor you must convert your coordinates to a format with "." instead of ",".

enter image description here

Save your file as CSV in EXCEL.

Now in qgis import your CSV from menu --> Layer --> Add delimated Text Layer. Your geometry defintion is WKT and your geometry field is the geometry field you created in EXCEL. Choose Line as geometry type and your CRS.

enter image description here

Now you have a regular line layer with your fields and attributes in qgis and you can calculate what ever you want. Perhaps you must reproject your layer to get the length in km.

It's a fast fix:

The basic idea is to convert your points to a WKT Well-known text representation of geometry in EXCEL and export it as CSV data into QGIS. Therefore we create a new field (column) in EXCEL and call it geometry and construct a WKT LineString as Textthat can be read in qgis csv import.

In WKT two point coordinates (x,y) a seperated by a whitespace and the next point is seperated by a comma ",".

We can use:

POINT (30 10)

LINESTRING (30 10, 10 30, 40 40)

POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))

and some other options.

So we can construct a WKT for each row with the function TEXTJOIN in EXCEL.

In EXCEL use:

="LINESTRING(" & TEXTJOIN(" ";TRUE;A2;B2) & "," & TEXTJOIN(" ";TRUE;C2;D2) & ")"

enter image description here

Now you have a column called geometry

Important hint As you live in a country with a comma as decimal sepertaor you must convert your coordinates to a format with "." instead of ",".

enter image description here

Save your file as CSV in EXCEL.

Now in qgis import your CSV from menu --> Layer --> Add delimated Text Layer. Your geometry defintion is WKT and your geometry field is the geometry field you created in EXCEL. Choose Line as geometry type and your CRS.

enter image description here

Now you have a regular line layer with your fields and attributes in qgis and you can calculate what ever you want. Perhaps you must reproject your layer to get the length in km.

added 841 characters in body
Source Link
Xeppit
  • 1.4k
  • 6
  • 12

It's a fast fix:

The basic idea is to convert your points to a WKT Well-known text representation of geometry in EXCEL and export it as CSV data into QGIS. Therefore we create a new field (column) in EXCEL and call it geometry and construct a WKT LineString as Textthat can be read in qgis csv import.

In WKT two point coordinates (x,y) a seperated by a whitespace and the next point is seperated by a comma ",", so we can construct a WKT for each row with the function TEXTJOIN in EXCEL.

In Excel use:

="LINESTRING(" & TEXTJOIN(" ";TRUE;A2;B2) & "," & TEXTJOIN(" ";TRUE;C2;D2) & ")"

enter image description here

Now you have a column called geometry

Important hint Important your coordinateAs you live in a country with a comma as decimal delimetersepertaor you must convert your coordinates to a format with "." instead of "," . In excel change "," to "."  

enter image description here

Save your file as csvCSV in EXCEL.

Now in qgis import your csvCSV from menu --> Layer --> Add delimated Text Layer. Your geometry defintion is WKT and your geometry field is the geometry field you created in EXCEL. Choose Line as geometry type and your CRS.

enter image description here

Now you have a regular line layer with your fields and attributes in qgis and you can calculate what ever you want. Perhaps you must reproject your layer to get the length in km.

It's a fast fix:

In Excel use:

="LINESTRING(" & TEXTJOIN(" ";TRUE;A2;B2) & "," & TEXTJOIN(" ";TRUE;C2;D2) & ")"

enter image description here

Now you have a column called geometry Important your coordinate decimal delimeter "." instead of "," . In excel change "," to "." enter image description here

Save as csv

Now in qgis import your csv

enter image description here

Now you have a regular line layer with your fields and attributes in qgis and you can calculate what ever you want. Perhaps you must reproject your layer to get the length in km.

It's a fast fix:

The basic idea is to convert your points to a WKT Well-known text representation of geometry in EXCEL and export it as CSV data into QGIS. Therefore we create a new field (column) in EXCEL and call it geometry and construct a WKT LineString as Textthat can be read in qgis csv import.

In WKT two point coordinates (x,y) a seperated by a whitespace and the next point is seperated by a comma ",", so we can construct a WKT for each row with the function TEXTJOIN in EXCEL.

In Excel use:

="LINESTRING(" & TEXTJOIN(" ";TRUE;A2;B2) & "," & TEXTJOIN(" ";TRUE;C2;D2) & ")"

enter image description here

Now you have a column called geometry

Important hint As you live in a country with a comma as decimal sepertaor you must convert your coordinates to a format with "." instead of ",". 

enter image description here

Save your file as CSV in EXCEL.

Now in qgis import your CSV from menu --> Layer --> Add delimated Text Layer. Your geometry defintion is WKT and your geometry field is the geometry field you created in EXCEL. Choose Line as geometry type and your CRS.

enter image description here

Now you have a regular line layer with your fields and attributes in qgis and you can calculate what ever you want. Perhaps you must reproject your layer to get the length in km.

added 2 characters in body
Source Link
Xeppit
  • 1.4k
  • 6
  • 12

It's a fast fix:

In Excel use:

="LINESTRING(" & TEXTJOIN(" ";TRUE;A2;B2) & "," &TEXTJOIN& TEXTJOIN(" ";TRUE;C2;D2) &"& ")"

enter image description here

Now you have a column called geometry Important your coordinate decimal delimeter "." instead of "," . In excel change "," to "." enter image description here

Save as csv

Now in qgis import your csv

enter image description here

Now you have a regular line layer with your fields and attributes in qgis and you can calculate what ever you want. Perhaps you must reproject your layer to get the length in km.

It's a fast fix:

In Excel use:

="LINESTRING(" & TEXTJOIN(" ";TRUE;A2;B2) & "," &TEXTJOIN(" ";TRUE;C2;D2) &")"

enter image description here

Now you have a column called geometry Important your coordinate decimal delimeter "." instead of "," . In excel change "," to "." enter image description here

Save as csv

Now in qgis import your csv

enter image description here

Now you have a regular line layer with your fields and attributes in qgis and you can calculate what ever you want. Perhaps you must reproject your layer to get the length in km.

It's a fast fix:

In Excel use:

="LINESTRING(" & TEXTJOIN(" ";TRUE;A2;B2) & "," & TEXTJOIN(" ";TRUE;C2;D2) & ")"

enter image description here

Now you have a column called geometry Important your coordinate decimal delimeter "." instead of "," . In excel change "," to "." enter image description here

Save as csv

Now in qgis import your csv

enter image description here

Now you have a regular line layer with your fields and attributes in qgis and you can calculate what ever you want. Perhaps you must reproject your layer to get the length in km.

Source Link
Xeppit
  • 1.4k
  • 6
  • 12
Loading