[ncl-talk] How can I mask regions ousider of the interest area using a .shp file

Guido Cioni guidocioni at gmail.com
Mon Mar 5 19:16:04 MST 2018


Remember to include ncl-talk in all replies.

I believe you can do that easily with the examples that I suggested to you.

When you have masked the data using the example you can already plot it and
it will look like that, provided that you turn off the normal map outline
with mpOutlineOn=False.

If you want the outline you just need to plot the shapefile with the
desired region using one of the common  functions.

Il 6 mar 2018 12:21 PM, "Leo Niu" <leo2018niu at gmail.com> ha scritto:

> Thanks for all your response.
>
> I have a polygon shapefile of the blue area.And I want to mask outside of
> this area. Just the blue area is remained.I know the maps sources, like
> @mpAreaMaskongOn、@mpAreaNames etc. But I don’t want to use Ncarg4_0
> database,even seting @mpDataBaseVersion to be “HighRes” . because
> boundaries in the database can’t match it in my shapefile. Polylines and
> polygons in my shapefile are more detailed.
>
> Finally, I’m willing to get a plot like this:
>
>
> Is that clear?
>
>
> 2018-03-05 21:12 GMT+08:00 Guido Cioni <guidocioni at gmail.com>:
>
>> It looks to me that example 11 in this page https://www.ncl.ucar.edu/
>> Applications/shapefiles.shtml does exactly what you want to do,
>> specifically read a shapefile, select an area to mask, save the mask to a
>> netcdf file and then use this variable to mask the original data (i advise
>> you to create the netcdf at first otherwise it will take so much to use the
>> shapefile every time).
>>
>> Otherwise you have to explain better what you want to do ;-)
>>
>> Il 5 mar 2018 11:22 PM, "Leo Niu" <leo2018niu at gmail.com> ha scritto:
>>
>>>
>>> I'm ploting a contour of an area. But boundries of the interest area in
>>> Ncarg4_0 database can't match with my shapefile. I have searched for
>>> ploting an area and masking outside using a polyline or polygon shapefile
>>> on www.ncl.ucar.edu.But I haven't found a method dealing with this. Is
>>> there some ways that can help in ploting contour of an area only inside of
>>> a geocoded polygon?
>>> Thanks a lot.
>>> leo2018niu
>>> 邮箱:leo2018niu at gmail.com
>>>
>>> <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?iconUrl=https://mail-online.nosdn.127.net/qiyelogo/defaultAvatar.png&name=leo2018niu&uid=leo2018niu%40gmail.com&ftlId=3&items=%5B%22%E9%82%AE%E7%AE%B1%EF%BC%9Aleo2018niu%40gmail.com%22%5D>
>>>
>>> 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail88> 定制
>>>
>>> _______________________________________________
>>> 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/20180306/3bfb0420/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 12231 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180306/3bfb0420/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 12561 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180306/3bfb0420/attachment-0001.png>


More information about the ncl-talk mailing list