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
2answers
608 views

Get the 2 points immediately before and after a given point in PostGIS

In the picture below: The given point is C, I would like to select A and B, but not Z (which is closer to C than B but it's not immediately after in the LineString). Note that C is always ON the line ...
6
votes
3answers
2k views

Calculate distance between point and linestring and how to represent that on QGIS?

I have loaded my data with osm2pgrouting and I have my network with ways (Linestring) and nodes (Point). The problem is : I have a database of doctors addresses (point) and I should calculate the ...
6
votes
2answers
8k views

java vividsolutions jts wgs-84 distance to meters

my (java) project uses com.vividsolutions.jts.geom, which provides a distance function. After some googling I finally found that the return value from this function is in central angle degrees, when ...
6
votes
2answers
623 views

QGIS quickest method of calculating distance between multiple points in one layer?

Using Qgis 2.18.3, I am looking for the quickest method of calculating the aggregated distance between multiple points. As the Crow flies would be enough... I have a point layer in a small area. ...
6
votes
1answer
1k views

Seeking Fréchet distance implementation (Python) to cluster trajectories by similarity

I am working on a trajectory analysis project using Python and its data science related libraries. I am planning to implement Fréchet distance algorithm for trajectory analysis, each trajectory has ...
6
votes
2answers
4k views

Calculating distance between points of same layer using QGIS?

I am using QGIS 2.13 and a layer with hundreds of points. I need to calculate the distance to the nearest point... in the same layer. I tried the distance matrix but I get 0m since the "closest" point ...
6
votes
2answers
888 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 ...
6
votes
2answers
4k views

Is there an R equivalent of NEAR in ESRI ArcGIS?

I have 54 points in one data set A I have 300+ data points in a dataset B. I wish to find the distance for each point in dataset-set B, to points in dataset A. Nearest Neighbor packages appear to ...
6
votes
1answer
5k views

OpenLayers measure tool - instant measurement

I need to use measure tool to measure distances (instant measurement!) in my application. Instant measurement example can be found here. But the main problem is that when I use instant measurement ...
6
votes
2answers
628 views

Calculate stop times/distances of transport lines - tools and procedure?

I need to calculate stop times of bus lines (extrapolation) I have: Shapefile with all stops Shapefile with control points where bus time was taken Shapefile with all bus routes CSV file with times ...
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", ...
6
votes
1answer
2k views

How to generate a point distance matrix using shortest network distance? [closed]

My problem is as follows. To start with, I have the following spatial datasets: A road network; 13,000 odd point locations representing populated localities (ie places where people live); Service (...
6
votes
1answer
1k views

Measuring Right of Way in ArcGIS Desktop?

I'm helping bring CAD people into ArcGIS so that everyone throughout the company is on the same page and there is one database for everything. Right now, one of the biggest hurdles is making sure all ...
6
votes
2answers
4k views

How to interpolate a lat/long point between two others at a given distance

I'm trying to solve the problem of interpolating a point at a given distance (in meters) between two other lat/long points. (e.g. P1 (50,10), P2(50.01, 9.990), I want to interploate P3 at a distance "...
6
votes
1answer
3k views

How to calculate distance on large raster in R?

I'm trying to do some raster algebra and one of my layers is a distance from a coastline layer. I'm using rasters with 12.5m resolution and when I use the distance function, I seem to run into memory ...
6
votes
3answers
7k views

Need to get distance matrix for large set of points on-the-fly [closed]

I do not know much about GIS and I do not know much of the jargon. Hopefully you can help me a bit here because I am really unaware of the services and software available. My problem is as follows: ...
6
votes
2answers
286 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 ...
6
votes
1answer
1k views

How can I make a PostGIS ST_Distance_sphere query more efficient?

Within PostgreSQL/PostGIS I have written a SQL query to get the closest distance for each element within a point coordinate table from a polyline table. The query comes back and works correctly, but ...
6
votes
0answers
140 views

Position of vehicles relative to lead vehicle

I have a set of vehicles (think railway) that are in a (semi)fixed formation. I know the lead vehicle and I know the GPS coordinates of the lead vehicle at any given time. Sometimes, I can rely on the ...
5
votes
4answers
967 views

Length of line on specific point (from point layer)

I have a line and a point layer. The points are manually set next to the line at specific places. Now I would like to get the distance between the end/start of the line and the points. Distance from ...
5
votes
5answers
1k views

Getting a square mile bounding box anchored by coordinates?

Let's say I have a lat/lng coordinate pair. I want to determine the coordinates that would create a square mile box. The existing coordintae pair would be the top left of the box, and the coordinate ...
5
votes
1answer
8k views

Distance in meters between two geographic coordinates

I want to determine the distance in meters between two geographic coordinates. The points are: Lat (deg) Lon (deg) A: -33.3930906 -70.5452765 B: -33.3993212 -70.5468767 So if i calc the ...
5
votes
2answers
40k views

Looking for a Tool to Calculate Distance Between Points (Between Layers)

I am a college student using ArcEditor 10.0 for a semester project measuring distance to hospitals from census tract centroids. This is my first time using ArcGIS, and I have no formal training. So ...
5
votes
2answers
637 views

PostGIS ST_Distance vs. pgRouting

I am looking to create a city directory web app, and the site will need to be able to calculate distances between two geospatial points (like the distance between the user and a restaurant, or the ...
5
votes
2answers
2k views

Finding points along a path

I am unsure of the best approach to this problem. I can think of some ways of doing it which I will list below but I am looking for the best and most efficient way of doing this. Problem Given a ...
5
votes
2answers
7k views

Formula for calculating short distances in UTM?

I'm fairly new at calculating distances with precision, but I wanted to know what is the best formula for calculating short distances in UTM coordinates. The distances that I'am calculating are all ...
5
votes
3answers
992 views

What is a 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 ...
5
votes
2answers
362 views

Finding distance between point and polygon edge in eastward direction using PyQGIS?

I need to find distance in eastward direction from each point to the closest polygon edge: I can find shortest distance in any direction with: pointlayer = QgsProject.instance().mapLayersByName('...
5
votes
4answers
367 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 ...
5
votes
1answer
177 views

Why is the length of one degree in Turf 0.9988?

Calculating the (spherical) distance along one degree of longitude at the equator in Turf returns a number less than 1 (Try it): require('@turf/turf').distance([0,0], [1, 0], { units: 'degrees' }) 0....
5
votes
1answer
520 views

Verify if a lat-long fall in my route

I am using ggmap package to generate routes. The resulting data frame will contain the routes information from the given source to the destination. library(ggmap) route_df <- route(from = "...
5
votes
1answer
2k 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 ...
5
votes
1answer
76 views

Creating Variable Distance Buffers using QGIS

I would like to create variable distance buffers for some points in QGIS 3.4. I have seen in previous posts that there used to be a tool for this in older versions of QGIS, but that this tool wasn't ...
5
votes
4answers
2k 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). ...
5
votes
3answers
3k views

Getting distance between two points over linestring using PostGIS?

I have a linestring: LINESTRING(-1.3326397 50.9174932,-1.3319842 50.9166939) and I select two points that lay on that linestring. How do I get the distance between these two points (in meters)?
5
votes
1answer
659 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 ...
5
votes
2answers
2k views

Performing Point Distance analysis using Basic level license of ArcGIS for Desktop?

I am using ArcView Version 10.1 and I need to perform a point distance analysis like: What is the distance from A to B-Z, B to A-Z, C to A-Z, etc? What are the steps that I take to do this?
5
votes
3answers
5k views

Dissolving polygons by attribute within certain distance using ArcGIS Desktop?

In a FeatureClass I have a lot of polygons which contain attributes of different landuse-types. Now I am trying to dissolve those polygons of the same landuse-type, but only if the distance between ...
5
votes
1answer
5k views

Distance of points to nearest polygon edge in ArcGIS 10.2

I have a point feature class that consists of a systematic grid of points across a landscape. I also have a shapefile consisting of several polygons. For each point in the feature class, I'd like to ...
5
votes
2answers
2k 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 ...
5
votes
1answer
214 views

How to calculate average distance from points to points?

I have a point layer of 400,000 voter residencies and a point layer of 500 polling places. I am trying to find the average distance it takes voters to get to their polling location. Distance by road ...
5
votes
2answers
427 views

How to find Closest Facility (euclidean distance)?

I have some facilities and incidents, and I want to find the closest facility for each incident. I've done it via Network Analyst (with a network dataset) but I'm wondering if you can do it with just ...
5
votes
3answers
2k views

How to access the road graph plugin in python?

I am developing a few scripts in Python for QGIS 1.8 to automate some geo-tasks and one of them would be to calculate the shortest distance from a hospital to each building in a town. I would like to ...
5
votes
1answer
1k views

Get the total distance from a point to the end of a linestring

I have a list of GPS coordinates that make up a bus route: busRoute = [(x1, y1), (x2, y2), ... (xn, yn)] I also have a point that may not be exactly on that route (due to GPS error): ...
5
votes
2answers
19k 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 ...
5
votes
3answers
2k views

Finding point in country furthest from boundary? [closed]

i'm trying to find the point in south africa furthest from the sea or a landward boundary. my method thus far: i obtained a first guess at the centre of the inscribed circle and the three segments ...
5
votes
1answer
1k views

Distance between points and polygons in QGIS / PostGIS

I need to work out the distance between a table of polygons and a table of points. The table of polygons has different site boundaries, and the point table has points relating to each of the site ...
5
votes
2answers
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, ...
5
votes
1answer
110 views

Distance to Multiple Neighboring Sectors

I have two shapefiles - one of neighborhood polygons and another of centroids within those neighborhoods: For each centroid I would like to calculate: Distance to the next closest neighborhood (and ...
5
votes
1answer
660 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 ...