Using Shape Files in GrADS

Arlindo da Silva dasilva at ALUM.MIT.EDU
Wed Jul 23 21:12:18 EDT 2008


On Tue, Jul 22, 2008 at 12:54 PM, Stephen R McMillan
<smcmillan at planalytics.com> wrote:
>
> This is a re-send of inquiry sent yesterday. Perhaps no one in user
> community has actually used the shape file feature.  If so, then this is
> intended for the person who contributed this function to v1.9.0-rc1 for
> Windows.  All I need is an EXAMPLE or two of the correct syntax when an
> "object" is involved, any additional required command arguments, and any
> pre-requisite commands.
>
> I had done a search of the user archives regarding shape files, but found
> only my previous relevant questions and partial responses.
>

I just found a silly bug that was preventing the shp_polyf feature
from working. I am reconstructing my Win32 build environment and I
will post a revised shape.dll as soon as I can. I believe Graziano has
fixed the issue with line thickness, etc. The fixed sources have been
checked in at the OpenGrADS CVS repository if you rather buid from
sources.

The syntax should be something like:

ga-> shp_polyg admin98 8

to plot object number "8"; In this particular case, the admin98.shp
file as 2,604 shapes (objects), so you can enter a number from 0 to
2,603 (it is 0-based as in C). Each shape (object) corresponds to a
single small polygon, although some objects may not be plotted at all
(it must be closed for it to be filled).

   Arlindo








> Thanks--
> Stephen McMillan
>
>
> Stephen R. McMillan/Planalytics
>
> 07/21/2008 02:05 PM
>
> To
> GRADSUSR at LIST.CINECA.IT
> cc
> Subject
> Using Shape Files in GrADS
>
>
>
> I am able to display shape file polygons in GrADS. However, I would like to
> be able to color-fill the component polygons according to a value, say,
> temperature. Is this possible? If so, please share how to do it.
>
> I can draw all the lines with the 'shp_lines....' command, and an
> overall/inclusive filled polygon with the 'shp_polyf...' command, specifying
> a single color with the 'set line...' command. However, I want to be able to
> control individual shape poly fills within the inclusive boundaries, such as
> states/provinces, of the shape file. I am currently experimenting with the
> "admin98" set. The associated .dbf file contains 14 columns/fields of
> geographical data, including what appear to be unique identifiers (US20,
> USA-KAN, etc.).
>
> The command line output indicates the following syntax, with 1 to 3
> arguments:
> Usage: shp_polyf shapefile [object]
>
> How do I specify the object? Is the object the 2nd argument? What is the 3rd
> argument, and how do I specify it?
>
> The idea is that my script would read a text file as input, where individual
> shapes (such as state/province boundaries) are associated with temperature
> or some other variable.
>
> I am using GrADS v1.9.0-rc1 (installed from OpenGrADS), on a Windows XP
> platform.
>
> Any help on this would be appreciated.
>
> Stephen McMillan
>
>
> ***************************************************
> The information contained in this e-mail message is intended only for the
> use of the recipient(s) named above and may contain information that is
> privileged, confidential, and/or proprietary. If you are not the intended
> recipient, you may not review, copy or distribute this message. If you have
> received this communication in error, please notify the sender immediately
> by e-mail, and delete the original message.
> ***************************************************
>



--
Arlindo da Silva
dasilva at alum.mit.edu



More information about the gradsusr mailing list