[R-sig-Geo] Re-shape shapefile using another shapefile?
Julian Burgos
julian at hafro.is
Fri Jul 20 10:48:39 CEST 2012
Hi Zak,
One option is to use the package "rgeos". The you can use the
"gIntersection" function to find the intersection between both polygons
and keep only the parts of the S2 polygon that are included within the
S1 polygon.
Julian
--
Julian Mariano Burgos, PhD
Hafrannsóknastofnunin/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax: +354-5752001
Netfang/Email: julian at hafro.is
On fös 20.júl 2012 08:19, zhongkui wrote:
> Dear List,
>
> I would like give a example to clearly describe (hopefully) my question. I
> have two shapefiles with class of "SpatialPolygonsDataFrame", for example:
>
> Shapefile1 (S1): Australian boundary (land area only)
> Shapefile2 (S2): Australian land use type boundary
>
> S2 includes land area and coastal waters, this means both water and land
> could be included in one polygon of S2. But I am only interested in the land
> area. So, my questions is:
>
> Can S1 be used to re-shape S1 and get a revised S2? And how? Or other
> solutions?
>
> Thanks very much for your help.
>
> Regards,
>
> Zak
>
>
>
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Re-shape-shapefile-using-another-shapefile-tp7580554.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
More information about the R-sig-Geo
mailing list