I joined a polygon layer to a point layer using a common field and then exported as a new layer. Just in case I first saved the geometry of the polygon layer (shape and area) in the table of attributes of the polygon layer. For some reason the resulting layer is not displayed at all in QGIS, not even at the wrong place. So I just want to tell QGIS to look for the polygon geometry in the common table of attributes so that the layer is displayed as polygons, not points.
2 Answers
so I guess the answer is that an additional geometry column cannot be added to a layer in QGIS, geometry attributes are "Attributes" that describe the geometry, not the geom data itself.
- 747
- 1
- 6
- 19
-
No I think you can export to CSV and add a WKT here and then if you join with the WKT column included it should allow you to have a polygon layer. Well I am trying now, will let everyone know!
https://gis.stackexchange.com/questions/23376/how-to-export-polygons-to-csv-with-coordinates
– Philippe Morgan Sep 16 '20 at 19:19
To do this, before (or after but the file will be heavier) the join, export the join layer as csv file (save as CSV file) and select geometry as WKT. This way when you join the polygon layer to the point layer the polygon information is kept and you can then export as a CSV and reimport using WKT for coordinates (not sure if you can do this without first reexporting and then reimporting a CSV). This way, the layer can be displayed as a polygon layer even if it was joined to a point layer initially.
- 633
- 4
- 11

+button. I don't see a way to include the geometry of the Join Layer. What do you think the field name of the polygon geometry is in the attribute table? Is the geometry stored as text like:Polygon(1.234, 5.678, ...)? – Hugh_Kelley Sep 16 '20 at 18:39