[gradsusr] Info about shape files

Huddleston, John Huddleston at cira.colostate.edu
Thu Jun 30 13:23:49 EDT 2011


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




More information about the gradsusr mailing list