[R-sig-Geo] wkbMultiPoint and rgdal

Dylan Beaudette dylan.beaudette at gmail.com
Tue Jul 26 23:28:42 CEST 2011


Hi Jonathan,

My tool of choice for this operation is PostGIS. If you happen to have
a postgis db ready to go, simply import your problem file using the
postgis shapefile import tool and process there. Some tips here:

http://amercader.net/blog/2011/04/exploding-multigeometries-with-postgis

Cheers,
Dylan

On Tue, Jul 26, 2011 at 2:13 PM, Jonathan Greenberg
<greenberg at ucdavis.edu> wrote:
> R-sig-geo'ers:
>
> I have an ESRI shapefile which has multi-point geometry, and I'm
> trying to get it into R for use with sp() and raster().  Using:
>
> points=readOGR(dsn=getwd(),layer="tnf_sub_2_TreeDig_pts_110725_v02")
> returns:
>
> Error in readOGR(dsn = getwd(), layer = "tnf_sub_2_TreeDig_pts_110725_v02",  :
>  Incompatible geometry: 4
> In addition: There were 50 or more warnings (use warnings() to see the first 50)
>
> the warnings all say:
> ...
> 50: In readOGR(dsn = getwd(), layer = "tnf_sub_2_TreeDig_pts_110725_v02",  ... :
>  eType not chosen
>
> What I really want is to, in the end, have a SpatialPointsDataFrame
> where each multi-point feature is converted to individual points that
> have the attribute of what multi-point feature it came from.  What is
> the best way to do this?  I'm attaching the zipped shapefile to this
> email (hopefully it won't get bounced).
>
> --j
>
> --
> Jonathan A. Greenberg, PhD
> Assistant Project Scientist
> Center for Spatial Technologies and Remote Sensing (CSTARS)
> Department of Land, Air and Water Resources
> University of California, Davis
> One Shields Avenue
> Davis, CA 95616
> Phone: 415-763-5476
> AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307
>
> _______________________________________________
> 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