New answers tagged point-in-polygon
Here is an example using a SpatialGrid object: ### read shapefile library("rgdal") shp <- readOGR("nybb_13a", "nybb") proj4string(shp) # units us-ft #  "+proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 # +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +datum=NAD83 # +units=us-ft +no_defs +ellps=GRS80 +towgs84=0,0,0" ### define ...
Have you looked at the R raster package? It has tools to convert to/from vector GIS objects so you should be able to a) create a raster (grid) with 200x200m cells and b) convert it to a set of polygons with a logical id of some kind. From there I would look at the sp package to help with intersecting the points and the polygon grid. This ...
The "GIS universe" is complex and have many standards that your data must be compliant. All "GIS tools" interoperates by GIS-standards. All "serious GIS data" today (2014) are stored in a database. The best way to "use R" in a GIS context, with other FOSS tools, is embedded into SQL. The best tools are PostgreSQL 9.X (see PL/R) and PostGIS. You answer: ...
As you already have specified into your question, the coordinates must be expressed following the "latlng" order, therefore I suggest you to store the data in your table in the proper oder (the longitude first and the latitude second). Using this logic, your second statement must be reformulated as below: SELECT * FROM Entries WHERE ST_Within( ...
you can do a spatial join between your points and your districts: vector > data management tool > join attribute by location. There is a detailed tutorial on this page
Here I found my question! I found the way to fix my problem, so this question is answered! (Vector -> ResearchTools -> Random Points)
Top 50 recent answers are included