<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, 5 Dec 2015 at 05:26 Worrall, James -FS <<a href="mailto:jworrall@fs.fed.us">jworrall@fs.fed.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<div bgcolor="white" background="cid:image001.gif@01D12E85.7EE61130" lang="EN-US" link="#9D454F" vlink="#814E95">
<img src="cid:1516f217d864cdccc1" alt="image001.gif" class="kr" style="max-width: 100%;">
<div>
<p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Calibri","sans-serif";color:windowtext">We have been happily using rgdal to read and write ESRI Shapefiles.  Recently my colleague began using it.  We noticed that after saving and reopening files,
 many polygons had been reconfigured, as if the order of the vertices had become jumbled and there were many straight lines cutting across the polygon.  I’m not sure if an image can be pasted in this list but I’ll try.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Calibri","sans-serif";color:windowtext">I did the same thing on my computer and the problem did not occur.  We found that I had an older version of rgdal, 1.0-7.  When I updated it to 1.1-1, the
 problem occurred just as it had with her.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Calibri","sans-serif";color:windowtext">Simply opening and saving a shapefile causes the problem and essentially jumbles the shapefile.  The bug, if it is one, was introduced after 1.0-7</span></p></div></div></blockquote><div><br></div><div><br></div><div><br></div><div><br></div><div><div>I can't reproduce this. Can you provide a reproducible example?  Also, "opening and saving a shapefiles" is not the way to describe what is done in the usual rgdal workflow, so it's not clear what you did. Here's what I tried: </div><div><br></div><div>library(maptools)</div><div>data(wrld_simpl)</div><div><br></div><div>library(rgdal)</div><div>#rgdal: version: 1.1-1, (SVN revision 572)</div><div># Geospatial Data Abstraction Library extensions to R successfully loaded</div><div># Loaded GDAL runtime: GDAL 1.11.2, released 2015/02/10</div><div># Path to GDAL shared files: E:/inst/R/R/library/rgdal/gdal</div><div># GDAL does not use iconv for recoding strings.</div><div># Loaded PROJ.4 runtime: Rel. 4.9.1, 04 March 2015, [PJ_VERSION: 491]</div><div># Path to PROJ.4 shared files: E:/inst/R/R/library/rgdal/proj</div><div># Linking to sp version: 1.2-1 </div><div><br></div><div><br></div><div>writeOGR(wrld_simpl, ".", "1.1-1", "ESRI Shapefile")</div><div>x1 <- readOGR(".", "1.1-1")</div><div>plot(x1)  ## all good</div><div><br></div><div><br></div><div> sessionInfo()</div><div>R version 3.2.2 Patched (2015-08-27 r69201)</div><div>Platform: x86_64-w64-mingw32/x64 (64-bit)</div><div>Running under: Windows 8.1 x64 (build 9600)</div><div><br></div><div>locale:</div><div>[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252   </div><div>[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      </div><div>[5] LC_TIME=English_Australia.1252    </div><div><br></div><div>attached base packages:</div><div>[1] stats     graphics  grDevices utils     datasets  methods   base     </div><div><br></div><div>other attached packages:</div><div>[1] rgdal_1.1-1     maptools_0.8-37 sp_1.2-1       </div><div><br></div><div>loaded via a namespace (and not attached):</div><div>[1] tools_3.2.2     foreign_0.8-66  grid_3.2.2      lattice_0.20-33</div><div><br></div><div><br></div><div>Cheers, Mike. </div></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="white" background="cid:image001.gif@01D12E85.7EE61130" lang="EN-US" link="#9D454F" vlink="#814E95"><div><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Calibri","sans-serif";color:windowtext"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Calibri","sans-serif";color:windowtext">I will attach images of one complex polygon, before and after saving with writeOGR.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Calibri","sans-serif";color:windowtext">Jim<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Calibri","sans-serif";color:windowtext"><u></u> <u></u></span></p>
</div>
</div>

_______________________________________________<br>
R-sig-Geo mailing list<br>
<a href="mailto:R-sig-Geo@r-project.org" target="_blank">R-sig-Geo@r-project.org</a><br>
<a href="https://stat.ethz.ch/mailman/listinfo/r-sig-geo" rel="noreferrer" target="_blank">https://stat.ethz.ch/mailman/listinfo/r-sig-geo</a></blockquote></div></div>