Tag Info

New answers tagged

1

SELECT ST_X(pts.geom) as lon, ST_Y(pts.geom) as lat, poly.attribute FROM points pts, polygons poly WHERE ST_Intersects(poly.geom, pts.geom); where it is assumed that the attribute you want from the polgons table is called attribute. For non-trivial table sizes, you will want a spatial index on the geometry columns of polygons/points tables.


1

Select points.*, polygons.* from points inner join polygons on st_intersects(points.geom,polygons.geom);


1

You could use a spatial database (like PostGIS). First, you put all your addresses in a table "addresses" with a column "Point" of type Point and a column "Address". CREATE TABLE addresses (Point Point, Address Varchar(50)); Then you put your polygon in another table, let's call it "poly". It can have a column "Polygon" of type Polygon and another column ...


0

In Postgis you can accomplish this by using the ST_MakeLine function. There is even an example there of this exact problem, building a line from GPS tracks. In your case, you will want to also include the ST_Intersects function, so that you only use those points that are inside you red box (aoi). SELECT gps.gps_track, ST_MakeLine(gps.geom ORDER BY ...


0

Per this left joins are not supported in GiST indices. May I recommend: SELECT grid.gid, SUM(CASE WHEN st_contains(grid.geom,kioskdhd3.geom) THEN 1 ELSE 0 END) AS total FROM grid, kioskdhd3 GROUP BY grid.gid;


1

First of all, never use the regular cursors when you can use the data access (da) cursors introduced at 10.1. They are 10 times faster at least. Second, the Spatial Join can do the linking of polygon attributes to points faster than any series of multiple queries. A single Spatial Join and a da search cursor read into a dictionary and then transfer of the ...


1

I would do this using the much faster (than ArcPy) geoprocessing tool Intersect (Analysis) which: Computes a geometric intersection of the input features. Features or portions of features which overlap in all layers and/or feature classes will be written to the output feature class. Use your point and polygon features as the in_features and you ...



Top 50 recent answers are included