We’re rewarding the question askers & reputations are being recalculated! Read more.

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
5
votes
2answers
119 views

How to sum multi values for each pixel in PyQGIS?

I have a raster layer and a vector point layer. I calculated distance between center each pixel and each point based on @YoLecomte and @mgri, this link and xunilk, this link. For each pixel there are ...
5
votes
3answers
2k views

QGIS plugin that adds a point along a line at a specified distance?

I'd like to have a polyline layer that has distance from the line origin inserted as marker points along the lines. The distances are stored in the attribute table as a field. The lines have ...
5
votes
1answer
258 views

Postgis Distance calculation on huge datasets

We have 7,512,694 records in our table, Columns: id, name, lat (numeric), lon (numeric), location (geometry(Point,4326)) Indexes we created: create index on table using gist(location); and of ...
5
votes
1answer
2k views

Geographic Heatmaps with Concentric Circles by Distance?

I'm looking to generate a geographic heatmap (using 'ggmap') that overlays some dimension (to start, housing prices) over the lat/lon near a city center. Then I want to create circles of equi-distant ...
5
votes
3answers
559 views

What is the precise distance from equator to pole according to WGS84?

For calculating areas of polygons by means of projecting to a cylindrical equal area projection I came across the following discrepancy: I ended up with a different distance, off by more than 5km, ...
5
votes
2answers
13k views

What are the units of the Distance Matrix tool results in QGIS?

I have a point data set. Now there are cluster of points based on a field. So I take out one such cluster which has points with same field.I want to find distance between all the points in cluster and ...
5
votes
2answers
265 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 ...
5
votes
1answer
311 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 ...
5
votes
2answers
2k views

ST_Distance is not delivering right results

I want to calculate the distance between lat/lon points. I tried the following queries: Select ST_DISTANCE(ST_GeomFromText('POINT(-73.97923 40.75571)', 4326), ST_GeomFromText('POINT(-73.974509 40....
5
votes
1answer
680 views

How do I get the upstream distance to all points in a DEM from a single downstream point?

I want to get the upstream distance to all points in a DEM from a single downstream point. The goal is to create a "downstream distance to a point grid". This then would allow me to create "distance" ...
5
votes
1answer
372 views

What kind of margin of error can I expect in figuring distance?

I have reviewed Why is law of cosines more preferable than haversine when calculating distance between two latitude-longitude points? and that does not equate to the specific question that I wish to ...
5
votes
1answer
304 views

Counting longest distance between two lines using QGIS?

How do I count longest distance between two lines as shown at the picture in every bump using QGIS?
5
votes
3answers
2k views

Why difference between Google Earth and QGIS distance measurement?

I am quite new to QGIS. I wanted to test if Google Earth and QGIS distance measurement tools are actually getting the same results. Turns out, they don't -at least not in my case. I'm pretty sure ...
5
votes
3answers
588 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 ...
5
votes
3answers
1k 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 ...
5
votes
1answer
1k views

PostGIS - table with 3d points with fast ordering by distance

I am pretty new to PostGIS and I am trying to solve the following problem. I need a table with 3D points (x,y,z) that will contain around 1-10million points. I want to be able to efficiently ask the ...
5
votes
1answer
2k views

How to find the two furthest points between a group of points?

I have a table with 20000 records and with those columns Shop, longitude, latitude, geom I would like to find a way to find the pair of ths farthest shops between a selection of shops For example we ...
5
votes
1answer
3k 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 ...
5
votes
1answer
191 views

Measure distance between nearest points in the sea along the coast automatically in ArcGIS

I have global point data of marine species along the coast. I would like to measure the distance between the two closest points but this distance needs to be measured in the sea and not on the land ...
5
votes
1answer
4k 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 ...
5
votes
1answer
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 ...
5
votes
1answer
2k views

Calculating “travelled distance” of a GPS track without including “stops”

I have a set of GPS tracks from a cycling event and I want to correlate their distance along the route. Problem is: when a rider stops, generally by entering a covered place, GPS keeps logging (low ...
5
votes
3answers
11k views

What formula is used for distance between 2 points in Google Maps?

What formula is used by Google Maps for calculating the shortest distance between 2 points (having their Lat, Lng coordinates)? Is it purely based on Haversine? Or is it something different? Is there ...
5
votes
2answers
1k views

minimum distance from the shore (how to retrieve the “shore vertices”)

I am student of Statistics, this is my first time using GIS., I am sorry for the stupidity of the question but I browsed online and could not find a satisfactory answer. I have some spatial data in ...
5
votes
1answer
323 views

How to calculate maximum distance to an interpolated value along a contour in QGIS?

I'm planning to enter concentrations of groundwater contaminants collected from well locations into QGIS and then use interpolation functions to create contours of the groundwater plume. Can QGIS ...
5
votes
1answer
1k views

Calculating radius / buffer on EPSG 3785 in meters vs buffer in WGS 84 in meters

The goal is working in EPSG 3785 and in particular Google Maps, one wishes to render (on a tile) a circle of a given radius in meters. The rendering is done in pixels. I would guess that one could ...
5
votes
2answers
741 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) ...
5
votes
1answer
367 views

Create Archimedean spiral with geographic coordinates

I don't know if this is the right place to ask but here it his. I want to create an Archimedean spiral based in some location. Lets say I have this set of geographic coordinates (48.860770, 2.337655)....
5
votes
1answer
2k 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 ...
5
votes
1answer
155 views

Optimize the locations of 2 additional restrooms on a trail (ArcGIS 10.2)

In the image below, the line is a trail and the point is an existing restroom. I would like to find the rough locations of 2 additional restrooms that minimize the maximum distance along trail from ...
5
votes
2answers
1k views

How to create a point along a line given a distance from another point

I'm trying to figure out a point(D) on B-C that is a specific distance from A. I really don't have any idea on how to proceed with the ellipsoidal math so I figured I'd ask here. How would I figure ...
5
votes
1answer
2k views

Calculating distance in WGS84 (MySQL and Geoserver)

Here is the environment in which I work: An application using geo-referenced data Database MySQL 5.5, storing georeferenced points A Geoserver server, connected to the MySQL database Here is the ...
5
votes
1answer
1k views

How to compute the distance between centroids and polygons?

Suppose I have an Excel spreadsheet with the latitude and longitude of the centroid of every county in the U.S. I want to know the shortest distance from each county to any part of Oklahoma (...
5
votes
1answer
4k views

Calculating distance of points along route using ArcGIS Desktop? [closed]

I am struggling with the calculation of the distance between points along a stream (points are located 0-20m away from the stream) in ArcGIS 10. The points are simple xy-data in UTM. I created a ...
5
votes
1answer
511 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
0answers
144 views

Does sum line length measures geodetic or planar distance? [duplicate]

In QGIS i created a grid (via "create grid"), which i later split into layers of horizontal and vertical lines. Afterwards i calculated the respective cumulative line length for polygons using "Sume ...
5
votes
0answers
391 views

Converting a distance to a map distance

I have a point and a polyline. I need to find the perpendicular distance between each segment of the polyline and the point. By each segment of the polyline I mean that, each polyline may contain more ...
5
votes
1answer
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 ...
4
votes
3answers
7k views

How do I determine the center point of several features in OpenLayers?

I have several polygons being drawn on a map, usually representing a country or province or state. Depending on some chosen data, different regions may be selected, so what I was hoping is that there'...
4
votes
2answers
4k views

ST_Distance versus ST_DistanceSpheroid?

As my client software uses lat/lon coordinates when communicating with my (spherical mercator) postgis database i decided to ST_Transform every geometry to WGS-84. However i noticed that ST_Distance ...
4
votes
3answers
2k views

Why is sum of st_length() of segments 20% too big?

I'm running a query to return the total length of some bike paths, from OpenStreetMap. Compared to the known actual length of these paths, they're all a bit too big - something like 10-30%. I know it ...
4
votes
2answers
11k views

Calculate distance between points and nearest polygon in R

I have a data frame with among others longitude and latitude as variables for about 17,000 points. I also have a shapefile consisting of multiple polygons. The points fall inside or outside the ...
4
votes
3answers
15k 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 ...
4
votes
3answers
6k views

How can I calculate the distances between my points in sequence automatically?

I am trying to measure distances between points and writing the calculated measure between these points in the attribute table. The points represents a vehicle's location based on GPS data according ...
4
votes
2answers
4k views

Postgis, get the points that are x meters near another point, in meters

I'm trying to find the points within a certain distance, in meters, from another point. I'm using the function ST_Buffer, but I don't get how to express the distance in meters. I'm trying with ...
4
votes
4answers
1k 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 ...
4
votes
1answer
10k views

Check if point is within radius of another point with Shapely

I've successfully used Shapely with python to check if a point is within one of a set of polygons in a .shp file but now would like to check if a point is within a circle of radius x miles from ...
4
votes
2answers
8k views

Calculate distance in kilometers between two points

I have a few questions regarding the calculation of the distance between 2 postal codes. Take a look at the following code. ### # load the different packages we need ### require("rgdal") require("...
4
votes
1answer
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?
4
votes
4answers
5k views

Using a list of geographic locations, and determining the X closest locations to a user-defined location

I've got a list of geographical locations in an Excel spreadsheet. I want users to be able to search for a user-defined location, and then have the X number of closest locations from the list pulled ...