Mapping Data Associated with Lat/Lon Arrays

QUESTION: I have data that is sometimes gridded and sometimes
not. But, each data point is always associated with a latitude and longitude value. In the past I
have used Map_Patch to display this kind of data. But, Map_Patch seems so 1970s. Do you have
anything in your Coyote Graphics library that will do the job?

ANSWER: Yes, if you have data with associated latitude and
longitude arrays, you want to grid that data for display with
cgWarpToMap. This is the Coyote Graphics
equivalent to Map_Patch.

To see how it works, copy the goes_example_data
save file to a local directory. This file has been discussed previously in an article,
entitled Navigating GOES Images. The procedure
described here is much faster and more straightforward than the procedure described
in that article.

The image is 600 by 431 in size, and the center latitude is -3.01190 degrees and the center
longitude is -75.0101 degrees.

First, we will produce the same kind of output as was produced in the previous
article so you can compare the two. We start, as before, by creating a map projection
space. However, this time we use the Coyote Graphics routine
cgMap, which among other
things is a wrapper for Map_Proj_Init.

Next, we warp the data into a 2D grid that we will display. We will use a pixel
resolution of 300 by 250 for the output image, which is fairly small. You can use
any resolution you like, including resolutions that contain more pixels than the
original image. We will also set the SetRange keyword, which will set the XRange
and YRange properties of the map object internally, so we don't have to set these
later, when we return from cgWarpToMap. The code looks like this.