[R-sig-Geo] wkbMultiPoint and rgdal

Roger Bivand Roger.Bivand at nhh.no
Fri Jul 29 09:57:13 CEST 2011

On Thu, 28 Jul 2011, Jonathan Greenberg wrote:

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


Not really, as this is the first time I can recall it being mentioned in 8 
years. It is far from obvious what one could do with it that couldn't more 
properly be done with a SpatialPointsDataFrame with a grouping factor. 
What is the implied support of the data? What are the attributes attached 
to - say var1 was observed at which of the member points? All of them 
simultaneously? If they form a line or polygon, then support is clear(er), 
but if a multipoint observation is better handled as described above, then 
it should be. Support is absolutely crucial for clarity in analysis (and 
visualization), I think.


PS: this is a similar case to that of the unusual M coordinate in some 
shapefiles - if it cannot be shown how this relates consistently to 
support, it shouldn't be admitted, I think. If we lose clear understanding 
of support for observation attributes, we cease to be able to interact 
with statisticians, and that interaction really matters.

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

Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no

More information about the R-sig-Geo mailing list