Linked Questions

5
votes
3answers
5k views

Selecting nearest lines to point layer in QGIS?

I am a beginner with GIS software and I'm working on QGIS. I have a problem joining the spatial layers. I have a layer with objects in one city and another layer with the streets. I need to attach ...
11
votes
4answers
9k views

How to efficiently access the features returned by QgsSpatialIndex?

The PyQGIS Cookbook explains how to set up the spatial index but it only explains half of its usage: create spatial index — the following code creates an empty index index = QgsSpatialIndex() add ...
14
votes
2answers
5k views

Moving points onto lines (~neighborhood)

I do have two vector layer, of which one is a point layer based on "events" by remote sensing and the second one is a line layer from local research. In my case these are earthquakes and tectonic ...
1
vote
2answers
4k views

Finding nearest line to point using ArcGIS Desktop (ArcObjects/ArcPy)?

I am new to building custom ArcObjects, and am looking for a custom python script for arcgis version 10 that will loop through a point shapefile to find the nearest line segment of a line shapefile (...
1
vote
2answers
3k views

Get nearest line to point with v.distance in QGIS

I want to retrieve the nearest line to a point with the GRASS function v.distance(). But I think I do not fully understand how to use this function. What I have are two layers (in the same CRS -> EPSG:...
2
votes
1answer
1k views

Get distance from point to nearest edge of polygon with PyQGIS

I have 2 .shp layers in my workspace, polyLayer and pointLayer Using PyQGIS I'd like to be able to get the distance from the point to the nearest boundary of the polygon. I've done this sort of ...
5
votes
2answers
450 views

Querying indexed vector layer (finding nearby point)?

I can find nearby features in a layer by using QgsSpatialIndex: Finding the nearest line to a point in QGIS? Using this method, we need to feed in all existing features and query it with a point to ...
3
votes
1answer
693 views

Finding the nearest line to a point in QGIS,but Not Work

I saw Finding the nearest line to a point in QGIS? I wanted to create a program to get the line closest to the selected point. Here is the code. dPos = mouseEvent.pos() qpoint = ...
0
votes
1answer
464 views

Find the closest Point from a Point which contains the same attribute

I am trying to create python code to iterate through points on 1 layer and find the closest point on another layer (Road Chainages) based on attribute values. I need to limit the search to < 20m ...
2
votes
1answer
455 views

How to find nearest nodes of polyline in QGIS using Python

I have two line layers assume A and B and each layer contains multiple features. I have selected one feature in layer A, by using that I need to find nearest nodes of a features in layer B . I tried ...
3
votes
1answer
177 views

PyQGIS - get spatial/positional order of featurelist

I would like to know if it is possible to sort a list of line features in the exact order in which they appear on the canvas, given the starting feature. In this case the list of linefeatures ...