Questions tagged [distance]

The measure of separation between two entities or locations that may or may not be connected, such as two points.

Filter by
Sorted by
Tagged with
3
votes
2answers
81 views

Calculating distance between multiple lines of points in QGIS?

I'm looking to calculate a distance from a sensor reading to that of the nearest sensor reading on a different sensor line, all held within the same points file. Ideally using QGIS. The image below ...
2
votes
1answer
2k views

Finding and using data on population density files?

I'm attempting to replicate this map for the state of Nevada in QGIS: source: http://www.bostonfed.org/commdev/c&b/2014/spring/map-distance-to-closest-snap-outlet.htm (A SNAP outlet is just a ...
0
votes
0answers
233 views

Finding census block with highest pop. value within census tract using QGIS?

In QGIS, I'm trying to plot a centroid of only the census block with the highest population within each census tract. So there should only be one point per tract- that of the block with the greatest ...
1
vote
0answers
22 views

Find closest points using S2, given point and radius

I'm trying to use the go s2 package to find closest points, given a point and a radius (meters). I'm modeling my alg. after dynamodb-geo.js as I'm storing my points in DyanmoDB. I can't seem to get ...
1
vote
0answers
26 views

Distance in advanced digitizing not working properly?

I'm trying to remap a papermap of a festival with QGIS. I tried to use the advanced digitalizing tool to set the right distances and angles between the point but noticed that the distance I put in isn'...
0
votes
1answer
114 views

Calculating the distance of each pixel in a raster from a point in PostGIS [closed]

I have a raster in PostGIS and a table of points. I want to calculate the distance of each pixel to each point. How can I do that? For example, if 9 pixels and 3 points, then I want to calculate 27 ...
1
vote
0answers
35 views

Calculating nearest distance between points and Spatial Polygons in R? [closed]

So right now I have pretty large datasets, about 200,000 (lat,long) locations and a Large SpatialPolygonsDataFrame with a polygons list of length 428386 spread in a single city of around 450 square ...
1
vote
0answers
729 views

Calculating distances between n geographical points? [closed]

I would like to calculate the distances between N (an arbitrary number, but usually <50-100) geographical points (e.g. distance between points a, b, c, d, e, that is to say between a and b, a and c,...
1
vote
0answers
19 views

Find distance between points and borders

I'd like to ask for your help for the following problem. I would like to find the distance for each points from the nearest border, represented by the polyline feature here. I was thinking about ...
60
votes
1answer
361k views

Calculating longitude length in miles?

Suppose I have geographic coordinates of "Saratoga, California, USA" as Latitude: 37°15.8298′ N Longitude: 122° 1.3806′ W I know from here that in case of latitude 1° ≈ 69 miles and that ...
2
votes
0answers
45 views

Getting minimum distance of points with scalable algorithm

I have a number of geographical coordinates with latitudes/longitudes: id | name | lat | lon 1 | New York | 40.730610 | 74.0060 2 | Philadelphia | 75.1652 | 39.9526 3 |...
1
vote
0answers
53 views

Shift a lat/lon coordinate based on a distance and direction?

I have a coordinate in (lat/lon). I want to find a new coordinate shifted from this point by 'x' meters in the direction given by a compass bearing (degrees). The distance offset I am hoping to ...
1
vote
0answers
21 views

Similarity between two sets of lat/long points

I am trying to measure the similarity between two trajectories (two sets of lat/long points) which are the outputs from two APIs. I am trying to measure the difference between the routes given by ...
1
vote
1answer
553 views

Creating distance raster using road network ArcGIS

I'm working with three main layers in ArcGIS- geocoded dental office points, bus stops, and a road network. I would like create something similar to a three ring buffer that accounts for three ...
1
vote
1answer
49 views

Table to Distance Between in PostGIS

I am a new user in PostGIS. I need to create a table with the ID_DIR of table A, ID_SQ of table B and have a new column called "Distance" that would be the distance between the ID_DIR and the ID_SQ in ...
1
vote
1answer
33 views

Moving points by multiple attributes automatically

I have a shapefile including sightings of birds (points), but the gps points are taken from where the sighting have been made, not where the bird actually are. And in the map I need to show the real ...
5
votes
4answers
211 views

Finding distance between buildings and nearest road using QGIS?

I am very new to working with GIS data. I am currently using the QGIS tool to work with the data. I have two datasets: Buildings - polygon shapefile with information about different buildings in a ...
0
votes
2answers
59 views

Is there any criterion for measuring the distance between a group of points to origin?

I wonder if is there any criteria to represent the distance of a group of points (in 2D space) to origin? A simple criteria is the mean of distance of each point. But as can be seen in the picture, ...
2
votes
0answers
41 views

Is there a difference in using Haversine distance vs re-projecting coordinate frame?

I have a GeoTIFF raster file in the EPSG 4326 (WGS 84) geographic coordinate system. I want to crop a 20 km x 20 km square around a particular (lat, long) coordinate, and save that as a new raster. ...
0
votes
1answer
12 views

When I run the Join function on two vector layers the distance field keeps returning “-1”

When joining two point layers by geographic location with the "Each point will be given attribute" selection, I keep getting a NEARDIST of -1.
1
vote
0answers
53 views

How to calculate walking distance between multiple addresses? - QGIS

I am working with historical data and I would like to calculate the walking distance between multiple addresses. For instance, in my excel dataset I have someone who lived on 1 Laurierstraat in ...
0
votes
1answer
68 views

Nearest Neighbor - return object ID in R

I have a csv file that contains the GPS coordinates of about 100 villages and their unique ID. I have an other csv file with the GPS coordinates of some potential destinations and their unique ID. I ...
1
vote
1answer
143 views

Calculating minimum distance in meters of two polygons (defined in lat/long coordinates)?

I'm new to GIS and I'm a bit lost in the terms and concepts, so I'm not sure I'm asking a valid question, but I need to calculate the minimum distance (in meters) of two polygons which are defined in ...
0
votes
6answers
1k views

Find Point Along Line at Certain Distance

We have software that returns '5143m from PointA on PathB' and I need to know where that would be without using the measuring tool and snapping to manually trace the line. I am not looking to measure ...
2
votes
1answer
349 views

Setting up data from google geocoding correctly for ST_DWithin search? [closed]

I am mostly relying on What Spatial Reference System do I store Google Map's Lat/Lng in My web application takes user addresses, queries the Google geocoding API for coordinates, and then stores ...
1
vote
0answers
41 views

Wrong units in QGIS distance matrix

I am trying to teach myself QGIS. I have been following the following notes: http://www.qgistutorials.com/en/docs/nearest_neighbor_analysis.html While trying to reproduce the results from the link ...
0
votes
1answer
35 views

Obtaining pixels between 2 raster layers (border)?

I have a rasterStack obtained from a stack of 3 raster layers by: image = stack(A, B, C) I would like to calculate the distance between the pixels of layer A and pixels of layer C. After ...
2
votes
1answer
38 views

Distances between points British National Grid (BNG)

I have a point dataset expressed in British National Grid (about 10,000 points distributed all over the UK). I want to do some cluster analysis and I am aware that distance distortion might have an ...
1
vote
1answer
79 views

Determine when an object nears a point

Context: When an Uber vehicle is very close to the destination, there is an alert on the driver app that indicates that the destination has arrived. This determination is quite accurate. Two ...
1
vote
2answers
97 views

Distance between two points on QGIS 3.4.7 and Python 3.7

I am under the 2154 CRS (RGF 93). I want to calculate the distance in meters between two point knowing their coordinates. Let's consider two points : A(474828.85, 6756169.31) and B(874895.75, 6756159....
0
votes
1answer
30 views

Calculating distance between points following flow direction on ArcMap?

I delineated flow directions in a watershed on ArcMap (10m DEM). Then I want to calculate distance between two points 'following' the flow direction in each raster cell, not a straight line distance. ...
1
vote
1answer
93 views

Creating points along line at ellipsoidal distance

I need to create points along a polyline in QGIS 3 at every 1000m of ellipsoidal distance and have tried several tools, as suggested in other answers: Points along geometry QChainage plugin Convert ...
4
votes
1answer
77 views

QGIS 3.4 distance matrix returns the wrong point

I'm using Distance Matrix to find the closest point between one set (4 points) and another set (4 points), detailed below. All results look okay except one, where the returned point is not the closest....
40
votes
3answers
37k views

Why is law of cosines more preferable than haversine when calculating distance between two latitude-longitude points?

In fact, when Sinnott published the haversine formula, computational precision was limited. Nowadays, JavaScript (and most modern computers & languages) use IEEE 754 64-bit floating-...
0
votes
0answers
9 views

Point-distance analysis using time as an attribute

Is it possible to calculate "points within a certain buffer zone" for each point in a vector layer and do this by controlling time as an attribute field? I would like to analyse morbidity densities of ...
1
vote
0answers
101 views

Creating clusters based on nearest distance attribute in ArcMap using ModelBuilder

I am attempting to create a tool via modelbuilder that creates clustering for a polygon feature class based on the distance field attribute (between one polygon to another) that I have created using ...
0
votes
0answers
75 views

How to compute distance between two spherical Mercator points

I am computing the Mercator points according to the top answer at Convert latitude/longitude point to a pixels (x,y) on Mercator projection. Now that I have two Mercator points on a spherical ...
2
votes
1answer
72 views

Get weird result when calculating distance between two points, using latitude longitude?

I use algorithm (see: calculating distance between two points) to calculate distance between two points. but it get wrong result, see Java code: /** * group1:set latitude to 89 */ // set ...
0
votes
1answer
70 views

Batch travel distance calculation in QGIS

How to calculate the walking distance between postcodes and destination in QGIS? I have the following shapefiles: 1 layer containing the destination; 1 layer containing 1,000 postcodes. I've ...
0
votes
0answers
53 views

Calculate driving distance between coordinates using ArcGIS Pro?

We need to calculate the driving distance between students and the nearest PreK center. The issue with using the Cost Matrix is the cost. We have 250,000 students and around 2,500 centers. I ...
4
votes
1answer
926 views

Hex grid on EPSG:4326 globe (for use in Leaflet)

I'm looking for a way to evenly distribute a hexagon grid (x,y,z) on the EPSG:4326 globe. Knowing this is not mathematically possible I'm accepting the following limitations: Poles don't need ...
1
vote
1answer
154 views

Calculating distance between point and selected pixel in R?

I would like to obtain the distance between a point and a selection of pixel on raster image. Here the process: I read my JPEG image and extract colors I want: img.raster<-stack(***) names(img....
1
vote
0answers
37 views

How to measure the distance between two points follow the track?

I have three points shapefile and 1 line shapefile. I tried to use v.distance but it only got directly distance. How can I measure them by track?
0
votes
1answer
35 views

Calculating distance between each pixel of rasterstack image?

I am new on R and I have an image of class "rasterstack" of only 3 colors: Red, Green and blue as illustrated: I use this function: image = stack(img.red, img.green, img.blue) I would like to find ...
1
vote
1answer
34 views

Farthest from Edge in Raster-QGIS

I have a raster image (green colour in image). I would like to find the point in this raster that is the farthest from the edge i.e. that point from which the largest number of uninterrupted cells in ...
2
votes
1answer
281 views

Calculating distances between points for every available point in the dataset

The data of interest: a point vector and a line vector. Both shapefiles, with the line vector acting as the road/motorway. All of the points are along the road so close by. I want to calculate the ...
0
votes
0answers
33 views

Calculating a coordinate based on approximate distances from known locations [duplicate]

My goal is to calculate a position based on approximate distances from known nearby locations. The distance observations include inherent error. The number of known locations is often 12 or more. ...
21
votes
4answers
25k views

PostGIS nearest points with ST_Distance, kNN

I need to obtain on each element on one table the closest point of another table. The first table contains traffic signs and the second one the Entrance Halls of the town. The thing is that I can't ...
4
votes
1answer
121 views

Match linestrings using Fréchet distance

I have two datasets of roads (both in WGS84). One has nicely digitized geometries, but lack some of the attributes and the other has heeded attributes, but digitized terribly. I want to transfer ...
0
votes
0answers
20 views

Using output of ArcGIS Euclidean distance tool?

How do I use the output of the ArcGIS Desktop Euclidean distance tool? It gives raster output and I want to generate a table enlisting the distance between various centroids from one centroid.