New answers tagged

0

There's a tutorial in the QGIS documentation, might help: https://docs.qgis.org/2.2/en/docs/pyqgis_developer_cookbook/network_analysis.html


0

I found that using zonal statistics worked best.


0

A lot of online services display in WGS84 Web Mercator, which calculates distances terribly, so they calculate distance along the ellipsoid (geodetic distance) in the background, rather than the direct planar distance. (Whether they are using the correct ellipsoid formula or not is for another question.) ArcMap is more of a professional tool and makes no ...


2

In QGIS you can try the Distance Matrix of Saga (under Processing > Tools > Saga > Shapes - Points). This calculates a distance matrix for all points in one layer only, but does include an ID. Just combine the two layers into one (e.g. with Vector > Data Management Tools > Merge Shapefile to One). Make sure that you have some attribute that makes it possible ...


0

Arcgis solution, but applicable to any decent GIS. Project your layers. Calculate xy columns Join table to another by address. Calculate distance between 2 pairs of coordinates


0

The linear referencing tools are probably the "by the book" way I would do this, but the answer from crmackey is probably a better solution for you. If the linear referencing toolbar allowed you to use you stream lines that tells me the feature is m-aware (routed line), but that doesn't necessarily mean the value was populated or that it was populated in the ...


0

I know you are not asking for a Python solution, but that is the best way I know of to tackle this problem (but I'm sure there are better ways using Network Analyst). I made a very simple example and it worked for me. It does make some assumptions though: Every line segment will have only 1 source and 1 sink that intersect it The lines have an ID field ...


0

You can try using ST_DWithin for geography, e.g.: SELECT * FROM animals a, animals b WHERE a.typ=' 1' AND b.typ=' 2' AND ST_DWithin(a.geom::geography, b.geom::geography, 500.0, FALSE); Where the last parameter is use_spheroid:=FALSE to use a faster sphere calculation method. This method can be optimized using geography indexes: CREATE INDEX ...


0

SELECT * FROM animals a, animals b WHERE a.typ=' 1' AND b.typ=' 2' AND ST_Distance_Sphere(a.geom, b.geom) < 500;


1

To effectively use shapely it is important to first project your coordinates into a projected coordinate system that is appropriate to your region, for example, epsg:27700 if you are based in the UK. A good way to do this is using pyproj: import pyproj as proj # setup your projections crs_wgs = proj.Proj(init='epsg:4326') # assuming you're using WGS84 ...


1

I think you're overcomplicating things here when you could use ST_MaxDistance, this will return the maximum distance between two points within two point clouds. WITH points AS( SELECT id, (ST_DumpPoints(lane.geometry)).geom as geom FROM lane GROUP BY id ) , min_distances AS( /*Finds the smallest distance for each distinct tuple ...


1

You can do this using the Network Analyst Extension. Build a network using your road layer (requires network analyst extension) Identify nearest polygon using point distance tool or near tool (or use existing point if known) Add nearest polygon point and postcode point as stops in the network solver then compute a route distance from your post code point ...



Top 50 recent answers are included