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
2 answers
3k views

How to calculate the azimuth of a line of a multilinestring in PostGIS?

I have two spatially enabled tables in PostgreSQL with a geometry in each: First table is with POINT type, second is with MULTILINESTRING. I need to calculate the azimuth of the LINESTRING part of a ...
528's user avatar
  • 61
6 votes
1 answer
8k views

Measuring distance between points along line in QGIS

I have a road network and different points connected to the roads. I would like to measure the distance between several points along the roads. Basically I want to do the same like the Road Graph ...
Matthias's user avatar
6 votes
2 answers
2k views

Calculating shortest distance between multiple Polygon borders to a common Polygon border?

I have 2 sets of Polygons and I need to calculate the shortest distance between the polygons on one layer to the single polygon (one feature) on the other layer! How can I do that? Any help on how to ...
Mats Wedin's user avatar
6 votes
2 answers
1k views

Counting points within certain distance of each other in QGIS

I have a shapefile right now that contains many points. I would like to count the number of point points that are within 150 ft of each other. For example, I should count 8 locations with points ...
Jez's user avatar
  • 61
6 votes
2 answers
2k views

Calculate Distance (in miles) from Point to Polygon Edge in QGIS

I am attempting to calculate the distance from a point to the nearest polygon edge (county boundary). I have approximately 80 points and want to find the closest county edge for all of the points and ...
David V's user avatar
  • 69
6 votes
1 answer
7k views

How to calculate the average distance among set of points as measure of closeness

I have three series (or tables) of points in PostGIS which I want to compare. I would like to know how "close" each series is when compared to the other two. In other words I would need some measure ...
Francesco's user avatar
  • 773
6 votes
2 answers
1k views

Calculating average raster to point distances within census tracts

I have some experience using ArcGIS, but mostly with the field calculator in the attribute table/spatial joins, so I apologize if I say something that doesn't make sense. To provide a bit of ...
user3642531's user avatar
6 votes
1 answer
3k views

Transform polygon to equivalent circle, QGis

I have a polygon and I'd like to find the radius of an equivalent circle from a particular point within the polygon. The polygon would have a large (infinite) number of points evenly distributed ...
Robertg's user avatar
  • 467
5 votes
2 answers
20k views

How to calculate new point coordinates from distance and angle using ArcGIS SDK for iOS?

I want to calculate the coordinates of a new point. What I have: The source point coordinates, the distance (meters) and the angle For example: I want to create a point within 100 meters and 45 ...
E. Lüders's user avatar
5 votes
1 answer
581 views

Pacific-wide Projection for distance?

I have a data set of ~3500 points located across the Pacific Ocean, and am looking to measure the distance from each point to it's nearest coastline to identify the "host" country. I had originally ...
MBarretts20's user avatar
5 votes
1 answer
5k views

QGIS distance from points to nearest line

How can I get the distances from each point at a shapefile to the nearest line from another? I've tried to follow the directions from Measuring the distance between lines and points in QGIS and ...
ebarbara's user avatar
  • 285
5 votes
1 answer
3k views

Getting result in metric from QGIS Distance Matrix tool in QGIS? [closed]

I'm trying to calculate the distance between points in layer with distance matrix tool. And keep getting strange results no matter what. Like this MASTER ------------SLAVE ---------------- DISTANCE ...
Vadim's user avatar
  • 51
5 votes
2 answers
1k views

Plugin for average distance from node to polyline in QGIS?

Is there a plugin available that will calculate this? EDIT 1: The red polyline is the average distance of the point to the black polyline. The red polyline is what I want to display. Alternatively, ...
Robertg's user avatar
  • 467
5 votes
3 answers
2k views

How to measure the distance of multiple points to a line

I have two shapefiles in QGIS to which I am trying to find the distances between. I have a shoreline which is a vector line and then I have hundreds of data points in the ocean. What I am trying to ...
user15882's user avatar
5 votes
4 answers
4k views

Measuring distance between two points considering elevation raster?

Is it possible to compute the distance between 2 coordinates (x1,y1,z1) - (x2,y2,z2) considering an elevation raster (cells containing elevation)? On the image, there are 2 coordinates (red crosses). ...
Luc's user avatar
  • 91
5 votes
2 answers
524 views

Directed Hausdorff distance in PostGIS?

I was wondering how to implement a directed (or one-sided) Hausdorff distance function in PostGIS? I looked into the PostGIS 2.3.3 source code, and it seems that ST_HausdorffDistance is implemented ...
tinlyx's user avatar
  • 11.1k
5 votes
1 answer
2k views

Calculating distances in QGIS Field Calculator

So I'm using QGIS 2.6.0 and I have a CSV (converted into a .shp) with two geometry columns, I want to create a new column with the distance between the two geometries: shot.lat shot.lon haul.lat ...
DGraham's user avatar
  • 295
5 votes
4 answers
3k views

Understanding strange measure distance results from QGIS?

My colleague just told me about incorrect measure distance tool results in QGIS. For reference we used this pond. While our local map provider Mapy.cz and Google Maps: both show about 970 meters ...
Juhele's user avatar
  • 1,738
5 votes
3 answers
407 views

Using the Advanced Digitizing Panel in QGIS to input distance into UTM layer

I am trying to input (survey) line distance accurately using the Advanced Digitizing Panel. I am working in a layer with a UTM CRS and entering distance based on grid measurements. Unfortunately it ...
Mike's user avatar
  • 91
5 votes
3 answers
2k views

Projection for Germany that preserves distance?

I have a point A (EPSG 4326) in Berlin, Germany: { "type": "Point", "coordinates": [ 13.394994735717773, 52.514849775310154 ] } I want to create point B that is 500m to the east ...
ustroetz's user avatar
  • 7,994
5 votes
2 answers
925 views

Finding points within elliptical area using PostGIS?

Using PostGIS 2.0.0 I need to filter the results of a function, which returns many POINTs, to find the ones that lie within an elliptical area (like a great circle line with a buffer around it) ...
EM0's user avatar
  • 755
4 votes
2 answers
3k views

Calculate distance of points - SpatialPoints object - along a path - SpatialLines object - using R

I have a SpatialPoints object and a SpatialLines object. I want to calculate all the distances from the start point (first coordinate of the SpatialLines object) to every point in the SpatialPoints ...
Guz's user avatar
  • 3,176
4 votes
1 answer
517 views

Getting nearest point but with a filter conditional in QGIS 3.4?

I have two point layers in CSV files, each with about 500 points/rows. Each point in both layers has a year column (attribute). I know how to use Distance Matrix to find the nearest point. BUT: For ...
GeoTrip's user avatar
  • 107
4 votes
3 answers
2k views

Draw line between points from multiple datasets

I have 2 point datasets and want a tool or script to draw a line between all points in one dataset to all the points in the 2nd dataset. Is it possible? I have tried ESRI "Point Distance" and "...
GeorgeC's user avatar
  • 8,228
4 votes
1 answer
1k views

Identifying south facing mountain land, above an elevation, within a slope range, less than fixed distance from major roadways

This odd question comes from believing that such an analysis is plausible in a GIS system. Only, I don't how to accomplish the various discrete steps implied from the Title, nor where to get a topo ...
John's user avatar
  • 451
4 votes
2 answers
1k views

QGIS 3.16.11 shortest distance between point and line via field calculator and overlay_nearest

I was searching for the shortest distance between a point (point layer with about 22000 points) and the nearest point of a line from another layer (MultiLineString). I tried Distance Matrix, nearest ...
biologist's user avatar
4 votes
3 answers
3k views

Calculating distance travelled along track in QGIS?

I'm new to GIS. I have some tracks of people walking from point A to point B that I took using breadcrumbing with Garmin e-trex (set on the Auto track settings). I've loaded the tracks into QGIS and ...
Georgia's user avatar
  • 41
4 votes
1 answer
3k views

Finding projection of point to line?

I have a segment defined by 2 LatLon points(A and B) and a third LatLon point (C). I need an alghorithm, formulae, or some code to find the projection point of C on the segment AB (call this point D) ...
Alex's user avatar
  • 141
4 votes
1 answer
5k views

MS SQL Server's STDistance output differs from Google Earth/Maps straight line distance

I am testing SQL Server STDistance function in the following way: DECLARE @g geography; DECLARE @h geography; SET @g = geography::STGeomFromText('POINT(53.553813 9.99158)', 4326); SET @h = geography:...
Ricardo's user avatar
  • 143
4 votes
2 answers
1k views

Measuring distance to roads using raster data in ArcMap?

I am using ArcMap 10.1 on a Windows x64 system. I am trying to analyse the driving force of urban land use land cover changes. I have 7 raster files represents distance to roads, distance to river, ...
user121's user avatar
  • 71
4 votes
2 answers
3k views

Calculating the distance between points and multiple lines?

I have a point shapefile of about 100 points and a polyline shapefile of about 200 lines and I am interested in finding the distance between every point and each individual polyline. My polyline ...
djd's user avatar
  • 41
4 votes
1 answer
3k views

How to draw a polygon with preset length in OpenLayers?

For a project I am working on, I need to be able to put a polygon on a map using OpenLayers, based on a variable point that can be set by a user. The polygon is an isosceles triangle of which two legs ...
Michiel's user avatar
  • 75
4 votes
3 answers
3k views

Comparing two point shapefiles that contain lat/longs and compute distance using ArcGIS Desktop?

I have 2 sets of point shapefiles in ArcGIS Desktop (group A and B), each set has around 1000 entries that contain lat/long. What I want to do is compare Group A against Group B and figure out for ...
Furlong's user avatar
  • 2,115
4 votes
1 answer
2k views

Correct use of the terms geographic, path, and Euclidean distance

I often use the terms geographic and Euclidean distance interchangeably when referring to the length of the shortest straight-line distance between two points on a map. Is this correct? I use the ...
digitalmaps's user avatar
4 votes
0 answers
3k views

How to approximate point to segment distance on sphere?

I would like to approximate the distance of a line segment from a reference point on the map (coordinates are gives as lat/lon). In the Cartesian coordinate system I would simply find the closest ...
BKE's user avatar
  • 141
4 votes
1 answer
2k views

Proof of part of haversine formula?

I'm trying to study how to find the distance between two points if their latitudes and longitudes are given. I have a question about the proof of part of the haversine formula given at Math Forum. It ...
justin's user avatar
  • 143
4 votes
2 answers
249 views

Calculating number of points within 400 meters along network route

I have a layer with (several thousand) addresses, for every one I need to find the number of shops (155 total) within a 400 meter road network. Because of the large number I need to find a tool to use ...
Bo Willems's user avatar
4 votes
1 answer
10k views

Getting shortest distances between features on separate polygon layers using ArcGIS Desktop?

I have a county-level map for the state of North Carolina, U.S. I would like to compute the shortest distance of each county to any point along the border of Georgia. How would this be done? ...
user1690130's user avatar
4 votes
1 answer
286 views

PostGIS point distance from polygon not 0 when on edge

I have a pretty simple problem: SELECT * FROM ST_Distance(ST_GeographyFromText('POLYGON((70 -40,70 -39,71 -39,71 -40,70 -40))'), ST_GeographyFromText('POINT(70.48 -39)'), False) returns 118....
prawdziwy-sok's user avatar
4 votes
1 answer
207 views

Modifying code to create a field with length of lines intersecting polygons

Some time ago I made a post about creating a field in a polygon layer that get its value from length of line intersecting them. The answer I got at the time helped me for a specific purpose, but now I ...
Felippe M.'s user avatar
  • 1,082
4 votes
1 answer
2k views

How to use/interpret/visualise a distance matrix with unknown coordinates?

How would you go about using a distance matrix where points have no coordinates, i.e. what useful statistics can be made and how to visualise it in some useful way?
Vladtn's user avatar
  • 458
3 votes
1 answer
1k views

Distance between 2 3D points(GPS+altitude) in PostGIS

I have 2 points, look like: (lat,lon,altitude in meters). How can I get the distance between them? I saw only ST_3DDistance(geometry g1, geometry g2); But I don't know how to set points coordinates ...
delkov's user avatar
  • 185
3 votes
2 answers
307 views

Distance in QGIS' cluster point tool: radius or diameter measurement?

I am using a point cluster tool in QGIS to consolidate data points based on their longitude and latitude. I note that in the Layer Styling panel that Distance can be set to metres at scale, map units, ...
Inquirer's user avatar
3 votes
1 answer
216 views

How to calculate the distance between points (pointlayer)

I am totally new to QGIS and I have a List of Trackpoints which I loaded in QGIS as a CSV (with the GEOCSV plugin to be able to edit the layer).So I have a Layer with ~1000 Points now. I like to add ...
Maike's user avatar
  • 31
3 votes
1 answer
598 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 ...
Rébecca Matte's user avatar
3 votes
1 answer
505 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 ...
miln40's user avatar
  • 1,111
3 votes
1 answer
2k views

What formula does SQL Server 2008 use in STDistance?

I am analyzing the accuracy of the STDistance function for geographical objects in SQL Server 2008, in order to understand its behaviour better I need to find the underlying formula. Does anyone ...
lenan's user avatar
  • 33
3 votes
1 answer
3k views

Getting points within a range from a postgres database?

ok so this is query i'm making which returns no result: SELECT building.gid FROM building WHERE ST_Dwithin(building.geom, ST_GeomFromText('POINT(long lat)',4326), 400) If I run this in ...
Kourosh's user avatar
  • 1,299
3 votes
1 answer
215 views

Raster Distance from each cell to nearest cell with specific value

To analyse the "virginity" of an area I created a binary raster with 1 = human infrastructure (road, housing, ...) 0 = no human infratructure (forest, agriculture, ...) I would no like to calculate ...
Kevkev770's user avatar
  • 375
3 votes
3 answers
264 views

PostgreSQL - attach to point table the maxium distance value to edge of containing polygon

I'm trying to find the furthest distance from a point to the edge of the polygon it sits in. The polygons in this case have been converted to vertex points. I have two POINT tables in Postgres (and a ...
Theo F's user avatar
  • 1,829