New answers tagged distance
First, if you haven't already, you need to transform your data from x/y coordinates into a readable vector shapefile. Do this by clicking "Add Delimited Text Layer" for each. Select file format as CSV, where X field is Longitude and Y field is Latitude, then click OK. Ensure your projection in the project properties is compatible (Project Properties - enable ...
If you are working with GRASS, then you can use the module v.distance. When you import the 2kmX2km grid into grass, it automatically creates centroids for each grid cell (that's how the vector design in GRASS works). So you would first add a column in the grids table to hold the distance value, then run v.distance to update that column: (Assuming two GRASS ...
If you need to use the road distance as the cost of travel, then you would indeed need to use Network Analyst if you are using ArcGIS and want to take advantage of the restrictions imposed on the roads in the network dataset (one-way, turns, etc.). The solver you would need for this is OD Cost Matrix. You basically need to generate a matrix where each point ...
100% agree with @Fetzer, this is LR task, can be bulky though. Try this field calculator expression to find X of new point. def getXY (point, id, d2add): mxd = arcpy.mapping.MapDocument("CURRENT") lyr=arcpy.mapping.ListLayers(mxd,"LINES") q='"ITEMID"=%s%s%s' %(r"'",id,"'") with arcpy.da.SearchCursor(lyr,"Shape@",q) as cursor: for row in ...
Within the the Generate Near Table (Analysis) tool select GEODESIC as your method. This finds the shortest line along the ellipsoid surface of the earth rather than the planar surface of a projection. This is appropriate when working with large areas like the entire continental US. ArcGIS Resource and Image Source
If you are generally interested in projecting data and make it look accurate and measurable through a ruler, you are suggested to you an equidistance projection. Your projection there works just fine. But if you want to use WGS web Mercator, you can need to calculate the geodesic distance to get the actual distance within a equidistance projection.
I think you need both coordinates to calculate the distance. For one coordinate further need to know the angle\azimuth.
Assuming you are using geography type which I am guessing from geog name, query to find all census blocks within 1609 meters ~ 1 mile) of parcel denoted by key '12345'. SELECT census_blocks.* FROM census_blocks INNER JOIN parcels ON ST_DWithin(census_blocks.geog, parcels.geog, 1609) WHERE parcels.parcel_id = '12345';
In Python # Testing simlation of generating random points from __future__ import division import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import host_subplot import mpl_toolkits.axisartist as AA def create_random_point(x0,y0,distance): """ Utility method for simulation of the points """ r = ...
I can't help you with a recursive query. Instead you can use two window functions. In the inner query dist the distance between two neighbour points are calculated. In the inner query sum the total distance from point A to a the actual point is calculated. The last step is to filter out points with a distance over 1km. The query: select * from ( ...
Top 50 recent answers are included