Skip to content

Commit 3ba0c83

Browse files
authored
fix!: correct site service crs to EPSG:4269 (NAD83) (#169)
The nwis site service (and the USGS more broadly) uses the NAD83 crs. 64a575d introduced a bug that hard coded the nwis module's crs to EPSG:4236 -- Hu Tzu Shan 1950 (https://epsg.io/4236). I guarantee 64a575d meant to hard code _EPSG:4326_ -- WGS84. It appears it was fat fingered and missed in #143's PR review (it happens to the best of us:)). In either case, EPSG:4326 is still _technically_ the wrong crs. For example: https://waterservices.usgs.gov/nwis/site?sites=01013500&siteOutput=Expanded&format=rdb returns ``` USGS 01013500 ... NAD83 ``` for the field `coord_datum_cd -- Latitude-longitude datum`. So EPSG:4269 -- NAD83 is the correct crs. There is room for discussion if NAD83 vs WGS 84 really matters in the conterminous US however for Alaska errors in both the x and y direction can be upwards of 1 meter in either direction. BREAKING CHANGE: v1.0.10 is the only affected version. The GeoDataFrames returned from the following functions now correctly have a crs of EPSG:4269. dataretrieval.nwis.get_qwdata dataretrieval.nwis.get_discharge_measurements dataretrieval.nwis.get_discharge_peaks dataretrieval.nwis.get_gwlevels dataretrieval.nwis.get_stats dataretrieval.nwis.get_info dataretrieval.nwis.get_pmcodes dataretrieval.nwis.get_water_use dataretrieval.nwis.get_ratings dataretrieval.nwis.what_sites dataretrieval.nwis.get_dv dataretrieval.nwis.get_iv
1 parent 1df381f commit 3ba0c83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dataretrieval/nwis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
"water_use",
4545
"ratings",
4646
]
47-
_CRS = "EPSG:4236"
47+
# NAD83
48+
_CRS = "EPSG:4269"
4849

4950

5051
def format_response(

0 commit comments

Comments
 (0)