# Questions tagged [distance]

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

1,269 questions
Filter by
Sorted by
Tagged with
700 views

### Finding density centroids within polygons in PostGIS

I want to find the highest density of OpenStreetMap nodes within a dataset of census geometries. I want to tie the census data to the location of the node which is most central in terms of population. ...
30k views

### For every point, distance to nearest polygon of type X?

In ArcGIS Desktop, can you calculate as an attribute value the distance to the nearest polygon of type X? Assume we have a point layer of wildlife observations and we want to know how far each of ...
1k 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 ...
3k views

### Way to find minimum value from a group of values - QGIS?

I'm wondering if there is a way to find the minimum value of a group within QGIS? Basically I need to find the minimum distance of each unique value in a table of about 5000 records. I can do the ...
1k views

### Creating duplicate line set distance away from a polyline in QGIS?

I'm new to QGIS and not really sure what I'm doing; I have a polyline of the UK coastline and I want to add another line 30 km offshore. Is this possible?
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 ...
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 ...
1k 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 ...
268 views

### Calculating daily travel distance from large dataset using QGIS?

My dataset is around 200 days worth of data on the daily distance travelled by a troop of monkeys. I've never properly used QGIS on my own so don't really know where to start. All of the days are ...
1k views

### Is there a way to calculate closest distances to a point without using Near Analysis?

I frequently get asked to calculate distances from a specific point (A drilling well in the middle of the sea for example) to a number of Environmental layers (Protected Areas, Pipelines, Other wells ...
233 views

### Deleting “lonely” points in QGIS?

I have a large point dataset of about 5.3 million points. I would like to delete the "lonely" points using QGIS, for example all points with no neighbor within a 5 km radius. The extent of my point ...
756 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 ...
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 ...
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 ...
731 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. ...
2k 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 ...
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 ...
928 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 ...
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 ...
633 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 ...
5k 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", ...
4k views

### WGS point to WGS line segment (great circle) distance

How would I go about resolving this in C#? I have a line segment (great circle distance) defined by two Lon-Lat pairs (call them points A and B). A third point somewhere on the Earth sphere. The ...
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 (...
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 ...
714 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 ...
8k 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: ...
5k views

### Finding distance in meters between point and path in lat/lon using GeoTools?

I need to find distance in meters between some point with given latitude and longitude and line (on Earth) defined by several points with lat/lon coordinates. I read these questions: Using ...
3k views

### Using Linestring distance in meters with GeoTools?

I want to use GeoTools for working with gis data. I'm most concerned about distance calculations, not so much about drawing a map. What I still couldn't figure out is how to make distance calculations ...
94 views

### Haversine based distance transform

I have a binary image with pixel resolution in units of degrees (EPSG:4326): In this case, all the light-blue pixels are water (value = 1) and purple pixels are not water (value = 0). I would like to ...
269 views

### Cleaning GPS tracks from large jump / outliers

Can someone please explain the steps to take in order to eliminate the parts of these linestrings which jump across large distances (not along with the road network)? They were created from GPS ...
446 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 ...
2k 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 ...
192 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 ...
2k 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 ...
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 ...
670 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 ...
22k views

### Measuring distance between points using QGIS?

I have a layer with about 500 single points. Now I want to measure the distance between each of these points and one specified observation point. I need the distance to show how far away from the ...
1k 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 ...
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 ...
147 views

### Calculating field AVG from B layer 3 nearest points to each A layer point

I wonder how to calculate statistics (in my case average) of one point layer field (let say B layer) and assign them to each point of A layer. Statistics should be calculated from 3 nearest B layer ...
458 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('...
203 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....
724 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 = "...
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 ...
118 views

### Get points within maximum distance from any point in GeoPandas

Given a set of points (with meters coordinates), I am trying to create lines between them. But I don't want to create lines of each pair of points, Iwant to create thoses lines if the distance between ...
313 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 ...
8k 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. ...
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). ...