QGIS: list of coordinates to polygon [duplicate]
up vote
1
down vote
favorite
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 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 |
up vote
1
down vote
favorite
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 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 |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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 at 16:38
Vale
728519
728519
asked Nov 21 at 14:35
cbr
62
62
marked as duplicate by Andre Silva, nmtoken, JGH, BERA, Richard Law Nov 23 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 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
up vote
3
down vote
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 |
up vote
2
down vote
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 |
up vote
0
down vote
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 at 15:08
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
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 |
up vote
3
down vote
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 |
up vote
3
down vote
up vote
3
down vote
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 at 15:04
Ian Turton♦
47k546110
47k546110
add a comment |
add a comment |
up vote
2
down vote
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 |
up vote
2
down vote
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 |
up vote
2
down vote
up vote
2
down vote
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 at 15:03
artwork21
30.7k553120
30.7k553120
add a comment |
add a comment |
up vote
0
down vote
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 at 15:08
add a comment |
up vote
0
down vote
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 at 15:08
add a comment |
up vote
0
down vote
up vote
0
down vote
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 at 14:51
Ignacio 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 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 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 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 at 15:08
add a comment |