Tag Info

Hot answers tagged

5

The aproach with cross-join doesn't use indexes and requires a lot of memory. So you basically have two choices. Pre 9.3 you'd use a correlated subquery. 9.3+ you can use a LATERAL JOIN. KNN GIST with a Lateral twist Coming soon to a database near you (exact queries to follow soon)


5

You are nearly there. There is a little trick which is to use Postgres's distinct operator, which will return the first match of each combination -- as you are ordering by ST_Distance, effectively it will return the closest point from each senal to each port. SELECT DISTINCT ON (senal.id) senal.id, port.id, ST_Distance(port."GEOMETRY", senal."GEOMETRY") ...


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

its not possible to get control over pan behavior in the JSAPI directly, but Ryan Mordoff wrote a really cool plugin and shared it on Github. i think most people are using it to increase the default multiplier, but you could also use it to achieve the inverse. see this thread for more info.


1

It is possible, but you may run against usage limits: Users of the free API: 100 elements per query. 100 elements per 10 seconds. 2‚ÄČ500 elements per 24 hour period. Read more at: https://developers.google.com/maps/documentation/distancematrix/#Limits



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