[pyngl-talk] read high-resolution coast database

Mary Haley haley at ucar.edu
Thu Dec 7 14:58:13 MST 2017


Hi Xianoi,

I'm CC-ing pyngl-talk at ucar.edu on this question, since we are encouraging
users to go through our email lists in order to get continued help from us.
You need to subscribe to pyngl-talk before you can send questions to it:

http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

There's no way to use NCL or PyNGL to query the high-res database for
specific lat/lon locations of lakes or other borders for that matter.

What I would recommend is using a shapefile instead, which you can read
using PyNIO, NCL, or other Python tools. There are many free shapefiles out
there, and it's easy to google for them.

As an example, I googled "shapefiles for lakes", and came across this link:

http://www.naturalearthdata.com/downloads/10m-physical-vectors/10m-lakes/

I clicked on the "download lakes" button and it download the shapefiles and
ancillary data to a directory called
​ ​
"ne_10m_lakes".
​ I was then able to use the attached PyNIO script to query the file and
print out the min/​max lat/lon for each segment for each "Lake" on the
file. I created a separate script to plot the different types of features.

--Mary


On Thu, Dec 7, 2017 at 12:22 PM, Xiaoni Wang <xiaoni.wang at obspm.fr> wrote:

> Hi Mary
>     Thanks for your replay. I changed to another projection method and it
> makes the figure bigger. It is OK now.
>     I would like to find the border of some lakes (i.e., lat and lon). I
> am wondering if I can read the high-resolution coast database myself (which
> is used in Pyngl) in order to get such information ? If you could give some
> clue about how to read this database in python, I would appreciate !
>
> Best wishes
>
> Xiaoni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20171207/274ed50f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ne_shp_file.png
Type: image/png
Size: 127786 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20171207/274ed50f/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: query_and_plot_ne_shp_file.py
Type: text/x-python-script
Size: 3189 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20171207/274ed50f/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: query_ne_shp_file.py
Type: text/x-python-script
Size: 1608 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20171207/274ed50f/attachment-0003.bin>


More information about the pyngl-talk mailing list