[ncl-talk] Convert data frame to spatial coordinates

Rick Brownrigg brownrig at ucar.edu
Mon Nov 11 11:15:41 MST 2019


Hi,

The attached scriptlet is a framework for what the interface looks like.
However it does *not* work for me at the moment. The general idea is that
you set so-called "proj4 strings" that describe the source and destination
projections, and pass in x/y/z arrays. The function transform_coordinate
returns the transformed coordinates back in the x/y/z arrays.

More on proj4:

    https://proj.org/usage/index.html

I don't know why this is not working -- I've done this a number of times. I
will need to wrangle a debugger around the code to determine the issue, and
I unfortunately do not have access to such an environment until I get home
this evening.

Rick


On Mon, Nov 11, 2019 at 8:46 AM Vanúcia Schumacher <
vanucia-schumacher at hotmail.com> wrote:

> My data is in ascii format (e.g. attached). Yes, I would like to use some
> kind of cartographic projection, type Cylindrical equidistant or Mercator.
> That would be exactly what this library does (Proj4).
> The specific region of the projection would be Brazil, maybe I will use
> some shapefile to cut some specific region.
> It would be great to have this interface. Let me know everything you need
> to work out.
> Thanks for the support
> ------------------------------
> *De:* Rick Brownrigg <brownrig at ucar.edu>
> *Enviado:* segunda-feira, 11 de novembro de 2019 12:16
> *Para:* Vanúcia Schumacher <vanucia-schumacher at hotmail.com>
> *Cc:* ncl-talk at ucar.edu <ncl-talk at ucar.edu>
> *Assunto:* Re: [ncl-talk] Convert data frame to spatial coordinates
>
> To me, points with lat/lon are spatial data with coordinates (?)  Do you
> mean you want the coordinates in some kind of cartographic projection, such
> as Lambert Conformal, UTM, Mercator, etc?  If so, NCL has an undocumented
> interface to the Proj4 casrtographic projection library. I can elaborate
> further, but you need to know all the projection parameters involved
> (standard parallels, meridian,  etc.).
>
> Rick
>
>
>
> On Mon, Nov 11, 2019 at 8:11 AM Vanúcia Schumacher via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
> Hi users,
>
> I would like to know if NCL or NCL-Phyton has any function for converting
> points (just lat and lon) to spatial data with coordinates?
>
> Data frame like this:
> type,year,mon,day,hr,min,seg,lat,lon,var
> CGC,2015,8,29,0,0,1,-5.0811541,-52.1089013,-11538
> ...
> ...
> ...
>
> Thanks for any support
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191111/9433c06e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lltoxy.ncl
Type: application/octet-stream
Size: 1454 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191111/9433c06e/attachment.obj>


More information about the ncl-talk mailing list