[ncl-talk] shapefile woes

Kacie Shourd Kacie.Shourd at dri.edu
Thu Jun 2 14:37:36 MDT 2016


Hi Matty (<3),

I’ve never plotted shapefiles in NCL before, so bear with me. Looking at your code, I would suggest you try using gsn_add_shapefile_polygons like you use gsn_add_shapefile_polylines. Similar to how you are attempting to add the road polylines, try to add the polygons in this way as well?? The map you are calling in the create_SD_map function you have defined doesn’t draw these as far as I can tell.

Another thing to check would be that your map projections are matching between the shapefiles and the map you have called using NCL.

Hopefully this helps, or someone else can guide you further.

Best,
Kacie

---
Kacie N. Shourd
드림

Graduate Research Assistant
Desert Research Institute
Kacie.Shourd at dri.edu<mailto:Kacie.Shourd at dri.edu>
Work: (775) 674-7049



From: ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] On Behalf Of Matt Flournoy
Sent: Thursday, June 02, 2016 12:59 PM
To: ncl-talk at ucar.edu
Subject: [ncl-talk] shapefile woes

Hi all,

I'm trying to plot a simple map of a few counties and roads in South Dakota using NCL 6.3.0. To do this, I've downloaded USA county shapefiles (from "http://www.gadm.org/country") and SD road network shapefiles (from "http://download.geofabrik.de/north-america.html"). Then, I use gsn_add_shapefile_polylines to add the USA counties to an existing map in my code, but I get this error message:

(0) Error: gsn_add_shapefile_polylines: Can't open shapefile '/home/matt.flournoy/PECAN/overview/July06/new_shp/USA_adm_shp/USA_adm2.shp'
(0)       No shapefile information will be added.

I get the same error if I try inputing the road network shapefile, except that the directory in the first error message is the directory where the road network shapefile is. The map is plotted when I run the code, but the shapefile information is not on them.
Does anyone know what may be causing this issue? I've attached the code that I'm using, which is very similar to the NCL example online about reading in USA county shapefiles from the same site as above.
Thank you,
Matt

--
Matthew Flournoy
M.S. Meteorology Student, University of Oklahoma
B.S. Meteorology, Penn State University

PUBLIC RECORDS NOTICE: In accordance with NRS Chapter 239, this email and responses, unless otherwise made confidential by law, may be subject to the Nevada Public Records laws and may be disclosed to the public upon request.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160602/77ec197d/attachment.html 


More information about the ncl-talk mailing list