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
0
votes
1answer
53 views

Apply symbology based on an algorithm (ArcGIS)

Been battling this problem for a long time now, so hoping someone here can shed light on a possible solution. The problem is that I have 100 points and I want to apply a color palette to the points so ...
32
votes
9answers
72k 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 ...
0
votes
1answer
304 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
0answers
10 views

openlayers 6: measure tool dosen't show up drawn shapes

I am working on a laravel project, where I need to insert a map in the interface of my application. I am using openlayers V6.3.1 to create the map with its basic tools. I still have a problem, measure ...
1
vote
0answers
22 views

Using NNjoin tool for closest distance between multiple points and multilinestring

When I use the NNjoin tool to compute the distance between points (from an CSV file) and a multilinestring (from a shapefile) the tool creates the new layer, but in this new layer it does not take ...
-2
votes
0answers
16 views

Distance to nearest other source cell

I would like to run essentially a Euclidean distance type analysis, however, for each source cell I would like to find the distance to the nearest OTHER source cell. This would mean that grouped ...
1
vote
1answer
458 views

Python: Open a (line) shapefile and calculate distance to point given as a longitude-latitude tuple

I have a Pandas dataframe in Python with longitude and latitude values of certain locations (see sample below): Index Long Lat 0 -98.58 ...
3
votes
3answers
10k views

Creating buffer circle x kilometers from point using Python?

I am wanting to create a circle with an inputted radius around a point of predetermined latitude and longitude. I've been trying to use the formula found in this post which uses an algorithm ...
0
votes
1answer
15 views

How to get Euclidean Distance to include all input features?

I've run Euclidean distance on a water source dataset. Water is represented as polygons and I run the Euclidean Distance tool in ArcMap. It appears to work great but when I zoom in I notice that some ...
0
votes
0answers
19 views

How to get the shortest distance from a polyline to a set of points in Python?

Here in the image, the black line is the polyline I have and the red points are the points from which I need to find the distances D1, D2, D3 and D4. The polyline data is extracted from Google ...
1
vote
1answer
21 views

Calculating distances with PROJ4J

I am already using proj4j in my project to convert between different coordinate reference systems. (Internally I use WGS84 but some sources supply data in a different CRS.) Now I need to calculate ...
1
vote
1answer
144 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 ...
2
votes
0answers
33 views

Finding coordinates by Azimuth

I am working on a forest project. I have one central point (I know coordinates of it), than I have azimuth and distance of trees from this central point. How can I find coordinates of trees? p.s. ...
0
votes
1answer
44 views

Calculating Euclidean distance in ArcGIS

I am willing to model the distribution of an amphibian species in relation to climate and land cover in MaxEnt. For this I have downloaded the WorldClim data and the Global Consensus Land Cover (https:...
2
votes
1answer
45 views

Average distance between two different layers

I am a new user of QGIS (version 3.2.3) and I find myself in need to do some calculations. I am trying to find the average distance between two sets of points (i.e. schools and settlements) contained ...
2
votes
1answer
485 views

How do v.distance 'upload' parameters actually work?

I'm trying to use v.distance (using QGIS 3.4) to calculate the distance in meters between a layer of water shutoff points and the boundary of the nearest building footprint polygon. Even better would ...
2
votes
1answer
37 views

Distance Matrix between centroids QGIS

I'm using QGIS and I would like to measure the distance between the centroid of King County in the US and the centroids of all other US counties. I have imported the shapefile and I have executed the "...
1
vote
0answers
22 views

Calculation GPS Accuracy based on known point

I have 3 GPS's that were on the same point for about an hour. Each of them yield a fairly accurate position but not a complete accurate location (obviously) I want to know how to calculate the best ...
9
votes
4answers
582 views

Calculating the longest distance within polygon in QGIS

I want to calculate the "diameter" of polygons in QGIS. The "diameter" defined as the distance between the two most distant points of the polygon. I couldn't find a fitting solution in the field ...
0
votes
0answers
16 views

Spatially constrained multivariate clustering

What's the current methodology for clustering geospatial data by features? Not in ArcGIS - rolling my own in a different framework. Example: I have some demographic dataset. Let's say this contains ...
0
votes
1answer
115 views

Find all regions (lat, long, radius) that contain a point

A Region has a latitude, longitude (GEOMETRY('POINT')) and a radius. Using postgis, how can I query all Regions where the distance from pointParam and region.point is less than or equal to region....
21
votes
4answers
116k views

Find features within given coordinates and distance using MySQL

I have a MySQL table with user name, latitude and longitude of the user. I would like to get a list of users who are inside the circle or square of a given latitude and longitude with given distance. ...
5
votes
1answer
602 views

commuteDistance in gdistance package in R giving error

I am currently trying to run a function that "calculates the expected random-walk commute time between nodes in a graph. It is defined as the effective distance (resistance distance) between the ...
5
votes
3answers
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 ...
0
votes
1answer
17 views

How to calculate the distance of points to line in R?

I need the distance from each point of the object found to the transect line. 'id' is a research transect, and 'obj.id' is the object found. in this case, 1 object was found in transect A and 2 ...
3
votes
5answers
16k views

Approx distance between any 2 longitudes at a given latitude

Given a SINGLE longitude coordinate in decimal degrees, how do I calculate the distance in miles or km between latitude 0 and 1 at that longitude? ie what is the formula? For example, given 51.43567 ...
1
vote
0answers
23 views

Distance between different points

I am looking for a way to calculate the distance between different points in a linestring. In practice I created a linestring from a X and Y coordinate by means of st_linestring(asNumericMatrix(...
1
vote
1answer
99 views

Calculate Geometry function returns underestimated distances

I'm making a map of the Colorado Trail and obtained a set of waypoints taken down the entire trail. I projected the set of waypoints from WGS84 (unprojected) to NAD 83 UTM13N after adding to the data ...
0
votes
0answers
26 views

Is there a measure that account for the the location diversity and trajectory distance of agents?

I am currently working on project to assess the success of musicians. For each musician I know when and where (coordinates,city,county) they performed in a gig. I assume a successful musician is the ...
0
votes
1answer
43 views

Get the maximum distance between two consecutive points in a linestring [closed]

I want to check if a track is valid by measuring the distance between each consecutive points of my track and discarding the tracks which have two consecutive points really far away. My tracks are ...
3
votes
1answer
164 views

Calculating distance while adjusting for obstacles in ArcGIS Desktop?

I have a global grid of points in the ocean and need to calculate the distance to and identify the closest 10 polygons along the coastline for the entire world while also avoiding crossing land. For ...
7
votes
4answers
11k views

How to use GeoSeries.distance to get the right answer

When I want the distance between two points [(117.454361,38.8459879),(117.459880 ,38.846255)] (longitude,latitude) on the earth, I take the GeoSeries.distance method, but the method does not give me ...
0
votes
1answer
27 views

Sorting by distance in MySQL

I found a sample of code SELECT * FROM locator WHERE SQRT(POW(X(center) - 49.843317 , 2) + POW(Y(center) - 24.026642, 2)) * 100 < radius in this question Find points within a distance using MySQL....
1
vote
0answers
58 views

MapWinGIS Create Buffer Using WGS84 Lat Long Coordinate System

I am using MapWinGIS with c#. I am trying to create a buffer for a polygon that has WGS84 decimal degree reference system, but it never get displayed. Here is my code: // Form load var gp = new ...
3
votes
1answer
214 views

Find traveling distance between line and point

Is there a clever way to traverse a line string up until a point and return the distance to that point? As an example: a = LineString([(1, 1), (9, 1), (9, 6), (4, 6), (4, 3)]) p = Point((4,4,)) The ...
1
vote
1answer
49 views

Finding average distance to nearest point

I would like to find out the average distance from high schools (represented as a point in QGIS) to libraries (represented as another point in QGIS) in New York's 32 districts. I have already ...
0
votes
1answer
59 views

Attempting to get the distance between two Point objects. Getting AttributeError: 'GeoSeries' object has no attribute '_geom'

I am a beginner in GIS. Using the code below to get the distance between two Point objects from two separate GeoDataframe. Using the shapely distance function. Can someone please explain to me what I ...
0
votes
1answer
94 views

Cost distance tool to figure out shortest distance over water between 2 points

I have multiple points in a bay and I need to figure out the distance of each point to the nearest inlet, without going over land. I have been told to use the Cost Path or the Cost Distance tool but ...
1
vote
1answer
54 views

Measuring distance between features in linear units from vast layer in geographic coordinates in gdal

I have a point layer for a large area. The layer is in a geographic coordinate system. I need to make some distance-aware work with features from this layer. Actually, I need to build a buffer-layer ...
0
votes
0answers
22 views

Point snapping distance

I have question -i need very easy shift 1 point. It is very difficult in new version. 1.Why I can't shift point closer like red distance? Between red and yellow is not possible snapp. Blue is what I ...
0
votes
0answers
35 views

Point to line distance using dist2Line and 'sf' library

I need to calculate the distance from a set of points to the closest line. I followed the approach outlined here. dist_plsscentroid_rail <- geosphere::dist2Line(p = st_coordinates(...
0
votes
1answer
34 views

Get distance from point to 10 nearest points in ArcGIS

I've a layer with the location of different sampled ponds and a layer with all the ponds in the region. I want to calculate the mean distance to the 10 nearest ponds in the region for each of the ...
1
vote
1answer
39 views

Creating a single point on a specific distance on a line in QGIS 3.10

I'm trying to find a plugin of some sorts to help me create a point along a line at a certain distance. This does not require a import from a CSV file, just a field where I can insert a certain ...
0
votes
0answers
16 views

Addresses, Geolocation and driving times

I have a list of addresses (Germany and Austria) that I want to display on a map (easy) from a random point on the map obtain a list of all the addresses that are within a driving time of x mins (...
0
votes
0answers
19 views

Assign matrix values to raster when values do not align with raster rectangle? R

I'm trying to create a raster of distance to a single line feature (a 25 m contour line derived from an elevation raster). Since I want to run this in a loop and I have a ~15 million cells, I ...
1
vote
1answer
36 views

Transition Function Inputs

I would like to define my own gdistance::transition function. However, there are two issues that I aren't clear to me yet. First, I do not yet understand what the input vector to this transition() ...
1
vote
1answer
183 views

Distance between point and line layers & spatial index issue

I am trying to compute on QGIS the distance from some clusters (ie points) to their closest road (ie lines); no need for all combinations, just the distance from each cluster to the closest road. To ...
0
votes
2answers
131 views

Calculate distance covered by points in a shapefile

Is there a way to calculate the total distance covered by thousands of points in a shapefile in ArcMap 10.4 or possibly ArcPro? I am trying to apply a buffer for each point, then dissolve and find the ...
1
vote
1answer
3k views

Measuring on OpenLayers map

These days, I am trying to develop web map using openlayers. I copy source code from here Then I changed code to display my data.B ut it does not work, even map is also not showing. In chrome shows "...
3
votes
1answer
3k 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:...

1
2 3 4 5
25