[gradsusr] Drawing Shape Files

Andrew Revering andy at f5data.com
Wed Sep 21 21:17:22 EDT 2016


Regarding my problem drawing counties on an Alaska map... I've tried all
the suggestions and still am getting no results.
Interesting result when I did Jennifer's query on the shape file (which
others are using with success), it says:

UnknownShapeType parts=0 verticies=0 XBounds=0:0 YBounds=0:0 ZBounds=0:0
MBounds= 0:0

for every shape.

I don't have this problem with Admin98. I've tried many different shape
files and can't seem to plot anything unless it's from Admin98.


> ------------------------------
>
> Date: Sat, 20 Aug 2016 14:01:13 +0000
> From: Jennifer M Adams <jadams21 at gmu.edu>
> Subject: Re: [gradsusr] Drawing Shape Files
> To: GrADS Users Forum <gradsusr at gradsusr.org>
> Message-ID: <3807099F-678F-45D3-AC16-713AE9A20CFC at gmu.edu>
> Content-Type: text/plain; charset="windows-1252"
>
> Hi, Andrew ?
> You?ve gotten a lot of good help from other users on this question. The
> only thing I can add is that maybe it?s a longitude wrapping issue. Try
> testing with the output from ?q shp? ? this returns a list of all the
> polygons in the file and some metadata about them including their lat/lon
> boundaries. E.g.
>
> ga-> q shp admin98
> Shapefile Type=Polygon #Shapes=2604 XBounds=-180:180 YBounds=-90:83.6236
> 0:  Polygon  parts=1  vertices=19  XBounds=-70.0633:-69.8733
> YBounds=12.4111:12.6311  ZBounds=0:0  MBounds=0:0
> 1:  Polygon  parts=2  vertices=48  XBounds=-61.8911:-61.6664
> YBounds=16.9897:17.725  ZBounds=0:0  MBounds=0:0
> 2:  Polygon  parts=1  vertices=462  XBounds=69.9325:74.9157
> YBounds=35.4396:38.4721  ZBounds=0:0  MBounds=0:0
>
> If the XBounds are defined from -180 to 180 and you are drawing 0 to 360,
> you may not see all the shapes.
> ?Jennifer
>
>
> On Aug 17, 2016, at 4:10 PM, Andrew Revering <andy at f5data.com<mailto:andy@
> f5data.com>> wrote:
>
> Thanks for the link Stephen.
> I tried the file but still doesn't draw. On the same map I used Admin98
> and it drew the Yukon Territory no problem. I also tried putting these
> shape files into the same path as admin98 but no luck.
>
> open gfs003.ctl
> Scanning description file: gfs003.ctl
> Data file gfs003.grib is open as file 1
> LON set to 0 360
> LAT set to -90 90
> LEV set to 1 1
> Time values set: 2016:8:17:9 2016:8:17:9
> E set to 1 1
>
> ga-> set lon -179.8 -127.2
> LON set to -179.8 -127.2
> ga-> set lat 50.9 73.9
> LAT set to 50.9 73.9
>
> ga-> set shp cb_2015_us_county_500k.shp
> Shapefile output file name root: cb_2015_us_county_500k.shp
> Shapefile output type: line
> Shapefile format string is %12.6f
> ga-> d tmp2m
> Contouring: 264 to 291 interval 3
>
> ga-> draw shp admin98
> ga-> draw shp cb_2015_us_county_500k.shp
> ga-> printim test.png
> Created PNG file test.png
>
> result: http://f5data.net/test.png
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160921/0ab5703e/attachment.html 


More information about the gradsusr mailing list