Tagged Questions
1
vote
4answers
166 views
Counting road intersections and blocks
I have a shp file that consists of the road system of Mexico City. I would like to count the number of road intersections (crossings) and blocks (which I would define as a segment starting from one ...
2
votes
1answer
114 views
R: How can I create a polygon from several polygons and a line?
I have some spatial objects that I want to combine, namely three polygons and a line. The ultimate goal is to create a polygon that I can overlay on an area of a map of administrative divisions of the ...
2
votes
1answer
58 views
Remove intersect of one polygon from another in R
I am trying to remove the intersect from Poly2 onto Poly1. Below are the coords of the 2 polygons.
> coords1
[,1] [,2]
[1,] 992.0161 7462.531
[2,] 950.1962 7413.532
[3,] 902.3632 ...
2
votes
1answer
96 views
Tearing in ggmap (R) after using spTransform and random point generation using splancs
I am using R and the package ggmap to try and generate some random points within the city limits of Chapel Hill, NC. I have downloaded the shapefile for the town of Chapel Hill from the Orange County ...
6
votes
3answers
567 views
How best to fix a non-noded intersection problem in PostGIS?
I'm using a PL/R function and PostGIS to generate voronoi polygons around a set of points. The function that I am using is defined here. When I use this function on a particular dataset I get the ...
1
vote
0answers
170 views
How to clip the contour map with the polygon using R software?
Hi I am wondering how can I create the contour lines from the discrete x, y and z dataset and then add the shapefile to cut the contour lines by polygon.
I want to clip the contour map by the shape ...
4
votes
1answer
962 views
How do I change the polygon fill color and border color for SpatialPolygons objects?
I have SpatialPolygons or SpatialPolygonsDataFrames which I'd like to plot. How do I change the color using the three plotting systems in R (base graphics, lattice graphics, and ggplot2)?
Example ...
4
votes
1answer
198 views
Iterate features on SpatialPolygonsDataFrame in R
I have a SpatialPolygonsDataFrame object. Is there way to use apply on this object rather than using a for loop to iterate features in this object?
3
votes
0answers
126 views
Rgeos drops associated values when intersecting polygons
I am trying to intersect two SpatialPolygonsDataFrames and get a SpatialPolygonsDataFrame as the result. Unfortunately, using the gIntersection function from rgeos (which works impressively quickly ...
5
votes
2answers
317 views
Proper way to rbind SpatialPolygonsDataFrames with identical polygon IDs?
What's the proper R idiom for rbinding SPDFs together when the IDs overlap? Note that here (as is often the case) the IDs are basically meaningless so it's pretty annoying that I can't just make ...
9
votes
5answers
2k views
Get Raster Values from a Polygon Overlay in Opensource GIS Solutions
I have two layers. A polygon-shape-layer with many tiles and a raster-layer containing CORINE 2006 land cover with many categories in a colourmap.
I want to obtain for each polygon in the shapelayer a ...
2
votes
1answer
477 views
Conversion of raster features to polylines: skeletonization?
I would like to identify linear features, such as roads and rivers, on raster maps and convert them to a linear vector features (i.e. polylines). I typically use R as my primary GIS, and have posed ...
1
vote
1answer
804 views
merging 2 polygon adjacent to each other using R
I have several shp files which are the components (or tiles) of a map, I have joint all these tiles together to have a large shp file. Then I realized some of the polygon is now splitted into 2 ...
7
votes
1answer
1k views
Instantiating spatial polygon without using a shape file in R
So, the usual way we read a shapefile in R is via the maptools package, like this:
sfdata <- readShapeSpatial("/path/to/my/shapefile.shp", proj4string=CRS("+proj=longlat"))
However, I have a use ...
