3

This might be a very simple thing, but I just can't figure it out how to do it in QGIS.

I have a fisheries dataset with multiple catches in one location. I'd like to display these catches as a dot varying in size according to the number of catches - like dots displaying population size in a city. However, the excel sheet I have is one catch each row, with the same coordinates but different attributes (length, weight, etc).

Is there a tool in QGIS that can merge all points in one location (other attributes not needed then)?

1 Answer 1

2

I don't know which version of QGIS you have, but you should have the OSGeo4W desktop icon. So the simplest way to accomplish your task consists into double click on this icon, navigate to the folder containing your data (e.g. catches.shp) and then type:

ogr2ogr catches_merge.shp catches.shp -dialect sqlite -sql "SELECT *, COUNT(geometry) AS NUM_CATCH FROM catches GROUP BY geometry"

The result, i.e. catches_merge.shp, should be what you're looking for. See the OGR SQL page for more details.

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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