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
6
votes
1answer
4k views

Distances in {Plate Carrée projection - EPSG:4326 - WGS84}

"4326 is just the EPSG identifier of WGS84" [3] Indeed http://spatialreference.org/ref/epsg/4326/html/ says it is a GEOGraphic Coordinate System: GEOGCS["WGS 84", DATUM["WGS_1984", ...
1
vote
1answer
224 views

Drawing distances from one point to another using QGIS?

I want to be able to generate a distance line between two points on the map, which also has the distance as a label (similar to the second image seen on Google maps or in the first image from the red ...
-1
votes
1answer
48 views

Drawing distance lines between two points [duplicate]

I want to be able to generate a distance line between two points on the map, which also has the distance as a label (similar to the second image seen on Google maps or in the first image from the red ...
3
votes
1answer
302 views

Distance to water from every non-water pixel using Google Earth Engine?

I have an MNDWI (Modified Normalised Difference Water Index) layer for an area of interest (aoi). I then identified water sources as pixels with MNDWI > 0 and created a water layer where a pixel ...
0
votes
0answers
90 views

QGIS Distance Matrix Output is always consists of zeros?

I have a shapefile with 35 points and I try to have the distance matrix showing the distance of each pixel with each other. I choose the input and the target file the same and the unique ID fields are ...
23
votes
5answers
36k views

Finding distance of point along polyline using ArcGIS Desktop?

We need to find the distance of a series of point along a given polyline. We have a polyline dataset repsenting rivers in a catchment, broken up into river reaches (FID 1 through 35 for example). We ...
0
votes
1answer
2k views

Using Find your nearest type function with large dataset? [closed]

In a previous employment, I needed to display a "Distance to stockist" on our website. It would get your current co-ordinates (from a postcode or HTML5 geolocate) and then display a list of nearby ...
0
votes
1answer
114 views

QGIS Spatial Index uses bounding boxes; how to get actual nearest line to a known point

I have looked at lots of answers referring to this same issue, and tried using QGIS Spatial Indexes and iterating through the line features in the spatial index to calculate the distance between a ...
0
votes
0answers
40 views

Which ArcGIS tools to use to get perpendicular distance between polylines

I have a polyline shapefile with several thousand polylines. Each polyline is within a polygon, and the Polygon_ID is contained in the polyline shapefile attribute table. I need to figure out the ...
1
vote
2answers
2k views

Get the distance from a point on a polyline to polyline's from point

I have a polyline and a point on the polyline. I need to find the distance from the from point of the polyline to that point. ICurve.QueryPoint method does the opposite thing. It gives a point ...
3
votes
1answer
719 views

using PostGIS to calculate distance of a route over a large area

I'm new to PostGIS and looking to measure the distance of the Pacific Crest Trail which spans western North America from Canada to Mexico. I have a data set containing the lat lon and dates from GPX ...
1
vote
1answer
430 views

How is dateline a problem when calculating distances?

From http://postgis.net/workshops/postgis-intro/geography.html, I can understand how poles might be an issue but how do datelines create problems? The distance between points get larger as problem ...
3
votes
1answer
142 views

Finding distance from river outlet to points, following river, using ArcGIS Desktop?

I have a line (the river (in blue)) and a shapefile of points (plants colonies (in orange)) and I need to find the distance between the river outlet and many points along the river instead of "as the ...
1
vote
0answers
229 views

Get the distance from line to given geo point at given degrees [closed]

I have added another picture for better understanding. I haven't written any code as of now. My requirement is to calculate the distance from given point (pinned location in above map) to given ...
1
vote
3answers
55 views

Getting shared distance of two parallel lines using ArcObjects?

I have 2 lines Line A, and Line B that share from point. The 2 lines at first share the same path and are parallel, then they split into different paths. I would like to calculate that segment in ...
30
votes
3answers
12k views

What is approximate error of Pythagorean Theorem vs. Haversine Formula in measuring distances on sphere at various scales?

Many people when first trying to calculate distances between two longitude / latitude pairs ask if Pythagorean theorem works as an appropriate distance function. Most often people answer "no, the ...
1
vote
1answer
44 views

Calculating distance features within a shapefile - ArcGIS

I have a file that has a list of postal codes of customers and the main store they frequently visit (e.g., Customer 1, Customer 2, and Customer 3, visit Circle Centre). In ArcGIS I want to be able to ...
4
votes
1answer
186 views

QGIS distance from a cell center to the nearest point

I am trying to run the following analysis in QGIS 3.2. My inputs: raster layer (with population estimates from LandScan) vector layer, with points (each point represent the location of a mobile cell ...
0
votes
1answer
93 views

Query to return closest LineString given a Point [duplicate]

I have a road lines data in a table with field roads(id SERIAL ,the_line geometry(LineString,4326)) suppose an accident occurs in a middle or at any location in that waterline i want to stop the ...
2
votes
1answer
45 views

Over how large of an area can I assume the Earth is flat?

I'm making some calculations between lat/lon coordinates in a neighborhood. I'm running this analysis as if the Earth were flat because the planet's curvature doesn't change my calculations over the ...
0
votes
1answer
134 views

Google Earth Engine compute point-polygon distances

I am trying to compute distances from points stored in a fusion table to the nearest political border (also from a Table) in Google Earth Engine. I need to compute distances between points. I would ...
5
votes
1answer
172 views

Measure distance between nearest points in the sea along the coast automatically in ArcGIS

I have global point data of marine species along the coast. I would like to measure the distance between the two closest points but this distance needs to be measured in the sea and not on the land ...
3
votes
1answer
94 views

Calculate accumulated distance with road network

I am working on a project in ArcMap and the task I am working on goes as follows: Calculate the accumulated distance (in meters) of every pixel on the map to Itaituba taking the road network into ...
2
votes
1answer
814 views

What does v.distance calculate excactly?

As I am from an economics department, I am quite a beginner in QGIS. I read, that if I wanted to calculate the distance from a polygon to a point/line/another polygon, I should use the GRASS plugin v....
2
votes
1answer
578 views

Distance to Nearest Hub QGIS not working when 'hub' is a line?

QGIS 2.18.20 working in CRS: WGS 84/UTM Zone 35S (EPSG:32735 OTF), with shapefiles of map features (roads, river, point water sources) reprojected from WGS84 EPSG:4326. All shapefiles have been ...
5
votes
3answers
553 views

Vincenty or (Project + Euclidean) for accurate distances

I posted a similar question on stackoverflow, however was directed here for more help. If my main goal was to calculate distances such that my error was minimised to the nearest metre assuming that ...
3
votes
0answers
337 views

Subset polygon data of SpatialPolygonsDataFrame by Distance to a Set of Coordinates in R? [duplicate]

I am learning and I made a very similar question when I hadn't learnt what a Spatial Polygons Data Frame was about 10 days ago: https://stackoverflow.com/questions/49193867/select-raster-in-ggplot-...
0
votes
2answers
71 views

Calculating width of polygon relative to polyline using ArcGIS Desktop?

I need to estimate the different widths of the polygons that surround some polylines. The polygons correspond to wetlands (buffer zones) and the lines represent the rivers. The catchment that I´m ...
3
votes
3answers
2k views

Get a LonLat point by distance or between 2 lonlat points

I know two latlng points and also can get distance between 2 points. But how do I can get a latlng point on 1/3 of the distance of 2 points. latlng1 = [37.7052918, -8.8420179] latlng2 = [37.7062884, ...
3
votes
2answers
4k views

How to use GeoSeries.distance to get the right answer

When want the distance between two points (117.454361,38.8459879),(117.459880 ,38.846255) on the earth, I take the GeoSeries.distance method.But the method do not give me the right answer. The real ...
1
vote
2answers
36 views

Clipping section of polyline based on given distance from source point feature along that polyline using ArcMap?

I am working in ArcMap 10.5.1 and have a polyline feature class (streams) and a point feature class of fish sightings plotted along the streams. I am trying to add a degree of observational ...
1
vote
0answers
47 views

Google Earth: Shortest distance between point (Place) and nearest point on a polygon (Country)

Using Google Earth, I am trying to find the simplest way to calculate the shortest distances of the geodesic lines between a specific set of points (lat/long locations) and the nearest points on a ...
29
votes
8answers
63k views

Generating random locations nearby?

I am trying to create random locations nearby my location. What i want is to create random latitude/longitude pairs inside a 200 meters circle surrounding my location. This is the formula i came up ...
1
vote
1answer
92 views

Storing the distance between two shapefiles as an attribute in QGIS 3.0?

I have this map of Mexico that is broken down into all of the municipalities. How would I create a variable that has the distance between each municipality and Mexico City?
1
vote
0answers
63 views

Creating new point based on distance of other points

I work in QGIS 2.14. I have a point layer, and I want to add points to that layer basing on the distances between the "old" point and the "new" point. I was doing it by creating buffors from each ...
6
votes
2answers
239 views

Geometry distance PostGIS query with <-> operator suddenly much slower

One of my websites suddenly got much slower, and I've managed to track down the issue to a query that uses the <-> operator together with ORDER BY (2D distance between two geometries) to ...
4
votes
2answers
4k views

Calculate distance between a coordinate and a county in GeoPandas

I have a single coordinate and a GeoPandas Dataframe representing US counties whose geometry is polygons that form the boundary of counties. Each of these polygons is also given through lat/lon pairs. ...
7
votes
2answers
42k views

Performing Distance Calculation using Excel?

Is there a way (preferably in Excel) to calculate the distance (based on lat, lon) between two lists of points? My end goal would be, for example, to have a list of Starbucks and a list of McDonald'...
4
votes
3answers
2k views

Clustering points in postgresql to create contour map

UPDATE: To try to make this a little more simple, is it possible to create a query which selects a group of points such that each point in the group is at most X units away from at least one other ...
1
vote
2answers
66 views

How to automatically input a raster value into Raster Calculator?

At Arc 10.5.1 I have a raster containing a single cell, with a value of 9300. From it I need to create an output raster whose cell values decay away from the input raster's cell location, starting ...
0
votes
0answers
37 views

Points to line accuracy concerns in ArcMap

I have a csv of a GPS trace with lat-longs that I want to convert into a line so I can measure the distance. My workflow was as follows: 1) Import csv into ArcMap 10.4 2) Convert latlongs to points ...
0
votes
2answers
42 views

Calculating percentage (or length) of stream network that is multiple channel streams using ArcGIS Desktop?

I have a polyline stream network of all channels within a drainage basin (which is 1.1 million square km) A number of the rivers in the basin alternate between single thread and multichannel (i.e. ...
0
votes
0answers
115 views

Can GDAL give the scale of a raster?

I have a GeoTIFF and I am trying to overlay a scale (miles or km) using GDAL. Is there a function in GDAL that will do this? I believe ArcPy has this functionality, but I am guessing GDAL does ...
34
votes
6answers
45k views

Trilateration using 3 latitude/longitude points, and 3 distances?

I want to find out an unknown target location (latitude and longitude co-ordinates). There are 3 known points (latitude and longitude co-ordinate pairs) and for each point a distance in kilometers to ...
0
votes
0answers
19 views

Check if path along triangular shapefile possible

I have a problem I came across but don't know how to solve it. I have a triangular shapefile of a river with one attribute value being the water depth. The idea is to find out if fish are able to swim ...
1
vote
1answer
44 views

What is IndexedFacetDistance in JTS?

I just read from GEOS 3.7 documentation that there is a new IndexedFacetDistance imported from JTS. Reading from the JTS link, I cannot tell what the new distance metric does except that it's taking ...
1
vote
0answers
281 views

Calculating coastal distances using QGIS?

I'm trying to work up some historical transport cost maps, across multiple modes (road/rail/sea/river). I have a polygon shapefile of the coast itself, and point data on the cities of interest (some ...
7
votes
1answer
538 views

Understanding the values from transition layers produced by the R package `gdistance`

Background and Aim I would like to create a cumulative raster representing walking time across a surface. For my purposes, the cost to be accumulated has to be the walking time as influenced by ...
11
votes
6answers
13k views

Getting distance between 2 points using GeoDjango? [closed]

I have 2 locations defined by gps coords, lat / long like returned by google maps: http://gmaps-samples.googlecode.com/svn/trunk/geocoder/singlegeocode.html I need to calculate the distance between ...
1
vote
2answers
720 views

Confusion regarding distance calculation in R (euclidean distance, “great circle distance”)

OK so considering these two cases: ln1<-SpatialLinesDataFrame(SpatialLines(list(Lines(Line(matrix(c(53.3604464,53.36062,-6.2424442, -6.242413),ncol=2)),ID="a"))),data=data.frame(dummy="a"),match....