0

I am a new user of QGIS. I'm looking for a solution for my problem. I have my own dataset providing the latitude and longitude of different unique ID's. Now, I would like to classify those ID's that are showing on the rivers as 'on water' and those that are on land as 'on land'. There are thousands of data points, so manual classification is not possible.

Is there any way to load in some data of rivers, borders and/or coastlines in order to make classification like 'on land' or 'on river' possible?

I found a dataset providing the routes of waterways. Although this data does not show the true width of rivers, it might be useful as an example: http://nationaalgeoregister.nl/geonetwork/srv/dut/catalog.search#/metadata/2f58c248-b229-48af-a838-3279f7f0173c

  • 1
    What is your area of interest? – smiller Jun 4 at 15:04
0

This is really two questions:

Question One: Where can I find river/lake/coastline data?

Answer: Questions seeking sources of data are best asked on Open Data SE, where you will find many links to downloadable hydrology layers, eg rivers, lakes and coasts. If you don't find the data you need, ask a new question there and please specify your area of interest.

Question Two: How can I use this data to identify which points are in water?

Answer:

If hydrology polygons exist for your area of interest, it's a very simple task to check whether a point is on water.

  1. Use the Select by location tool to select all the point features that intersect the water polygon layer.

    • If your water polygons are in multiple layers, repeat the selection process for each layer, each time choosing the option to "add to current selection", until all the points on water are selected.
  2. Use the Field Calculator to add a field, called "water", with this expression: if(is_selected(), 'yes', 'no').

Now the "water" field contains the word 'yes' if the point is on water, and 'no' if the point is not on water.

If your area of interest does not have hydrology polygons, obtain rivers as lines instead. Decide how wide you want to assume the rivers are, and buffer the river layer by that amount. If you want to make different sized buffers for different rivers, store the different widths in a new "buffer_width" field, and use this field to control the buffer width.

enter image description here

  • Hi, thank you for your advice. I have loaded the polygons into QGIS. However, the select by location tool does not show the "Use only selected features" checkbox. Hence, when I put: vector > research tools > select by location > then: objects from "own data" > intersect with > object from one of the layers with polygons > NO: "use only selected features (since it cannot be selected) > make new selection > apply. Then I see a bar which shows the processing, but then nothing happens. What do you recommend? – JodyB Jun 5 at 20:33
  • Could it be that the layers are too large and that there are too many of them? What approach should I take? – JodyB Jun 5 at 20:38
  • I didn't mention a "use only selected features" setting (which indeed doesn't exist for this tool. If you think your layers are too large and have too many features, try extracting a small subset of features to a new layer. – csk Jun 5 at 20:47
  • Thank you for your response. I know you didn't mention it, but I found that others used it for the 'select by location' tool. If I do not check the box, nothing really happens. The analysis is finished in 3 seconds and then nothing is changed. I found a way to check the "use only selected features" box. Now it takes a very long time per layer. I have millions of data points that need to be checked for intersection with the layers. Do you have any suggestions? – JodyB Jun 5 at 21:02
  • With millions of points I would expect a spatial analysis like this to take a long* time in QGIS. (*Up to, say, 10-20 minutes; any longer and it usually means QGIS is going to crash, at least on my old computer.) There might be other programs that would do it faster, but I'm not very familiar with them. Try searching around on this site; I know I've seen discussions about how to speed up a slow GIS process. Or you could start a new question about how to speed up this particular analysis. – csk Jun 6 at 16:06

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.