<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Agustin,<br>
<br>
I didn't look at the cross overs, but spplot inside a loop needs an
explicit print(spplot(...)) around it to get the result printed
(actually plotted); this is a lattice FAQ, spplot wraps xyplot or
levelplot in lattice.<br>
--<br>
Edzer<br>
<br>
Agustin Lobo wrote:<br>
<blockquote type="cite" cite="mid468D1953.3090508@ija.csic.es">Dear
rsiggeos,
<br>
<br>
After importing an shp file with rgdal using
<br>
refG <-
<br>
readOGR("C:/ALOBO/dipu2006/espaisoberts_P037/GARRAF/GFO_EOA_TOTS_v4",layer="GFO_EOA_Acti_v4")
<br>
<br>
(I can send the shp file upon request)
<br>
<br>
I do
<br>
<br>
l2 <- as(as(refG, "SpatialPolygons"), "owin")
<br>
<br>
and get a report of problems that I summarize here:
<br>
<br>
Polygon 240 contains duplicated vertices
<br>
Polygon 240 is self-intersecting
<br>
Polygon 352 contains duplicated vertices
<br>
Polygon 352 is self-intersecting
<br>
Polygons 240 and 352 contain duplicated vertices
<br>
Polygons 240 and 352 are self-intersecting
<br>
Polygons 4 and 264 cross over
<br>
Polygons 4 and 334 cross over
<br>
Polygons 57 and 104 cross over
<br>
Polygons 141 and 142 cross over
<br>
Polygons 168 and 218 cross over
<br>
Polygons 174 and 177 cross over
<br>
Polygons 220 and 240 cross over
<br>
Polygons 224 and 229 cross over
<br>
Polygons 224 and 235 cross over
<br>
Polygons 225 and 240 cross over
<br>
Polygons 266 and 271 cross over
<br>
Polygons 274 and 277 cross over
<br>
Polygons 291 and 304 cross over
<br>
Polygons 325 and 334 cross over
<br>
Polygons 330 and 334 cross over
<br>
Polygons 341 and 361 cross over
<br>
Polygons 352 and 367 cross over
<br>
Polygons 352 and 387 cross over
<br>
Polygons 388 and 390 cross over
<br>
<br>
I've checked the cross overs, and the reported polygons
<br>
do not seem to have cross-overs at all. For an example,
<br>
just look at the attached file crov_352_387.jpg, plotted as
<br>
<br>
spplot(refG[c(352,387),],zcol="OBJECTID")
<br>
<br>
There are many like this: I've put all the polygons with cross-overs in
<br>
matrix crossov. You can check, for example:
<br>
<br>
spplot(refG[crossov[18,],],zcol="OBJECTID")
<br>
spplot(refG[crossov[4,],],zcol="OBJECTID")
<br>
<br>
etc.
<br>
<br>
(BTW, why the following code does not plot anything?:
<br>
for (i in 1:nrow(crossov)){
<br>
print(crossov[i,])
<br>
spplot(refG[crossov[i,],],zcol="OBJECTID")
<br>
readline()
<br>
}
<br>
<br>
Thanks for any help!
<br>
<br>
Agus
<br>
<br>
<hr width="90%" size="4"><br>
<center><img src="cid:part1.05040108.09060904@geo.uu.nl"></center>
<pre wrap="">
<hr width="90%" size="4">
_______________________________________________
R-sig-Geo mailing list
<a class="moz-txt-link-abbreviated" href="mailto:R-sig-Geo@stat.math.ethz.ch">R-sig-Geo@stat.math.ethz.ch</a>
<a class="moz-txt-link-freetext" href="https://stat.ethz.ch/mailman/listinfo/r-sig-geo">https://stat.ethz.ch/mailman/listinfo/r-sig-geo</a>
</pre>
</blockquote>
</body>
</html>