<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div>Rabah, </div>
<div><br>
<div>This message is unrelated to the ability of NCL to create such an image. If it is able to go that big though it’s going to be an incredibly large image that takes a incredible amount of time to load in any browser. If not crash most peoples browsers due
to the size of it. </div>
<div><br>
</div>
<div>I believe there was a KML function development somewhere in the archives of NCL talk. Not sure of the details there, but could be worth a google. </div>
<div><br>
</div>
<div>I trialled the tile idea a while back though and it was reasonably successful. Though it can require a lot of images this way and can therefore take a long time to plot them all up. </div>
<div>Below is my test script, I put together a while back to trial this idea (using 6.1.2 at the time). The corners are the key part and are based on coordinate info from this page, which is very helpful for understanding how map tiling works, if you choose
that route. <a href="http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/">http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/</a></div>
<div><br>
</div>
<div><br>
</div>
<div>Good luck, </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>Alan. </div>
<div><br>
</div>
<div><br>
</div>
<div></div>
<div><br>
undef("setlatlon")<br>
procedure setlatlon(res, z,x,y)<br>
begin<br>
math_pi = pi <span class="Apple-tab-span" style="white-space:pre"> </span> ; a global constant I have set, would need to be set; if run elsewhere !!!<br>
res@mpLeftCornerLonF := x / 2^z * 360.0 - 180.0<br>
res@mpRightCornerLonF := (x+1) /2^z * 360.0 - 180.0<br>
res@mpRightCornerLatF := atan(sinh(math_pi * (1 - 2 * y / 2.^z))) * 180.0 / math_pi<br>
res@mpLeftCornerLatF := atan(sinh(math_pi * (1 - 2 * (y+1) / 2.^z))) * 180.0 / math_pi<br>
end<br>
<br>
</div>
<div><br>
undef("check_dir")<br>
procedure check_dir(name)<br>
begin<br>
if(.not.isfilepresent(name))<br>
system("mkdir "+name)<br>
end if<br>
end</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
mpres = True<br>
mpres@mpLimitMode = "Corners" ; method to zoom<br>
mpres@mpProjection = "mercator"<br>
mpres@mpPerimOn = False ; turn off map perimeter<br>
mpres@mpOceanFillColor = -1; "darkslategray1"<br>
mpres@mpInlandWaterFillColor = -1; "deepskyblue"<br>
mpres@tmXTOn = False<br>
mpres@tmXBOn = False<br>
mpres@tmYROn = False<br>
mpres@tmYLOn = False<br>
mpres@gsnMaximize= True<br>
mpres@mpGeophysicalLineThicknessF = 2.<br>
mpres@mpOutlineDrawOrder = "PostDraw"<br>
mpres@mpOutlineBoundarySets ="National" ; Turn on country boundaries<br>
mpres@mpFillOn = False<br>
<br>
<br>
</div>
<div><br>
</div>
<div><br>
wkst = "png"<br>
wkst@wkWidth = 268<span class="Apple-tab-span" style="white-space:pre"> </span>; 256 with 6 pixels for a border which will get cut off. <br>
wkst@wkHeight = 268<span class="Apple-tab-span" style="white-space:pre"> </span>; <span class="Apple-tab-span" style="white-space:pre">
</span><br>
<br>
</div>
<div>dir = “/plotting_directory/“</div>
<div><br>
do z = 2,4 ; Zoom level of maps. </div>
<div> check_dir(dir+z)<span class="Apple-tab-span" style="white-space:pre"> </span>
<span class="Apple-tab-span" style="white-space:pre"> </span> ; make sure there is a directory to put the image in. <br>
<br>
</div>
<div> do x=0,(2^z)-1 ; </div>
<div> check_dir(dir+z+"/"+x+"/“) ; make sure there is a directory to put the image in. <br>
<br>
</div>
<div> do y=0,(2^z)-1<br>
wks = gsn_open_wks(wkst, dir+z+"/"+x+"/"+y ) ;; zoom/x/y.png directory structure is how most tile based utilites expect them. <br>
setlatlon(mpres, z,x,y)<span class="Apple-tab-span" style="white-space:pre">
</span>;; Set corners of map based on zoom level, X, and Y locations. <br>
if(z.ge.4)<br>
mpres@mpDataBaseVersion = “MediumRes” ;; personal preference on plotting time vs coast line representation. <br>
end if<br>
map = gsn_csm_map(wks,mpres)<span class="Apple-tab-span" style="white-space:pre">
</span> ;; create map. <br>
system("mogrify -fuzz 2% -transparent white -shave 6x6 "+dir+z+"/"+x+"/"+y+".png”)<span class="Apple-tab-span" style="white-space:pre">
</span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>;; Call imagemagick to make background transparent (6.2. may have made this redundant) and trim the 6pixel border that NCL loves ( may be machine dependent ); <br>
end do<span class="Apple-tab-span" style="white-space:pre"> </span> ; y- loop</div>
<div><br>
</div>
<div> end do ; x-loop<br>
<br>
</div>
<div>end do ; z-loop </div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<br>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<div apple-content-edited="true">
<div style="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: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<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-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
##############################<br>
Alan Brammer,
<div>PhD candidate,</div>
<div><br>
</div>
<div>Department of Atmospheric and Environmental Sciences,<br>
University at Albany, State University of New York, Albany, NY, 12222
<div><a href="mailto:abrammer@albany.edu">abrammer@albany.edu</a><br>
##############################</div>
</div>
</div>
</span></div>
</div>
<br>
<div>
<div>On Aug 9, 2014, at 10:51, Rick Brownrigg <<a href="mailto:brownrig@ucar.edu">brownrig@ucar.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr">
<div>
<div>Hi Rabah,<br>
<br>
</div>
The image size is going to be constrained by the amount of memory on your system, and at 524288**2, I calculate 270G pixels!! While there are a number of other factors that can limit the amount of memory available (user limits, older versions of NCL were 32-bit,
etc.), I might expect you could at least double your 16384**2 image size.<i> </i>
I suppose you could construct your large image in pieces and then tile them all together into on large image, but not only will that be a bit tedious to manage, I am also unaware of what out-of-core image tools might be available. Finally, I don't know much
about Google Map internals, but I would think it could deal with tiled imagery (?)<br>
<br>
</div>
<div>Good luck!<br>
</div>
<div>Rick<br>
<br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Fri, Aug 8, 2014 at 11:13 PM, Rabah Hachelaf <span dir="ltr">
<<a href="mailto:hachelaf@sca.uqam.ca" target="_blank">hachelaf@sca.uqam.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Rick,
<div><br>
</div>
<div>Thanks for quick response :) ,</div>
<div><br>
</div>
<div>this happen with png workstation type and i want to attain 524288 X 524288 pixel resolution !! this is a big image i wonder if NCL can plot it.</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2014-08-09 0:59 GMT-04:00 Rick Brownrigg <span dir="ltr">
<<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>></span>:
<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>Hi Rabah,<br>
<br>
</div>
That is an interesting error message, indeed! Does this happen with a specific workstation type (png, pdf, etc.), and what is the ideal resolution you would like to attain?<br>
<br>
</div>
Rick<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">
<div>On Fri, Aug 8, 2014 at 9:52 PM, Rabah Hachelaf <span dir="ltr"><<a href="mailto:hachelaf@sca.uqam.ca" target="_blank">hachelaf@sca.uqam.ca</a>></span> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">
<div>Hi All, </div>
<div><br>
</div>
<div>- Can NCL produced a high resolution images? the maximum what i can plot is </div>
<div>16384 X 16384, when i increase this pixel resolution i get this message error :</div>
<div>*****************************************************************************</div>
<div>
<div> GKS ERROR NUMBER -502 ISSUED FROM SUBROUTINE GCLRWK:</div>
<div> -- cairo driver error: error opening output file</div>
</div>
<div>*****************************************************</div>
<div>- I need those high resolution images to overlay it in google map. </div>
<div><br>
</div>
<div>Thanks for any suggestion. </div>
<span><font color="#888888">-- <br>
<div dir="ltr">
<div>------------------------------</div>
Cordialement,<br>
Best regards,<br>
Rabah Hachelaf <br>
<br>
<br>
</div>
</font></span></div>
<span><font color="#888888"><br>
</font></span></div>
<span><font color="#888888"><br>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div>------------------------------</div>
Cordialement,<br>
Best regards,<br>
Rabah Hachelaf <br>
</div>
</font></span></div>
<br>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div>
</div>
</div>
<div>
<div class="h5"><br>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div>------------------------------</div>
Cordialement,<br>
Best regards,<br>
Rabah Hachelaf <br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</body>
</html>