Tag Info

Hot answers tagged

6

The following is a rough outline of what you might do. I won't include a great deal of detail, you can research further using these terms and/or ask new more specific questions. Note: you will need to careful of coordinate systems. Firstly that they are the same for your datasets, and second that they use metric (metres) horizontal units (not actually ...


3

There's probably several methods to achieve this but I will just mention a couple. The first requires several steps. I've created a couple of simple layers with a point layer (1 feature) and a polygon layer (3 features): Use the Polygons to lines tool, I just seach the Processing Toolbox and use all tools from there: Then use Convert lines to points ...


2

With Fiona and shapely (in pure Python, no need of ArcPy or PyQGIS) from shapely import shape import fiona # reading the 2 shapefiles feat1 = list(fiona.open('point1.shp')) # list of dictionaries feat2 = list(fiona.open('point2.shp')) # find the linear distance between points that are paired by their site_code attribute data pairs = zip(feat1,feat2) print ...


2

ArcGIS GUI solution: Merge all points into one file Run Points to Line tool, using site_code as Line Field. If you save it to a geodatabase, SHAPE_LENGTH will be the distance of the line. Otherwise, calculate the length of the line yourself. ArcGIS (10.1+) field calculator solution: This matches points with the same 'site_code' between two files. ...


1

Implemented for Javascript: var r = 100/111300 // = 100 meters , y0 = original_lat , x0 = original_lng , u = Math.random() , v = Math.random() , w = r * Math.sqrt(u) , t = 2 * Math.PI * v , x = w * Math.cos(t) , y1 = w * Math.sin(t) , x1 = x / Math.cos(y0) newY = y0 + y1 newX = x0 + x1


1

You quote I want the distance that every point has from the coastline In fact if i got you "Generate Near Table" tool will work for you if you have Advance License (e.g. compare distance) but both point and line feature layers to be projected on the projected coordinate system beforehand. My clarification is as below..


1

The approach to this that I would use is to: Convert the vertices of your line to points using Feature Vertices To Point Calculate distances to those points from your original point using Point Distance Both tools require an Advanced level license but, if you do not have that, then searching this site may be able to uncover workarounds that create the ...


1

Have you looked at the Near tool? If I understand the question correctly, it seems like that might be the solution to your problem.


1

It looks fine and the distance is always measured in the units the SRID used defines. For 4326 that would be in angular units. Unless you use geographies like you found out, that is. Read more in the official docs here. Why 100 km is needed for Chicago is up to you and your data. It doesn't sound that much for a huge city and in fact if I check Wikipedia, ...


1

If you want to get the distance between two sets of lat/lon, 4326, points, then you can use ST_Distance_Sphere or for more accuracy, ST_Distance_Spheroid. If your fence table is in 900913, then use, ST_Transform to convert, so that both sets of points are in a common SRID. SELECT ST_Distance_Sphere( (select ST_Transform("Fence", 4326) FROM ...



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