-
Notifications
You must be signed in to change notification settings - Fork 389
Description
Currently the Feature
class takes a crs
argument at __init__
time; NaturalEarthFeature
hard-codes this as PlateCarree()
. This is generally fine, as it matches the Natural Earth data. It would be more flexible, though to pull this from the dataset if available, since shapefiles can optionally have a .prj
file that contains the CRS in WKT format. We'd need to read that manually for pyshp, but Fiona makes this available as the .crs
attribute on the base collection. I've confirmed that the Natural Earth data do include such .prj
files.
This is relevant because downstream in MetPy we subclass Feature
to provide US counties and states, (now) from the U.S. Census Bureau. These data are lat/lons defined on NAD83 (which uses GRS80) rather than WGS84. Not a huge difference, but always best to use what's in the data when available. The current API of Feature
doesn't have a good way to set the correct feature at data load time.