# Tagged Questions

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

236 views

### Calculating closest distances in meters/kilometers given lat/long coordinates?

I am using ArcGIS 10.2 for Desktop. I have a shape file containing points worldwide with lat and long, and another world map polygon file whose Geographic Coordinate System is GCS_WGS_1984 and Datum ...
33 views

### nr of cells between cells

I want to do the following: I have a set of cells with the value 1, and a set of values with 2. I want to calculate for each cell [2] the distance - ideally number of cells - to the nearest cell 1. ...
191 views

### How to do point-to-point near analysis conditional on common attributes of the two layers in Arcgis 10.2 (advanced)

I am measuring the closest straight distance from cities of interest (in a layer) to their capital cities (in another layer). Basically, distance between a city and a capital city is calculated if ...
358 views

### Cost-Distance Tool not producing logical answer

I am working on creating a cost catchment based on Tobler's equation in ArcGIS10.1. I feel confident in my cost surface; it produces a raster where each cell equals the time in hours that it would ...
1k views

### How to determine Distance between points using ArcGIS for Desktop?

I am trying to figure out the distance between points based on 1000+ points using ArcMap 10.2. I have transit stops and am trying to figure out how far from stop 1 to stop 2, stop 2 to stop 3, stop ...
50 views

### How to determine distances of points from closest line? (Mapinfo or QGIS) [duplicate]

I have a set of points and a set of lines. I'd like to know distances of the points from the closest line... answering the question "how many points are within 500m to 1000m of one of the lines, how ...
1k views

### Find closest feature

How can I find the closest feature(coordinates) in a json file from a set lat lon using openlayers. Currently, I get the centroid point(lat,lon) from the selected polygon feature ok, but I Would also ...
4k views

### Calculating distance scale factor by latitude for Mercator

This was really inconvenient topic to google out - so I'm asking for clarification, did I understood things correctly. I'm talking about measuring short distances in Mercator projection (3857). You ...
216 views

### calculate distance between points crossing the antimeridian

How can I calculate the distance between two points (lon/lat) if any of the points exceeds the antimeridian (+-180 longitude)? Im using the distVincentyEllipsoid {geosphere} to calculate the shortest ...
743 views

### Measure average distance between two lines with common endpoints

I have two shapefiles, each with a set of lines generated from start and end points. One shapefile has the straight lines generated from the XY To Line tool, while the other has lines generated from a ...
2k views

### How to convert distance into latitude + longitude [duplicate]

I have start point (latitude) I know direction, lets say strictly north, and I want to calculate latitude which is 100 meters above the start point. The same for longitude. I believe there should be ...
234 views

### Calculating distance between borders when one polygon inside another polygon?

I am brand new to ArcGIS and having some trouble. I would like to calculate the distances between the border of one polygon to another polygon. However, these polygons overlap. Thus when I use the ...
1k views

### Toblers's Hiking Equation and Slope Dilemma

I'm trying to use Toblers's Hiking equation to determine economical backgrounds of some hillforts. The equation is anisotropic which means that the speed of movement that it calculates differs whether ...
480 views

### ArcGIS spatial join - WITHIN A DISTANCE including distance

I am applying a spatial join in ArcGIS between points (target features) and lines (join features). I want to have a 1-to-many join, so I use the match option 'within a distance'. So far so good. The ...
785 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 ...
98 views

### coordinate pairs distances

I am new to GIS and have the following question. My shapefile has several coordinate pairs (x1, y1, x2, y2) and I would like to calculate the distances between the points within one go. Any ...
457 views

### Calculating distance between coordinates [duplicate]

I would like to calculate the distances between a list of coordinates (classic GPS coord.). From coordinate A to B from B to C from C to D and so on, and so forth. Is there any program, or website, ...
65 views

### Find Distance within each Raster contiguous cell block

I was asked to find for each Individual Contiguous Forest Block the distances INSIDE of each where it would be the farthest (aka the most isolated) from each forest cell block's respective edges. I ...
13k views

### Excel Distance Calculation

Is there a way (preferably in Excel) to calculate the distance (based on lat, lon) between two lists of points? My end goal would be, for example, to have a list of Starbucks and a list of McDonald's, ...
294 views

### Cut polylines at intersections in QGIS (or how many km road for each country)

I want to measure how many km a road stand on each country it intersect (i.e. how many km of the european road "E45" stand on Italy, Austria, Germany, and so on). I have a polyline-shapefile with the ...
137 views

### Is there any GRASS command to measure the distance between a point in rastermap and another in vector map?

I have a question about WinGRASS 6.4.3. Is there any GRASS script　command to measure the distance between a point in rastermap and another in vector map? I have a raster map and a vector map. Raster ...
218 views

### Adding Distance (KM and Miles) to a Map using ArcGIS 10.1

Using ArcGIS 10.1, how do you add and show the distance in mile / km markings alongside the marked trails(KM and miles) while using the aforementioned 10.1?
928 views

### Draw line between points from multiple datasets

I have 2 point datasets and want a tool or script to draw a line between all points in one dataset to all the points in the 2nd dataset. Is it possible? I have tried ESRI "Point Distance" and "...
147 views

### Distance calculation PostGIS

I've got the following task to solve: I've got two tables; one contains buildings (houses) as points and the other contains train-stations (at_bhf_classified) as points. I need to find out the ...
409 views

### How to calculate distances between several points along network?

I have several points (bicycle share hubs), and I want to calculate the distance between each of them using a network. I want a CSV/XLS that has three headers: hub_id1, hub_id2, distance. I've ...
605 views

### Haversine formula to calculate distance between real coordinates?

I need to calculate distance between two stations in a map in order to calculate empirical variogram in ordinary kriging to interpolate temperature data. Calculating distance in kriging using ...
611 views

### Calculate distances between polygon centres in QGIS

Is there a practical way to calculate distances between polygon centroids in QGIS? I have a UK city region map divided into administrative units (1 ward = 1 polygon). I want to represent their ...
741 views

### How to select polygons by distance to a single polygon in another layer?

I have a shapefile A with a group of polygons, lakes. Now I want to select the polygons(lakes) that are within a specific distance to a polygon in a second shapefile, B, with the polygon a city. In ...
133 views

### Distance from one point to many polygons

I'm using ArcMap 10.1 and have a shape file of polygons of municipalities. I also have the coordinates of the centroids of the polygons (if I need to use them). I want a column in my attributes table ...
1k views

### clustering points in postgresql to create contour map

UPDATE: To try to make this a little more simple, is it possible to create a query which selects a group of points such that each point in the group is at most X units away from at least one other ...
58 views

### Average Proximity Metric

I'm looking for a metric that gets at average distance to a given feature. For example, for a point in the water, how far, on average, is the land or to what extent is the point surrounded by land. ...
149 views

### R: distance from one point to many polygons

OK so I have a spatial polygons data frame, and I have a point of interest. I want to add a row to the SPDF that contains the distance from the centroid of each polygon to this given point. How do I ...
91 views

### ArcGIS 10.1 Cost Distance Calculations

I have a study area that is a polygon feature class, and am running the Cost Distance Tool on it in ModelBuilder. However, everytime I run the tool, it only calculates a cost distance and cost ...
5k views

### What's the difference between vincenty and great circle distance calculations?

Python's geopy package features two distance measurements techniques: Great Circle and Vincenty's formulae. >>> from geopy.distance import great_circle >>> from geopy.distance ...
146 views

### Distance-direction computation of lines with exactly/more than two nodes?

A distance and direction tutorial provided as an Answer at How to add Direction and Distance to attribute table? uses: xat (0 ), xat (-1 ) and yat (0 ), yat (-1) for start and end points of lines; ...
847 views

### How to approximate point to segment distance on sphere?

I would like to approximate the distance of a line segment from a reference point on the map (coordinates are gives as lat/lon). In the Cartesian coordinate system I would simply find the closest ...
381 views

### GeoDjango: read geometry column in geography field

I have a Django application that needs to work with an existent PostGIS database, apart from its own database. I've configured multidatabase support, created a database router, created models for the ...
2k views

### calculate {minimal} distance between polygons in R

I have calculated the surface area of species distributions (merging polygons from shapefiles), but since this area can be comprised of quite distanced polygons, I would like to calculate some measure ...
39 views

### Determine when a route enters and leaves a polygon

I have all of the segments of a route from White Horse, YK to Miami, FL. Now I want to determine how many miles I travel in each State / Province. I have Polygons for each State and have been able ...
408 views

### using PostGIS to calculate distance of a route over a large area

I'm new to PostGIS and looking to measure the distance of the Pacific Crest Trail which spans western North America from Canada to Mexico. I have a data set containing the lat lon and dates from GPX ...
3k 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 ...
1k views

### Calculate distance of points along a route QGIS

I have a line layer and a point layer, I need the distance between the first and the last point measured along the line. How can I do that using QGIS? Do I need to know linear reference? I don't ...
2k views

### How to calculate driving distance/time between two points

I am doing some analysis for our fire rescue department where we are comparing actual response times to fires vs predicted response times. The actual response time analysis is straight forward as I ...
2k views

### ArcGIS giving measured distances and the scalebar incorrectly

I am currently using ArcGIS 10.1 and am struggling to be able to measure distance or set a scale bar correctly. Its currently giving me absurd results orders of magnitudes to small (0.5m etc). All my ...
1k views

### Creating Random Points in ArcGIS 10.1

I would like to create random points across my study area (which is a DEM raster) using the Feature Class> Create Random Points. However, I need to select/copy/move/delete these points and re-arrange ...
252 views

### Calculating distances between boundaries of polygons with Python

I have two sets of shape-files which have to be worked on within a Python Script. Those two Shape Files might differ from each other (same thematic content, but 2 different epochs). If there occurred ...
2k views

### What is difference between ST_DWithin and ST_Distance for proximity search in PostGIS?

I have records stored in a table with latitude/longitude coordinates stored in a geometry field. I want to find all records nearby a user supplied reference point. Note "nearby" probably means less ...
4k 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("...