[R-sig-Geo] wkbMultiPoint and rgdal

Jonathan Greenberg greenberg at ucdavis.edu
Thu Jul 28 21:57:54 CEST 2011


Hi Dylan:

Thanks -- I'm a bit of a PostGIS noob so I ended converting it to a
normal point file with the XTools extension in Arc.  I'm surprised
there is no support for this data type in any R package, since I would
think it is a fairly common type.  Ah well!

--j

On Tue, Jul 26, 2011 at 2:28 PM, Dylan Beaudette
<dylan.beaudette at gmail.com> wrote:
> 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
>>
>>
>



-- 
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



More information about the R-sig-Geo mailing list