Skip to main content
9 events
when toggle format what by license comment
May 9, 2012 at 15:14 comment added GodinA Yes, I would like to only get my subarea0 with the depth contour for this define area: gis.stackexchange.com/questions/25112/…
May 9, 2012 at 13:37 comment added Simbamangu What do you want to end up with? Contours (SpatialLines) that overlap with your subarea0? You might want to start a new question as this is now going beyond the original.
May 9, 2012 at 13:15 vote accept GodinA
May 9, 2012 at 13:14 comment added GodinA Great, yes R can be fantastic! Thanks @Simbamangu, this works! However, I would like to only plot my Spatialpolygons with my depth contour. Maybe create a SpatialPolygonsDataframe? Using intersect, I get the info for the whole square encompassing my Spatialpolygons. I need to somehow combine my Spatialpolygons with my depth contour, but not sure how do to so. This is why I thought that the function 'extract' was a good start, but I end up with a list of depth that I am not sure how I can rebind with my spatialPolygons... Any ideas? Thanks again!
May 9, 2012 at 12:44 comment added Simbamangu Yes, looked at the output from the bathymetry data and a Tanzania polygon and I see the same effect. See my update above. For contours, it's as easy as cont <- contour(r3) then lines(cont) Isn't R great?
May 9, 2012 at 12:41 history edited Simbamangu CC BY-SA 3.0
Updated after OP comment
May 9, 2012 at 12:10 comment added GodinA Thank you @Simbamangu, I tried the "intersect" command, however when I plot the subarea0_bathy and my spatialpolygon (subarea0), they do not overlap completely, why? To answer your previous question, yes I would like to eventually also have my bathymetry contour. Any suggestions?
May 9, 2012 at 7:49 history edited Simbamangu CC BY-SA 3.0
deleted 12 characters in body
May 9, 2012 at 7:10 history answered Simbamangu CC BY-SA 3.0