5

I imported water contamination data from surface water bodies from a CSV file. Each water body was georeferenced with a single pair of lat/long coordinates. Now I have a map full of individual points which are located somewhere at the border of a lake, river etc. I only have one point per surface water body (no contours or similar).

How can I manually draw a shapefile around the points (depict the surface water bodies) which has the same properties (attribute table) as the respective point?

  • 1
    I'm confused by your question. It sounds to me like you want to digitise the water bodies and then join the attributes from the csv table to them. Is that right? – Anonymous Jun 1 '17 at 14:33
  • Do you have a base map to work from so you know the size and shape of the water bodies? If so, is this basemap a georferenced image? If not, how will you know the correct size and shape of the features? – MappaGnosis Jun 1 '17 at 14:48
4

I just sorted this out in the meantime.

Just draw polygons in a new layer above the points and then perform spatial joints via Vector -> Data Management Tools -> Join attributes by location.

Select "contain" as Geometric predicate and select "all records" for a joined attribute table.

2

You could use the edit tool which is available in QGIS. [QGIS documentation] (https://docs.qgis.org/2.2/en/docs/user_manual/working_with_vector/editing_geometry_attributes.html)

Create a new vector layer, polygon

enter image description here

enter image description here

Click the edit toggle to start the edit session

enter image description here

Then click on the add feature button to add your vertex to the map canvas

enter image description here

You can add attribute information for as you create each individual body of water which will allow for a unique ID that you then can use to join to the CSV file as you already have.

enter image description here

As well as modifying your table such as this:

enter image description here

  • Thank you for your response. When i toggle editing, then the add feature button looks different for me. It's dotted because i can only add points which is not what I want do to. – Jonas Jun 1 '17 at 14:55
  • You will need to create a new vector feature that supports the polygon feature to create the shapes you want to represent the waterbodies. I've update my post to include the part. – whyzar Jun 1 '17 at 14:59
  • Thank you for your response. Not sure if i got this though. I created an additional layer with polygons which have the same ID as my points. However, if i save the polygon layer as CSV only the ID's are exported. No information about the shape. So if I merge the two CSV files I am actually where i started, or not? A CSV files with points and a lot of attributes but no shapes? – Jonas Jun 2 '17 at 11:39
  • Sorry, I just sorted this out in the meantime. You can just draw polygons in a new layer around the points and then perform spatial joints via Vector -> Data Management Tools -> Join attributes by location. Select "contain" as Geometric predicate and select "all records" for joined table. Anyway, thank you very much for your support! – Jonas Jun 2 '17 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.