[R-sig-Geo] PolySet2SpatialPolygons: ring not closed

Andrew Niccolai andrew.niccolai at yale.edu
Thu Apr 10 16:28:38 CEST 2008


Sorry, I have never run into this issue but maybe Roger can weigh in on this
as he was the source "coder" for these functions.  Did you try including the
close_polys=TRUE line in PolySet2SpatialPolygons?  It more than likely
defaults to TRUE but it might be worth a shot to see.

Andrew 

-----Original Message-----
From: Agustin Lobo [mailto:aloboaleu at gmail.com] On Behalf Of Agustin Lobo
Sent: Thursday, April 10, 2008 10:21 AM
To: Andrew Niccolai; r-sig-geo at stat.math.ethz.ch
Subject: PolySet2SpatialPolygons: ring not closed

I do:

 > a <- (joinPolys(SpatialPolygons2PolySet(x), 		 
SpatialPolygons2PolySet(absUTMpolysHABS2)))
 > str(a,max.level=2)
Classes 'PolySet' and 'data.frame':     506 obs. of  5 variables:
  $ PID: int  5 5 5 5 5 5 5 5 5 5 ...
  $ SID: int  1 1 1 1 1 1 1 1 1 1 ...
  $ POS: int  1 2 3 4 5 6 7 8 9 10 ...
  $ X  : num  418438 418452 418452 418452 418451 ...
  $ Y  : num  4591484 4591478 4591477 4591477 4591476 ...
  - attr(*, "projection")= chr "UTM"
  - attr(*, "zone")= int 31

 > ab <- PolySet2SpatialPolygons(a)
Error in validityMethod(object) : ring not closed

any way to clarify this error? plotMap(a) seems correct.

Thanks

Agus

-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster




More information about the R-sig-Geo mailing list