<div dir="ltr"><div>Hi,</div><div><br></div><div>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.</div><div><br></div><div><div>More on proj4:</div><div><br></div><div> <a href="https://proj.org/usage/index.html">https://proj.org/usage/index.html</a></div><div><br></div>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.</div><div><br></div><div>Rick</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 11, 2019 at 8:46 AM Vanúcia Schumacher <<a href="mailto:vanucia-schumacher@hotmail.com">vanucia-schumacher@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
<span style="font-size:12pt;color:rgb(0,0,0)">My data is in ascii format (e.g. attached). Yes, I would like to use </span><span style="color:rgb(0,0,0);font-size:12pt;background-color:rgb(255,255,255);display:inline">some
kind of cartographic projection, type Cylindrical equidistant or Mercator. </span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-size:12pt;background-color:rgb(255,255,255);display:inline">That
would be exactly what this library does (</span><span style="color:rgb(32,31,30);font-size:15px;background-color:rgb(255,255,255);display:inline"><span style="background-color:rgb(255,255,255);display:inline;font-size:12pt;color:rgb(0,0,0)">Proj4</span></span><span style="color:rgb(0,0,0);font-size:12pt;background-color:rgb(255,255,255);display:inline">).</span><span style="color:rgb(32,31,30);font-size:15px;background-color:rgb(255,255,255);display:inline"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
<span style="color:rgb(32,31,30);font-size:15px;background-color:rgb(255,255,255);display:inline"><span style="font-size:12pt;color:rgb(0,0,0)">The
specific region of the projection would be Brazil, maybe I will use some shapefile to cut some specific region.</span><span><br>
</span>
<div><span style="font-size:12pt;color:rgb(0,0,0)">It would be great to have this interface. Let me know everything you need to work out.</span></div>
<div><span style="font-size:12pt;color:rgb(0,0,0)">Thanks for the support</span><br>
</div>
</span></div>
<div id="gmail-m_-1762907589063050045appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-1762907589063050045divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>De:</b> Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>><br>
<b>Enviado:</b> segunda-feira, 11 de novembro de 2019 12:16<br>
<b>Para:</b> Vanúcia Schumacher <<a href="mailto:vanucia-schumacher@hotmail.com" target="_blank">vanucia-schumacher@hotmail.com</a>><br>
<b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a> <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
<b>Assunto:</b> Re: [ncl-talk] Convert data frame to spatial coordinates</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>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.).</div>
<div><br>
</div>
<div>Rick<br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Mon, Nov 11, 2019 at 8:11 AM Vanúcia Schumacher via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
<span style="font-size:12pt;color:rgb(0,0,0)">Hi users,</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
</div>
<div><span style="font-size:12pt;color:rgb(0,0,0)">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?</span></div>
<div><br>
</div>
<div><span style="font-size:12pt;color:rgb(0,0,0)">Data frame like this:</span></div>
<div><span style="font-size:12pt;color:rgb(0,0,0)">type,year,mon,day,hr,min,seg,lat,lon,var</span><span><br>
</span><span style="font-size:12pt;color:rgb(0,0,0)">CGC,2015,8,29,0,0,1,-5.0811541,-52.1089013,-11538</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
<span style="font-size:12pt;color:rgb(0,0,0)">...</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
...</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
...</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
<span style="font-size:12pt;color:rgb(0,0,0)">Thanks for any support</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:14pt;color:rgb(0,0,0)">
<br>
</div>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote>
</div>
</div>
</div>
</blockquote></div>