Using Shape Files in GrADS
Stephen R McMillan
smcmillan at PLANALYTICS.COM
Thu Jul 24 12:32:58 EDT 2008
Arlindo,
I'm not yet familiar with how to build from sources, but I appreciate your
mentioning that option.
Regarding the usage syntax, did you mean shp_polyf instead of shp_polyg?
Otherwise, what is "polyg" supposed to do? Also, in their present state
(on current version I'm using), both shp_polyf and shp_lines require
either 1 or 3 arguments. If I try two args as in your example, I get the
GrADS error "invalid number of arguments; need 1 or 3 but got 2". If this
error is valid, then the user will need to know the following for proper
use:
Arg1 Shapefile name such as "admin98"
Arg2 Presumably some object identifier, such as the "8" you mentioned.
Also, how to determine the range of acceptable object identifiers. Right
now, even with admin98, how do I know which sub-polygon 8, 100, 2603, etc.
applies to? For now, I'll just assume they correspond to the order listed
in the .dbf component of the shapefile.
Arg3 What is its purpose? How do I identify the sutable range of Arg3?
I'll look forward to your fix of that "silly little bug"! Thanks for your
response, and keep up the great work!
Stephen McMillan
Arlindo da Silva <dasilva at ALUM.MIT.EDU>
Sent by: GRADSUSR at LIST.CINECA.IT
07/23/2008 08:12 PM
Please respond to
GRADSUSR at LIST.CINECA.IT
To
GRADSUSR at LIST.CINECA.IT
cc
Subject
Re: Using Shape Files in GrADS
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
***************************************************
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.
***************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080724/942287d6/attachment.html
More information about the gradsusr
mailing list