[gradsusr] Drawing Shape Files
Jennifer M Adams
jadams21 at gmu.edu
Sat Aug 20 10:01:13 EDT 2016
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 at 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
> ----------------------------------------------------------------------
Date: Tue, 16 Aug 2016 16:37:48 -0400
From: Stephen McMillan <smcmillan at planalytics.com<mailto:smcmillan at planalytics.com>>
Subject: Re: [gradsusr] Drawing Shape Files
To: GrADS Users Forum <gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>>
Message-ID:
<CA+exxN2i=SEHQXjQbhYPmRmR_pPwbRzMLZDJrA+Pm-UvKuXnMg at mail.gmail.com<mailto:SEHQXjQbhYPmRmR_pPwbRzMLZDJrA%2BPm-UvKuXnMg at mail.gmail.com>>
Content-Type: text/plain; charset="utf-8"
Hi Andrew,
There are quite a number of sources for shapefiles, including US counties.
Here's one that might be useful:
https://www.census.gov/geo/maps-data/data/cbf/cbf_counties.html
Above link has three different resolutions. Just download and unzip to
wherever you keep your shapefiles. I tried the "500k" resolution and it
includes Alaska counties, so maybe it will suit your needs. Be sure to
read the data description on the web page for appropriateness and any
limitations.
Good luck--
Stephen Mc
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr
--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160820/ae89d23a/attachment-0001.html
More information about the gradsusr
mailing list