<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, Pablo --<div>You are correct in your diagnosis, but we cannot just change the datatype of the metafile buffer elements without breaking all the code that reads the metafile buffer. That is something that Brian and I are not willing to do -- it makes version 2.0 backwards incompatible in an unacceptable way. Version 2.1 will have a complete overhaul of the graphics, a redesign of the metafile buffer, and no need for the translator routines like gxeps; that is when your shapefile with one gigantic polygon will be handled properly.&nbsp;</div><div>--Jennifer</div><div><br><div><div>On Jan 5, 2011, at 3:38 PM, P. R.M. wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; ">Hi,<br>this is a message/question for grads developers...<br><br>A short while back I saw some messages go by regarding the mysterious 'memory allocation errors' in gxhpng when drawing large shapefiles and using printim.<br>I ran into this problem yesterday when trying to draw gshhs shapefiles (using the new, built-in 'draw shp' command).<br><br>I dug into the source code and did some debugging.<br>It turns out that the grads metabuffer is based on using short (16-bit) integers.<br>So, regardless of the amount of memory your system has,&nbsp; the maximum number of polygon vertices that can be stored in the buffer is 32,767.<br><br>In my case, the gshhs shapefile I was trying to draw had about 40,000 vertices.<span class="Apple-converted-space">&nbsp;</span><br>Since this value couldnt be stored in the metabuffer, I was getting a 'junk' negative value for the polygon vertext count, and this was causing the memory allocation to fail.<br><br>My quick&amp;dirty workaround was to upgrade the metabuffer's 'short ints' to regular 'gaint' datatypes.<br>I guess this effectively doubles the memory usage of the metabuffer &amp; grads in general.<br>However, it solved the problem...<br><br>I didnt try converting to 'unsigned short' integers in the metabuffer read/write routines,<span class="Apple-converted-space">&nbsp;</span><br>but perhaps this could be implemented instead of being forced to use long integers?<br><br>pablo<br>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br></div></span></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span> </div><br></div></body></html>