QGIS: list of coordinates to polygon [duplicate]
This question already has an answer here:
How to create a polygon using coordinates?
1 answer
In the course of a monitoring exercise for small scale farmers, we captured the coordinates of fields using a GPS tracking in the SurveyCTO app. We used automatic capturing of the coordinates every 5 seconds to compensate for low GPS accuracy. Therefore, the coordinate list for every field is very long. With these coordinates, we would like to create polygons in QGIS to e.g. determine the size of fields. Unfortunately, the coordinates can only be extracted in one cell of an excel file. This looks like this:
Now my question is: Does anyone have a suggestion how we can import such a list into QGIS in a way that a polygon is created for each of these coordinate lists?
qgis polygon coordinates
marked as duplicate by Andre Silva, nmtoken, JGH, BERA, Richard Law Nov 23 '18 at 23:20
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to create a polygon using coordinates?
1 answer
In the course of a monitoring exercise for small scale farmers, we captured the coordinates of fields using a GPS tracking in the SurveyCTO app. We used automatic capturing of the coordinates every 5 seconds to compensate for low GPS accuracy. Therefore, the coordinate list for every field is very long. With these coordinates, we would like to create polygons in QGIS to e.g. determine the size of fields. Unfortunately, the coordinates can only be extracted in one cell of an excel file. This looks like this:
Now my question is: Does anyone have a suggestion how we can import such a list into QGIS in a way that a polygon is created for each of these coordinate lists?
qgis polygon coordinates
marked as duplicate by Andre Silva, nmtoken, JGH, BERA, Richard Law Nov 23 '18 at 23:20
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to create a polygon using coordinates?
1 answer
In the course of a monitoring exercise for small scale farmers, we captured the coordinates of fields using a GPS tracking in the SurveyCTO app. We used automatic capturing of the coordinates every 5 seconds to compensate for low GPS accuracy. Therefore, the coordinate list for every field is very long. With these coordinates, we would like to create polygons in QGIS to e.g. determine the size of fields. Unfortunately, the coordinates can only be extracted in one cell of an excel file. This looks like this:
Now my question is: Does anyone have a suggestion how we can import such a list into QGIS in a way that a polygon is created for each of these coordinate lists?
qgis polygon coordinates
This question already has an answer here:
How to create a polygon using coordinates?
1 answer
In the course of a monitoring exercise for small scale farmers, we captured the coordinates of fields using a GPS tracking in the SurveyCTO app. We used automatic capturing of the coordinates every 5 seconds to compensate for low GPS accuracy. Therefore, the coordinate list for every field is very long. With these coordinates, we would like to create polygons in QGIS to e.g. determine the size of fields. Unfortunately, the coordinates can only be extracted in one cell of an excel file. This looks like this:
Now my question is: Does anyone have a suggestion how we can import such a list into QGIS in a way that a polygon is created for each of these coordinate lists?
This question already has an answer here:
How to create a polygon using coordinates?
1 answer
qgis polygon coordinates
qgis polygon coordinates
edited Nov 21 '18 at 16:38
Vale
828519
828519
asked Nov 21 '18 at 14:35
cbrcbr
62
62
marked as duplicate by Andre Silva, nmtoken, JGH, BERA, Richard Law Nov 23 '18 at 23:20
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Andre Silva, nmtoken, JGH, BERA, Richard Law Nov 23 '18 at 23:20
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
You are going to need to edit the coordinates to make them into Polygons.
The easiest way is to open the file in excel (or open office) and adding a new string column where you concatenate "POLYGON((" to the start, then your coordinates replacing ';' with ',' and then add "))" on the end. So a formula something like:
=CONCATENATE("POLYGON((",SUBSTITUTE(B2,";",","),"))")
At least in OpenOffice Calc.
Then you can save it as a CSV file and import it into QGIS using the delimited text import (and selecting WKT for the geometry).
You may run into issues with the polygons being invalid as the first and last points should be the same, in that case use:
=CONCATENATE("LINESTRING(",SUBSTITUTE(B2,";",","),")")
to import them as lines and convert them to polygons in QGIS.
add a comment |
You'll have to manipulate the data a bit to get it to conform to WKT format in Excel or a text editor but then you may add it as a delimited text layer and use the WKT option:
https://en.wikipedia.org/wiki/Well-known_text
id~coord
1~POLYGON((-83.784 42.215, -83.264 42.256, -83.264 42.49, -83.784 42.215))
2~POLYGON((-83.784 42.415, -83.344 42.236, -83.94 42.999, -83.784 42.415))
3~POLYGON((-83.484 42.315, -83.244 42.346, -83.233 42.2, -83.484 42.315))
add a comment |
You can import it as a delimited text layer and choose WKT and polygon as the type of geometry.
Thanks for the quick reply. Unfortunately, this only adds the csv file as attribute table ("NoGeometry" displayed in the properties) and not as shape file although I selected the "coord" column as geometry field and "polygon" as geometry type when importing as WKT...
– cbr
Nov 21 '18 at 15:08
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You are going to need to edit the coordinates to make them into Polygons.
The easiest way is to open the file in excel (or open office) and adding a new string column where you concatenate "POLYGON((" to the start, then your coordinates replacing ';' with ',' and then add "))" on the end. So a formula something like:
=CONCATENATE("POLYGON((",SUBSTITUTE(B2,";",","),"))")
At least in OpenOffice Calc.
Then you can save it as a CSV file and import it into QGIS using the delimited text import (and selecting WKT for the geometry).
You may run into issues with the polygons being invalid as the first and last points should be the same, in that case use:
=CONCATENATE("LINESTRING(",SUBSTITUTE(B2,";",","),")")
to import them as lines and convert them to polygons in QGIS.
add a comment |
You are going to need to edit the coordinates to make them into Polygons.
The easiest way is to open the file in excel (or open office) and adding a new string column where you concatenate "POLYGON((" to the start, then your coordinates replacing ';' with ',' and then add "))" on the end. So a formula something like:
=CONCATENATE("POLYGON((",SUBSTITUTE(B2,";",","),"))")
At least in OpenOffice Calc.
Then you can save it as a CSV file and import it into QGIS using the delimited text import (and selecting WKT for the geometry).
You may run into issues with the polygons being invalid as the first and last points should be the same, in that case use:
=CONCATENATE("LINESTRING(",SUBSTITUTE(B2,";",","),")")
to import them as lines and convert them to polygons in QGIS.
add a comment |
You are going to need to edit the coordinates to make them into Polygons.
The easiest way is to open the file in excel (or open office) and adding a new string column where you concatenate "POLYGON((" to the start, then your coordinates replacing ';' with ',' and then add "))" on the end. So a formula something like:
=CONCATENATE("POLYGON((",SUBSTITUTE(B2,";",","),"))")
At least in OpenOffice Calc.
Then you can save it as a CSV file and import it into QGIS using the delimited text import (and selecting WKT for the geometry).
You may run into issues with the polygons being invalid as the first and last points should be the same, in that case use:
=CONCATENATE("LINESTRING(",SUBSTITUTE(B2,";",","),")")
to import them as lines and convert them to polygons in QGIS.
You are going to need to edit the coordinates to make them into Polygons.
The easiest way is to open the file in excel (or open office) and adding a new string column where you concatenate "POLYGON((" to the start, then your coordinates replacing ';' with ',' and then add "))" on the end. So a formula something like:
=CONCATENATE("POLYGON((",SUBSTITUTE(B2,";",","),"))")
At least in OpenOffice Calc.
Then you can save it as a CSV file and import it into QGIS using the delimited text import (and selecting WKT for the geometry).
You may run into issues with the polygons being invalid as the first and last points should be the same, in that case use:
=CONCATENATE("LINESTRING(",SUBSTITUTE(B2,";",","),")")
to import them as lines and convert them to polygons in QGIS.
answered Nov 21 '18 at 15:04
Ian Turton♦Ian Turton
47.6k546111
47.6k546111
add a comment |
add a comment |
You'll have to manipulate the data a bit to get it to conform to WKT format in Excel or a text editor but then you may add it as a delimited text layer and use the WKT option:
https://en.wikipedia.org/wiki/Well-known_text
id~coord
1~POLYGON((-83.784 42.215, -83.264 42.256, -83.264 42.49, -83.784 42.215))
2~POLYGON((-83.784 42.415, -83.344 42.236, -83.94 42.999, -83.784 42.415))
3~POLYGON((-83.484 42.315, -83.244 42.346, -83.233 42.2, -83.484 42.315))
add a comment |
You'll have to manipulate the data a bit to get it to conform to WKT format in Excel or a text editor but then you may add it as a delimited text layer and use the WKT option:
https://en.wikipedia.org/wiki/Well-known_text
id~coord
1~POLYGON((-83.784 42.215, -83.264 42.256, -83.264 42.49, -83.784 42.215))
2~POLYGON((-83.784 42.415, -83.344 42.236, -83.94 42.999, -83.784 42.415))
3~POLYGON((-83.484 42.315, -83.244 42.346, -83.233 42.2, -83.484 42.315))
add a comment |
You'll have to manipulate the data a bit to get it to conform to WKT format in Excel or a text editor but then you may add it as a delimited text layer and use the WKT option:
https://en.wikipedia.org/wiki/Well-known_text
id~coord
1~POLYGON((-83.784 42.215, -83.264 42.256, -83.264 42.49, -83.784 42.215))
2~POLYGON((-83.784 42.415, -83.344 42.236, -83.94 42.999, -83.784 42.415))
3~POLYGON((-83.484 42.315, -83.244 42.346, -83.233 42.2, -83.484 42.315))
You'll have to manipulate the data a bit to get it to conform to WKT format in Excel or a text editor but then you may add it as a delimited text layer and use the WKT option:
https://en.wikipedia.org/wiki/Well-known_text
id~coord
1~POLYGON((-83.784 42.215, -83.264 42.256, -83.264 42.49, -83.784 42.215))
2~POLYGON((-83.784 42.415, -83.344 42.236, -83.94 42.999, -83.784 42.415))
3~POLYGON((-83.484 42.315, -83.244 42.346, -83.233 42.2, -83.484 42.315))
answered Nov 21 '18 at 15:03
artwork21artwork21
30.7k554120
30.7k554120
add a comment |
add a comment |
You can import it as a delimited text layer and choose WKT and polygon as the type of geometry.
Thanks for the quick reply. Unfortunately, this only adds the csv file as attribute table ("NoGeometry" displayed in the properties) and not as shape file although I selected the "coord" column as geometry field and "polygon" as geometry type when importing as WKT...
– cbr
Nov 21 '18 at 15:08
add a comment |
You can import it as a delimited text layer and choose WKT and polygon as the type of geometry.
Thanks for the quick reply. Unfortunately, this only adds the csv file as attribute table ("NoGeometry" displayed in the properties) and not as shape file although I selected the "coord" column as geometry field and "polygon" as geometry type when importing as WKT...
– cbr
Nov 21 '18 at 15:08
add a comment |
You can import it as a delimited text layer and choose WKT and polygon as the type of geometry.
You can import it as a delimited text layer and choose WKT and polygon as the type of geometry.
answered Nov 21 '18 at 14:51
Ignacio dtIgnacio dt
454
454
Thanks for the quick reply. Unfortunately, this only adds the csv file as attribute table ("NoGeometry" displayed in the properties) and not as shape file although I selected the "coord" column as geometry field and "polygon" as geometry type when importing as WKT...
– cbr
Nov 21 '18 at 15:08
add a comment |
Thanks for the quick reply. Unfortunately, this only adds the csv file as attribute table ("NoGeometry" displayed in the properties) and not as shape file although I selected the "coord" column as geometry field and "polygon" as geometry type when importing as WKT...
– cbr
Nov 21 '18 at 15:08
Thanks for the quick reply. Unfortunately, this only adds the csv file as attribute table ("NoGeometry" displayed in the properties) and not as shape file although I selected the "coord" column as geometry field and "polygon" as geometry type when importing as WKT...
– cbr
Nov 21 '18 at 15:08
Thanks for the quick reply. Unfortunately, this only adds the csv file as attribute table ("NoGeometry" displayed in the properties) and not as shape file although I selected the "coord" column as geometry field and "polygon" as geometry type when importing as WKT...
– cbr
Nov 21 '18 at 15:08
add a comment |