Spatial queries are core to many types of GIS analysis. In QGIS, this functionality is available via the Spatial Query plugin. We will be working with 2 datasets – a lines layer representing rivers and a point layer representing cities. The task is to run a spatial query to find all cities that are within 10 kms of a river. We will use ne_10m_rivers_lake_centerlines and 10m_populated_places_simple datasets from Natural Earth. We will be working with 2 datasets – a lines layer representing rivers and a point layer representing cities. The task is to run a spatial query to find all cities that are within 10 kms of a river. Since you have selected multiple files, repeat the process for the next file. Select 10m_populated_places_simple.shp and click Now we must choose an appropriate CRS for our purpose. For creating buffers, a Azimuthal Equidistant projection would be best suited as radial distances around the center of the projection are accurate. In our case, since the dataset is global, we will choose a world projection. In the projection spans 90 degrees from the origin. Here the origin being 0 degrees longitude, the only data contained within +/- 90 degrees longitude will be converted. . Un-check the boxes next to the original layers to display only the re-projected layers. The re-projected layers are still being shown in the . Note that we want a buffer of 10kms and since the CRS units are metres, we need to enter 10,000. Enter the output file name as contains features that are both rivers as well as lakes. Our analysis calls for using only river features, so we will run a query to select only river features. Right-click on the For our query, we want to select features from the buffered places that intersect with the buffered river lines. Make sure the checkbox next to Zoom-in to any area and compare the results. You will notice that the new layer contains only the features that intersect with river buffers. We should always verify my results to ensure the analysis is not flawed. One way to verify the results is to export this layer as a KML file and load it up in Google Earth. You can check if the areas you found really are within 10kms of a river. Right-click the layer and Source.