<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div>Hello,</div><div><br></div><div>I've got a raster with values 1 and NA. I'm attempting to convert to a polygon using the rasterToPolygons function with dissolve=TRUE. The raster is in an equal area projection (<span>+proj=aea +lat_1=-5 +lat_2=-42 +lat_0=-32 +lon_0=-60 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs )</span></div><div><span><br></span></div><div>When I use this command on the projected raster:</div><div><br></div><div>sh<-<span>rasterToPolygons(myraster,dissolve=TRUE)</span></div><div><span><br></span></div><div>I get a <span>SpatialPolygonsDataFrame with a single polygon but this plots several</span> lines in the polygon (dissolve function partially working but not plotting as a simple perimeter of the polygon).</div><div><br></div><div>If I project the raster to a geographic coordinate system (<span>"</span><span class="ydp79554e74s1">+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs</span>"), I get the expected plot.</div><div><br></div><div>Both plots are attached.</div><div><br></div><div>I would appreciate any insight. This is part of a larger script and the projected raster/polygon is desirable.</div><div><br></div><div>Thanks</div><div><br></div><div><br></div></div></body></html>