[gradsusr] Info about shape files
Jennifer Adams
jma at cola.iges.org
Thu Jun 30 14:50:01 EDT 2011
Actually, point shapefiles are naturally suited to the GrADS station
data interface, and I have already written a short C program that will
convert a point shapefile to a GrADS station data set. I would be
happy to share this code if anyone is interested. But this is an
external utility, and there are no plans to integrate it into GrADS.
The idea of using a polygon in a shape file to define an area to mask
out a gridded data set would be a useful feature; however, this is
done very easily by the GIS tools, and we have no plans or funding to
implement this in GrADS. It's possible to kludge it with manual
interactive scripting using 'q pos' to click on grid points that you
decide are in/outside of a polygon, but this is not practical for high
res data or a large number of polygons.
--Jennifer
On Jun 30, 2011, at 1:23 PM, Huddleston, John wrote:
> Yaqiang
>
> It would be better to develop a utility outside of GrADS for that
> purpose.
>
> Point shapefiles would translate best to gridded data; however there
> is a certain amount of work to define the outside "-1" area, the
> simplest would be a box.
>
> Line shapefiles would involve using an intersection algorithm and
> the user would have to specify the grid size and the starting corner
> coordinates.
>
> A polygon, or multipolygon, shapefile can be quite complex. Reverse
> direction is the "donut hole" of '-1' values and normal direction
> are the '1' values. Again, there would have to be a grid
> specification and intersection.
>
> Frank Warmerdam's FWTools2.4.7 has a shp2img utility. I've not used
> it; however, the output can be one of the GDAL formats.
>
> Again, this type of utility is not suited for GrADS, IMHO.
>
> John Huddleston, PhD
> Cooperative Institute for Research in the Atmosphere
>
> -----Original Message-----
> From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org
> ] On Behalf Of Yaqiang Wang
> Sent: Thursday, June 30, 2011 8:40 AM
> To: GrADS Users Forum
> Subject: Re: [gradsusr] Info about shape files
>
> Dear Jennifer Adams,
>
> Maybe you could consider to develop a function to convert polygon
> shapes to gridded data with the inside values as 1 and outside
> values as -1. Then the gridded data could be used in the analysis
> functions.
>
> Best Regards!
> Yaqiang Wang
>
> **************************************************
> Dr. Yaqiang Wang
> Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun
> South Avenue Beijing, 100081 China
>
> yaqiang.wang at gmail.com
> ***************************************************
> 2011-06-30
>
> ======= 2011-06-29 18:17:06 In your letter:=======
>
>> A shapefile is a set of points, lines, or polygons, not gridded data,
>> and there is no way to use the analysis functions in GrADS on the
>> graphical elements in a shapefile. --Jennifer
>>
>>
>> On Jun 29, 2011, at 5:51 AM, Francesco Piani wrote:
>>
>>> Thanks for the reply.
>>> But MeteoInfo seems to be a different tool than GrADS. I wonder if
>>> GrADS can use shape also for maskout or other statistical
>>> operations.
>>>
>>> Francesco
>>>
>>> Da: "Yaqiang Wang" <yaqiang.wang at gmail.com>
>>> A: "piani" <piani at lamma.rete.toscana.it>
>>> Inviato: Martedì, 28 giugno 2011 16:04:14
>>> Oggetto: Re: [gradsusr] Info about shape files
>>>
>>> Hi Francesco,
>>>
>>> 1. Shape files could be used as maskout layer in MeteoInfo which is
>>> free avaliable at http://www.esnips.com/web/MeteoInfo . You can even
>>> use one or more shapes in a shape file as maskout through output the
>>> shapes to a .wmp file. In this way, the plot will be masked exactly
>>> by the border lines of the shapes.
>>>
>>> 2. With MeteoInfo, you can output the shapes of a shape file to a
>>> maskout grid data which could be used in maskout() function of
>>> GrADS.
>>>
>>> The detailed information could be found in the help document of
>>> MeteoInfo. Only polygon shape files are valid for above application.
>>>
>>> Best Regards!
>>> Yaqiang Wang
>>>
>>> **************************************************
>>> Dr. Yaqiang Wang
>>> Chinese Academy of Meteorological Sciences (CAMS)
>>> 46, Zhong-Guan-Cun South Avenue
>>> Beijing, 100081
>>> China
>>>
>>> yaqiang.wang at gmail.com
>>> ***************************************************
>>> 2011-06-28
>>>
>>> ======= 2011-06-28 18:17:36 In your letter:=======
>>>
>>>> Hi all.
>>>> I'm working with shapefiles and I would like to know if it's
>>> possible to use them for other operations than draw and write. In
>>> particular, is there a way to use with maskout()?
>>>>
>>>>
>>>> Thanks in advance.
>>>>
>>>>
>>>> Francesco
>>>> _______________________________________________
>>>> gradsusr mailing list
>>>> gradsusr at gradsusr.org
>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>>
>>>
>>> = = = = = = = = = = = = = = = = = = = =
>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>> --
>> Jennifer M. Adams
>> IGES/COLA
>> 4041 Powder Mill Road, Suite 302
>> Calverton, MD 20705
>> jma at cola.iges.org
>>
>>
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>
> = = = = = = = = = = = = = = = = = = = =
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110630/ed39960d/attachment-0003.html
More information about the gradsusr
mailing list