Skip to content

Commit

Permalink
ENH: Add additional shapefile metadata files
Browse files Browse the repository at this point in the history
Also set a correct default ellipse for these data, which are on NAD83
rather than WGS84.
  • Loading branch information
dopplershift committed Nov 28, 2023
1 parent 91543f6 commit bf8075c
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/metpy/plots/cartopy_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class MetPyMapFeature(Feature):
def __init__(self, name, scale, **kwargs):
"""Create MetPyMapFeature instance."""
import cartopy.crs as ccrs
super().__init__(ccrs.PlateCarree(), **kwargs)
super().__init__(ccrs.PlateCarree(globe=ccrs.Globe('NAD83')), **kwargs)
self.name = name

if isinstance(scale, str):
Expand All @@ -27,7 +27,7 @@ def geometries(self):

# Ensure that the associated files are in the cache
fname = f'{self.name}_{self.scaler.scale}'
for extension in ['.dbf', '.shx']:
for extension in ['.cpg', '.dbf', '.prj', '.shx']:
get_test_data(fname + extension, as_file_obj=False)
path = get_test_data(fname + '.shp', as_file_obj=False)
return iter(tuple(shapereader.Reader(path).geometries()))
Expand Down
1 change: 1 addition & 0 deletions staticdata/us_counties_20m.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
1 change: 1 addition & 0 deletions staticdata/us_counties_20m.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
1 change: 1 addition & 0 deletions staticdata/us_counties_500k.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
1 change: 1 addition & 0 deletions staticdata/us_counties_500k.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
1 change: 1 addition & 0 deletions staticdata/us_counties_5m.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
1 change: 1 addition & 0 deletions staticdata/us_counties_5m.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
1 change: 1 addition & 0 deletions staticdata/us_states_20m.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
1 change: 1 addition & 0 deletions staticdata/us_states_20m.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
1 change: 1 addition & 0 deletions staticdata/us_states_500k.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
1 change: 1 addition & 0 deletions staticdata/us_states_500k.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
1 change: 1 addition & 0 deletions staticdata/us_states_5m.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
1 change: 1 addition & 0 deletions staticdata/us_states_5m.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

0 comments on commit bf8075c

Please sign in to comment.