[ncl-talk] high resolution png image

Micah Sklut micahs2005 at gmail.com
Thu Oct 30 11:30:18 MDT 2014


Okay, thanks for explaining how the raster fill works Kyle. That does help
me understand this limitation. With respect to processing time between
rasterFill and areaFill. It took about 1-2 minutes for rasterFill, compared
to a ball park of 4 hours for areaFill. Quite a difference!

On Thu, Oct 30, 2014 at 1:26 PM, Kyle Griffin <ksgriffin2 at wisc.edu> wrote:

> That's part of the definition of Raster fill - it will always create the
> same number of boxes regardless of resolution of the data underneath,
> typically based on an average of the data points within that set of grid
> points. Although I'm not knowledgeable about the behind-the-scenes
> computations, I know it's common for NCL to mark the whole average as
> missing if any subset of that average is missing. I'm not sure if there's a
> way to override this - a developer might need to chime in here - but that
> would be your only hope if you want to keep your image production time
> down, as the other fill modes will almost certainly be more intensive. You
> can scan examples of Raster Fill code here (see link) and in the contour
> resources page as well.
>
> https://www.ncl.ucar.edu/Applications/raster.shtml
>
> If you did AreaFill or CellFill, I don't think you see much difference in
> the time to produce a vector file output versus a raster image output. But
> yes, what you are seeing is a limitation of using the RasterFill setting.
>
>
> Kyle
>
> ----------------------------------------
> Kyle S. Griffin
> Department of Atmospheric and Oceanic Sciences
> University of Wisconsin - Madison
> Room 1421
> 1225 W Dayton St, Madison, WI 53706
> Email: ksgriffin2 at wisc.edu
>
> On Thu, Oct 30, 2014 at 11:55 AM, Micah Sklut <micahs2005 at gmail.com>
> wrote:
>
>> No, I"m not masking data. Yes, I am using RasterFill, and the resulting
>> image for the Mid Atlantic is great. But, when I expand to global, I lose
>> the high detail, no matter how much I increase the png resolution. So, just
>> wondering why I am losing detail with the global image, and if there is a
>> way around it.
>>
>> On Thu, Oct 30, 2014 at 12:52 PM, Kyle Griffin <ksgriffin2 at wisc.edu>
>> wrote:
>>
>>> Hi Micah,
>>>
>>> This seems to me the type of result you would expect when using
>>> RasterFill as a cnFillMode - the default should be cnAreaFill, which
>>> increases plot time significantly, but might that be an issue?
>>> Otherwise, I assume you're doing nothing else to mask the data, correct?
>>> Sometimes masking data with a land mask can create similar blockiness,
>>> although I am unaware (via inexperience) as to whether there is a
>>> resolution dependence based on the plot size or native data resolution.
>>>
>>>
>>> Kyle
>>>
>>> ----------------------------------------
>>> Kyle S. Griffin
>>> Department of Atmospheric and Oceanic Sciences
>>> University of Wisconsin - Madison
>>> Room 1421
>>> 1225 W Dayton St, Madison, WI 53706
>>> Email: ksgriffin2 at wisc.edu
>>>
>>> On Thu, Oct 30, 2014 at 11:37 AM, Micah Sklut <micahs2005 at gmail.com>
>>> wrote:
>>>
>>>> Hi Kyle,
>>>>
>>>> Thanks for the reply.
>>>>
>>>> The dataset is of 0.05 degree resolution, so that certainly isn't the
>>>> problem. I have attached an image of the same data, but limiting the
>>>> min/max lat/lon to the US Mid Atlantic. In this image you will see much
>>>> more detail. This is the type of detail I was hoping to achieve for the
>>>> entire globe. I figured if I increased the resolution of the global png, it
>>>> would create the desired effect, but as you can see from the global image I
>>>> attached, this wasn't the case.
>>>>
>>>> Looking forward to hearing your thoughts.
>>>> Thank you,
>>>>
>>>> Micah
>>>>
>>>>
>>>>
>>>> On Thu, Oct 30, 2014 at 12:26 PM, Kyle Griffin <ksgriffin2 at wisc.edu>
>>>> wrote:
>>>>
>>>>> Micah,
>>>>>
>>>>> This looks more like a limitation of your dataset - SST data is not of
>>>>> infinite resolution, and you're plotting far more pixels than would be data
>>>>> points in even a 0.1˚ dataset! It looks like the internal pixels are the
>>>>> same size as your coastlines, so I don't see an issue with NCL there. More
>>>>> specifically, you are not actually plotting coastlines - they only plot if
>>>>> you tell them to plot with a call to gsn_csm_map or another similar
>>>>> plotting tool. If you're looking for high resolution coastlines, look at
>>>>> the RANGS mapping capabilities in NCL. Beyond that, you can always plot
>>>>> shapefiles as well.
>>>>>
>>>>> Yes, vector images are going to be extremely large and painful for
>>>>> even a moderate resolution file over the full globe. When you say raster,
>>>>> are you talking about it in the image sense (non-vector file) or in the
>>>>> cnFillMode sense (RasterFill, AreaFill, etc.;
>>>>> https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnFillMode)?
>>>>> Raster fill mode will make the data more blocky and reduce interpolation
>>>>> between points, but the trade-off is a much faster plotting of the image
>>>>> and works well for high-resolution datasets being plotted at relatively low
>>>>> resolution/wide zoom.
>>>>>
>>>>>
>>>>> Kyle
>>>>>
>>>>> ----------------------------------------
>>>>> Kyle S. Griffin
>>>>> Department of Atmospheric and Oceanic Sciences
>>>>> University of Wisconsin - Madison
>>>>> Room 1421
>>>>> 1225 W Dayton St, Madison, WI 53706
>>>>> Email: ksgriffin2 at wisc.edu
>>>>>
>>>>> On Thu, Oct 30, 2014 at 9:58 AM, Micah Sklut <micahs2005 at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> This is a follow up to my previous posts, in reference to searching
>>>>>> for high resolution images that could be used as zooming/navigating
>>>>>> (specific interest is with image tile layers).
>>>>>>
>>>>>> I figured if I created a png file with a high resolution, it would be
>>>>>> able to capture the high detail, like with coastlines and so forth.
>>>>>> I've attached an image with very high resolution (16384x16384), but
>>>>>> as you can see, if you zoom the global image into the coastlines they are
>>>>>> extremely blocky.
>>>>>>
>>>>>> Is is possible to capture high resolution features, such as
>>>>>> coastlines in a global raster image with NCL?
>>>>>>
>>>>>> FYI, I tried the vector image route, but the file size was gigantic,
>>>>>> so that didn't seem like a proper route.
>>>>>>
>>>>>> Thank you,
>>>>>>
>>>>>> --
>>>>>> Micah Sklut
>>>>>>
>>>>>> _______________________________________________
>>>>>> ncl-talk mailing list
>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Micah Sklut
>>>>
>>>>
>>>
>>
>>
>> --
>> Micah Sklut
>>
>>
>


-- 
Micah Sklut
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141030/c0d04a39/attachment.html 


More information about the ncl-talk mailing list