Questions tagged [distance]

Distance is a numerical description of how far apart objects are.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

How can I drag left to right while Row is changing but Column is the same (for Excel)

I am required to calculate this distance between many different points with latitude and longitude (e.g., Point 1 to Point 2, ... Point 1 to 1000, ... Point 999 to 1000) I have a formula: "=6371*...
Wei Loon's user avatar
2 votes
1 answer
58 views

Sort path of multiple points in shortest distance order

I have such a dataframe: id lat lon ... 0 51.0234 0.3467 ... 1 52.8762 0.2890 ... 2 54.0342 0.4510 ... 3 50.1237 0.1870 ... and so on. There are multiple points like those in non x nor y order. ...
Szymon Budziak's user avatar
0 votes
0 answers
22 views

Which library is more accurate in measuring geodesic distances in meters between points? (pyproj, geopy and haversine)

I calculated the distance in meters between 2 points using 3 different libraries in Python (pyproj, geopy, and haversine). The results showed a major difference. How can I determine which result is ...
Nemo's user avatar
  • 1
1 vote
1 answer
87 views

Compute distances between points and lines by rows

I would like to calculate distances between points and lines displayed in each row of my dataset. Here below a small example of the data I have point_id point_lat point_lon ...
Coralie's user avatar
  • 199
0 votes
0 answers
11 views

How to find the distance to each segment of my route from random Points?

I want to find the distance from each point to each segment to one route to find the nearest segment. with myroute as (select ST_MakeLine(array[ ST_Point(11.507663726806642, 48....
Tibor's user avatar
  • 171
0 votes
0 answers
10 views

convert Mahalanobis distance to units (inverse transform Mahalanobis)

I'm looking for a way to create data points at a given Mahalanobis distance from my sample data (mydata below). Basically I feed a distance to a function and then it outputs values of the variables ...
BML's user avatar
  • 191
0 votes
0 answers
27 views

Results of geopandas sjoin_nearest

I have 3 datasets for every record of dataset 1, I need to find the nearest point in dataset 2 and 3. The first step I wanted to do is find the distance for all of dataset 1&2 points, then dataset ...
Bunny's user avatar
  • 1
0 votes
0 answers
21 views

Calculating distance/similarity with grouped features

I have tabular data in the form of binary codes in each feature. Student Group 1 - SubGroup1 Group 1 - SubGroup2 Group 2 - SubGroup1 Group 2 - SubGroup2 A 1 0 0 0 B 0 1 0 0 C 0 0 0 1 "1"...
Matt's user avatar
  • 5
0 votes
0 answers
13 views

How to divide the indices to determine the ideal number of clusters in 3 groups?

How to divide the following indices to determine the ideal number of clusters in 3 groups: internal cohesion (intracluster similarity), distance between cluster (intercluster dissimilarity) or both? ...
César Macieira's user avatar
1 vote
0 answers
17 views

Calculate the distance between two triangular turtles considering the perimeter and not the origin

I am trying to be able to identify when one Turtle, as it moves, overlaps with another. I have tried using the distance function but it takes into account the oridine of the turtle and consequently ...
Stefano Menicocci's user avatar
-2 votes
2 answers
69 views

What distance measure can I use that factors in order? [closed]

I have a few lists that havethe same IDs that are strings. They are as follows: list1 = ["1", "2", "3", "4", "5"] list2 = ["1", "2"...
Hummer's user avatar
  • 423
0 votes
0 answers
24 views

Issue with Calculating Perpendicular Distance in NetLogo

Intro I'm currently working on a NetLogo model where I'm trying to connect new "call" turtles to the closest edge defined by two "node" turtles in a network. To achieve this, I'm ...
DeMelkbroer's user avatar
0 votes
0 answers
12 views

how to get the shortest distance or path across several points in the map

In the map, there are many points(paths), but I want to only visit some interesting points. I want to find the shortest distance or path which included my interesting points. But without considering ...
yixing's user avatar
  • 1
0 votes
0 answers
29 views

Given a table HOUSES, find the euclidean distance between points with largest X and Y coordinate, and the points with the smallest X and Y coordinate

Given a table HOUSES, find the euclidean distance between points with the largest X and Y coordinate, and the points with the smallest X and Y coordinate. The Euclidean Distance between 2 points P(x1, ...
Shubham Dhoundiyal's user avatar
0 votes
0 answers
61 views

Find the intersection point of 4 spheres in 3D space

I have a randomly selected point in the 3-dimensional space. Also, I have four random points and their distances to the randomly selected point. These distances are radii of these four points. All the ...
Serhii Chernikov's user avatar
0 votes
0 answers
11 views

Distance between first coordinate and rest of coordinates in each group in a dataframe in r

I am trying to calculate distance between first coordinate and rest of coordinates in each group in a data frame in R. I have different groups, with each group having different number of observations. ...
Leo's user avatar
  • 11
0 votes
0 answers
31 views

Determining the displacement of a Phone (Android)

I want to determine how far a phone has been displaced. However, I want to determine this information to an semi accurate scale (couple of centimetres). I've already toyed around with the idea of GPS, ...
Frankvp11's user avatar
1 vote
1 answer
36 views

calculating bray curtis dissimilarity between each treatment to control within each group

I need to calculate bray curtis dissimilarity of two treatments to a control. but this is nested by site. if I use the entire dataframe, the bray curtis dissmilarity takes into account distances ...
Felipe Albornoz's user avatar
2 votes
1 answer
34 views

Remove locations >8km from the original location for each ID in a df

I have a df with ~50 IDs. Each ID has multiple sets of coordinates, and I want to remove any set of coordinates that is greater than 8km distance from that ID's first location. The data looks like ...
Carly Scott's user avatar
0 votes
1 answer
30 views

Beacon not catch more the 10 meter distance in android

I have used @hkpuits/react-native-beacons-manager npm I want to scan Beacon which has a long distance, this is working for IOS device but not in android Please check my code, `const region = { ...
Vipul Parmar's user avatar
-2 votes
1 answer
23 views

How to record data for distance measurement using Banner Q4XTBLAF300-Q8 laser sensor with NI USB 6008 in Python?

I had connected the analog voltage output to the analog input pin of NI USB 6008. However, the voltage shows no difference when the distance varying. Trying the other ways of getting the analog output ...
Alicia's user avatar
  • 1
0 votes
0 answers
50 views

QuPath: Measuring distance between different subpopulations of cells and the outside of an annotation

I am trying to determine the exact distance between each cell in a certain subpopulation in an annotation and the outer edge of the annotation. For example, to find the distance between the each ...
ashley's user avatar
  • 1
1 vote
1 answer
20 views

Calculating a similarity matrix in R counting only shared columns of binary data

Working in R. Trying to calculate the similarity/distance of rows in a data.frame (each row is an item) from each other according to shared membership in groups (columns). However, I don't want 0 ...
mikeblazanin's user avatar
0 votes
1 answer
35 views

Grabbing calculated latXlong distances in different rows and columns in matrix layout

Problem I have data with latitude and longitude coordinates that I calculated distance of each observation from the first starting point. I get a matrix when I calculate the distance that I can ...
Brittany Poling's user avatar
0 votes
0 answers
10 views

How to recode values in geospacial data frame by conditioning on surrounding values?

I have a data frame that looks similar to this: set.seed(1234) df <- data.frame( region = sample(c("A", "B", "C"), 60, replace = TRUE), year = sample(c(2001:...
Leetram's user avatar
  • 15
1 vote
0 answers
28 views

QGIS - Incorrect distance measurement using EPSG: 25832

I have an issue regarding distance and area measurements in QGIS (includes buffer etc.). My CRS is set to EPSG: 25832 (Germany). Measurements differ substantially from those of my colleagues (using ...
Kevin_S2021's user avatar
0 votes
0 answers
46 views

Finding the GPS distance from many geometric POINTS to other many locations and determine if they are inside a treshold distance

I have 3 shape files. The first (shp_family): Having a family_code column and geometry column (POINT) being the location of that family. For the example i have 100 observations of unique family_code ...
Pedro TTL's user avatar
0 votes
0 answers
18 views

How to interface 6 HC-SR04 ultrasonic sensors to rasberry pi 4

I am a beginner to Rasberry Pi and working on a parking warning system for a go-kart. The plan is to use 6 ultrasonic sensors (3 at the front of the kart, wired to one of the breadboards, and 3 at the ...
Pasindu Danthanarayana's user avatar
0 votes
0 answers
65 views

ROS-Noetic OpenCV/AR Tag Detection

I found this code in blog about OpenCV and i rewrite for using ROS gazebo simulation. I got many error about marker`finding. I will add the error below. #!/usr/bin/env python3 # -*- coding: utf-8 -*- ...
duygud's user avatar
  • 1
0 votes
0 answers
43 views

How to measure the distance between two objects in different planes in a video

I am trying to measure the distance between two objects in a video (Euclidean distance) using Python and openCV etc. I am trying to figure out a solution on how to implement this algorithm and so far ...
BEAN's user avatar
  • 1
0 votes
0 answers
57 views

Issue with Image Processing: Circle Enveloping object glitches between sizes and as such error is a bit too high

I have an orange ping pong and I am writing a python program that gives the distance of the orange ping pong ball from the camera. So far it is working decently well, it is able to give the distance ...
Banana Blitz Coding's user avatar
0 votes
1 answer
77 views

Using NetTopologySuite, how can I convert meters to degrees?

I have no language preference for an answer; either VB.NET or C# will be fine. I've seen this problem discussed elsewhere here on SO, for example here and here, but I've not found solutions that ...
InteXX's user avatar
  • 6,135
0 votes
0 answers
21 views

Assign weights to features for a distance-based classifier (e.g KNN)

I have a lot of text (+4mio documents) which is made up of very short text (text from banktransaction). My "sentence embedding" consists of CountVetorizer (it seems to work better than Tf-...
CutePoison's user avatar
  • 4,729
0 votes
1 answer
34 views

Weighting a set of numbers based on the numbers' relative proximity to n

I'm trying to figure out how to scale a set of numbers based on their relative proximity to a given number. Let's say I have [1, 3, 4, 4, 6, 7, 9, 10] for example, and n is 8. 7 and 9 would have a lot ...
Duckman Duck's user avatar
1 vote
2 answers
117 views

Implement the "Total variation distance of probability measures" in Matlab

I am trying to implement the Total variation distance of probability measures (TVD) in Matlab. Would it be correct to use the max function, in order to calculate the "supremum" of the TVD ...
Ommo's user avatar
  • 291
0 votes
1 answer
53 views

Distance from coastline in R (or fortran) database

`Hi everyone, I have a really big database (more than 80,000 arrows) with latitud and longitud coordinate which correspond mainly to African Continent, and I was interested in calculate the distance ...
Isaac's user avatar
  • 1
0 votes
1 answer
29 views

TypeError: cannot convert the series to <class 'float'> when applying a defined function - pandas

I have created the following pandas dataframe: import pandas as pd import numpy as np from math import sin, cos, sqrt, atan2, radians ds1 = {'Longitude':[-46.6736,-46.50926,-46.75166,-46.54743], &...
Giampaolo Levorato's user avatar
0 votes
0 answers
32 views

How can I measure the similarity of sequential categorical data?

My data is a series of timestamps for sent and received messages from conversations. I have my original data as well as a variant sequence that I've generated. Original: S---R--S-R----S Variant: S-S--...
Twiddlebit's user avatar
1 vote
1 answer
39 views

Postgresql (Postgis) parallel triggers on insert

I have a table the following table: CREATE TABLE pois ( id bigserial NOT NULL, name int8 NOT NULL, point point.geometry(point) NOT NULL ); I want to make pois unique by ST_DISTANCE < 0.00001. What ...
linderman's user avatar
  • 149
0 votes
1 answer
35 views

Calculate geographic distances with only Countries given

I have a dataframe Team5 in R with a column country_code that contains abbreviations of countries. I am using Team5$Country <- countrycode(Team5$country_code, "iso2c", "country.name&...
Soph2010's user avatar
  • 563
0 votes
0 answers
34 views

Calculating coordinates range by given distance

I have a database with cities and it's coordinates (latitudes and longitudes). And I have a function which calculates a distance between two cities: function getDistanceBetweenPoints($latitude1, $...
Mietek's user avatar
  • 1
0 votes
0 answers
71 views

Find all records within radius by coordinates between 2 tables

I have 2 tables: Oracle and Master. In Master table I have coordinates for each record, which were fetched using Geocoding API from Google. For Oracle I had only addresses, so I filled coordinates ...
Prox's user avatar
  • 11
0 votes
1 answer
30 views

Arc routing problem with triangle inequality violated

I want to solve an arc routing problem using cplex library. I keep bumping into problems as the solution provided "teleports" and does not show a proper path. The problem violates the ...
Gabriele's user avatar
  • 737
0 votes
2 answers
156 views

Shortest distance from one point at sea to coast with information of lat/long

I need to find shortest distance from vessel to coast. I have information of latitude and longitude only. Are there any library or code to do this? from shapely.geometry import Point from shapely.ops ...
MCPMH's user avatar
  • 185
0 votes
0 answers
32 views

Why is the distance matrix I upload into R not symmetric?

I am trying to upload a distance matrix for a PCoA plot produced by the qiime2 pathway into R for data transformation. I can't seem to attach the file here, but here is an example of what the file ...
shannonevelyne's user avatar
1 vote
1 answer
42 views

Mean of geospatial distance between two datasets of different lengths

I want to compute the mean distance between all points of the toy1 dataset with the closest point of the toy2 dataset. So for each point of the toy1 dataset, I want to find the closest point among the ...
Camillionnaire's user avatar
0 votes
0 answers
35 views

How can I modify a Python script to calculate the distance between an object and a pair of IR cameras?

I am an undergraduate student that recently took over a research project from my professor's previous assistant who graduated a couple weeks ago. The project she was working on involved the use of IR ...
Feliaria's user avatar
1 vote
0 answers
59 views

How to convert a distance in meters to pixels?

I'm building a Flutter app and I want to draw circles on a map using the flutter_map package. The circles that I want to draw have a radius on meters, I want to convert the distance in meters into a ...
Mikelenjilo's user avatar
0 votes
1 answer
134 views

How to get a SpatRaster of indices of the nearest NA cell in R terra?

From a digital elevation model, I'm trying to generate a raster of the difference in elevation between a water stream and its surroundings. That would be easy if the water stream was flat, but it is ...
Cyril Mory's user avatar
0 votes
0 answers
12 views

Comparing density estimates from two detection models of separate datasets

I am wanting to compare the density estimates from two separate detection models of two separate datasets. Both models were ran using the ds() function in the Distance package in R. I believe I need ...
Blake Baum's user avatar

1
2 3 4 5
80