Tag Info

Hot answers tagged

6

Do a spatial join! First, set up your data frame in a projected coordinate system of your choice (whatever units you want your distances to show up in). So, say you're working in State Plane Feet, make sure all your layers are in State Plane Feet, so if they're not project them into it. From there, Right click on the points layer and click Joins & ...


6

I am answering my own question with a proposed query. select *, ABS(x_permit-x_station)+ABS(y_permit-y_station) as manhattan FROM (SELECT longname AS NAME, lines AS metadata, T .slug, ST_Distance ( T .geom, ST_Transform (P .geometry, 3435) ) AS distance, ST_X(ST_Transform(p.geometry, 3435)) as x_permit, ST_Y(ST_Transform(p.geometry, 3435)) as ...


4

Taking into account Andre's comment, and for the sake of learning I modified another user's answer to create a 3D Line from your sample data. I hope you or someone else might find it useful: X,Y,Z,pt_dt 2970969.635,359725.0088,83.4242,1-x 2970968.278,359722.2182,83.2591,1-x 2970941.771,359670.127,83.0655,1-x 2970961.369,359708.6424,83.4785,1-x ...


4

There actually is no difference between the two functions, which both yield 1.195 km. The problem is that in your question the axis order is flipped for trajectory, so you are seeing different answers than you expect. SELECT ST_AsLatLonText(point_a) AS point_a_latlon, ST_AsLatLonText(point_b) AS point_b_latlon, ST_Distance_Spheroid(point_a, point_b, ...


3

your coordinates are probably in lat/long with degrees as a unit. therefore, along meridians or near the equator, one degree is approximately 111km (circumference/360). note that this will change depending on the distance to the equator. A good practice is to use a local projected coordinate system that is appropriate for your location in order to have a ...


2

ST_Distance (folowing the documentation) - For geometry type Returns the 2-dimensional cartesian minimum distance (based on spatial ref) between two geometries in projected units. For geography type defaults to return spheroidal minimum distance between two geographies in meters. So - if you'll feed it with geometry,4326 you'll get distance in units of 4326 ...


1

The first source you mention remarks: All these formulæ are for calculations on the basis of a spherical earth (ignoring ellipsoidal effects) so you should not rely on the results. If you use the openlayers plugin, project CRS should be set to EPSG:3857. As Erica points out, that is not suitable for measurements. For measuring, delete the ...


1

If you work with effective distances (along roads), you need some network analyst and iteratively select each school and the students from those schools (with Python or model builder) If you work with bird flight distance, as an alternative to the method proposed by Vince, you could compute the XY coordinates of your schools and of your students, then you ...


1

Euclidean Distance and Zonal Statistics (As Table) will tell you the average distance to the closest point for each polygon. It's worth considering that Euclidean distance is not walking distance. Walking routes are restricted: a person can't (reasonably) walk over a building, an interstate highway, a river/stream, etc. A more accurate method would be to ...


1

for the average walking distance to the closest point, you can indeed use the Euclidian distance to create a raster of the distance to the closest point. Then you can compute the average distance using zonal statistics (or zonal statistics as a table if you prefer a vector output)


1

If you have the Spatial Analyst extension, it sounds like you may be able to make use of the Path Distance tool. You will need an elevation raster to serve as input. The tool will output a raster with a value in each cell that represents the shortest distance to one of your points from that cell, taking the topography into account in its calculations. Of ...


1

Do it in PHP language: //assuming elevation = 0 $earthR = 6371; // in km ( = 3959 in miles) $LatA = 37.418436; $LonA = -121.963477; $DistA = 0.265710701754; $LatB = 37.417243; $LonB = -121.961889; $DistB = 0.234592423446; $LatC = 37.418692; $LonC = -121.960194; $DistC = 0.0548954278262; /* #using authalic sphere #if using an ellipsoid this step is ...



Only top voted, non community-wiki answers of a minimum length are eligible