New answers tagged point-in-polygon
Here's an arcpy solution. Run it within the ArcMap Python window. You need to change the three variables at the top (counties, hospitals, and field) to match your data. The output is an in-memory copy of the counties layer called Counties_output with all the fields from the hospital layer joined to it for the maximum value. If there are multiple occurrences ...
Note: Edited answer based on additional info provided by OP Try the following: 1) Combine the county and hospitals datasets, either via a spatial join or with identify (I personally prefer identify so I have a new layer to work with, but either should work). This should give you a single point dataset with all your hospital info, but with the addition of ...
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.
Select points.*, polygons.* from points inner join polygons on st_intersects(points.geom,polygons.geom);
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 ...
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 ...
Top 50 recent answers are included