[gradsusr] plotting shapefile elements of a different type

Jeff Duda jeffduda319 at gmail.com
Thu Jul 13 15:57:06 EDT 2023


I have a shapefile containing elevation contours I obtained from USGS. They
are very high in resolution (20-ft contour intervals). If I run the
standard draw command 'draw shp [shapefile]' then *most, but not all*, of
the shapefiles appear to be drawn. See the attached final image as proof.
The geographical extent of this image is about 0.1 deg lat/lon.

The shapefile itself is over 350 MB in size, and I suspect that if I tell
GrADS to draw the whole thing, it runs into memory issues, hence the
incomplete drawing. However, I cannot confirm that the shapefile itself
does not contain the cutouts of the data. It is possible that the shapefile
itself is bad somehow. I just don't know how to find out.

In light of the memory issue, I wrote a script to query the database file
and pull out the record numbers corresponding only to a subset of
elevations I want (namely, every 100 ft instead). However, when I run my
plotting script to individually plot each shapefile using the syntax 'draw
shp [shapefile] [record]', no contours are drawn, even though the record
numbers being entered appear to be accurate. I am issuing this command in a
loop over all of the record numbers I found. For example, to draw all
shapefile contours corresponding to the 13,000-ft elevation, the record
numbers follow in this table:

12800 53
13000 35
13000 60
13000 97
13000 116
13000 129
13000 3075
13000 3091
13000 3167
13000 3555
13000 3567
13000 7884
13000 12789
13000 12818
13000 12850
13000 13370
13000 13375
13000 14231
13000 14233
13000 14556
13000 14645
13000 21232
13000 21248
13000 22460
13000 22478
13000 22517
13000 22552
13000 22583
13000 22654
13000 23316
13000 23530
13000 24222
13000 26865
13000 27949
13000 28224
13000 28300
13000 34185
13000 36604
13000 36621
13000 36632
13000 36682
13000 36695
13000 36721
13000 36739
13000 36802
13000 36822
13000 37771
13000 38627
13000 38708
(48 'draw shp' commands are issued for this subset of the list)

There are about 45,000 records in the shapefile, and I have used Microsoft
Excel to open the dbf file and directly examine the contour values
corresponding to some records to check that these numbers do appear correct.

So why won't GrADS plot these shapefiles when the calls to draw them are
specified individually? No error message comes up when I do this.

Also, I should note that when I examined the contents of the shapefile
directly using 'q shp', the records have entries like this:

4465:  ArcZ  parts=1  vertices=15  XBounds=-105.994:-105.993
 YBounds=38.1644:38.1648  ZBounds=0:0  MBounds=-1.79769e+308:-1.79769e+308

The part that is unexpected is that first entry after the record number:
"ArcZ". I am expecting to see "point"/"polygon"/"line" etc. Is that the
cause of the failed plotting?

Thanks.

Jeff Duda
-- 
Jeff Duda, Ph.D.
Research scientist with CU/CIRES and NOAA/GSL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20230713/317efc8b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Humboldt_Peak_route.png
Type: image/png
Size: 606586 bytes
Desc: not available
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20230713/317efc8b/attachment-0001.png>


More information about the gradsusr mailing list