DOI-USGS / lake-temperature-model-prep

Pipeline #1
Other
6 stars 13 forks source link

Correct `fetch_Iowa_points` #316

Closed padilla410 closed 2 years ago

padilla410 commented 2 years ago

fetch_Iowa_points converts UTM 15 (CRS = 26915) to lat/long (CRS = 4326). This conversion works for most lakes in Iowa_Lake_Locations.csv except 3 locations which are zone 14 (CRS = 26914):

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

LakeID | Lake Name | County | Zone | UTM (NAD83)_E | UTM (NAD83)_N | STORET ID -- | -- | -- | -- | -- | -- | -- 12 | Blue Lake | MONONA | 14T | 735109 | 4658584 | 22670002 15 | Browns Lake | WOODBURY | 14T | 720509 | 4687502 | 22970001 68 | Lake Pahoja | LYON | 14T | 704889 | 4806432 | 22600001

Blue Lake is on the west side of Iowa: image

However, the current version of fetch_Iowa_points puts it on the east side of the state: image

> library(scipiper)
> library(dplyr)
> 
> readRDS(sc_retrieve('1_crosswalk_fetch/out/Iowa_lake_pts_sf.rds.ind')) %>% 
+   filter(site_id == 'Iowa_12')
Simple feature collection with 1 feature and 5 fields
Geometry type: POINT
Dimension:     XY
Bounding box:  xmin: -90.15928 ymin: 42.04416 xmax: -90.15928 ymax: 42.04416
Geodetic CRS:  WGS 84
# A tibble: 1 x 6
  site_id `Lake Name` County Zone  `STORET ID`             geometry
* <chr>   <chr>       <chr>  <chr> <chr>                <POINT [°]>
1 Iowa_12 Blue Lake   MONONA 14T   22670002    (-90.15928 42.04416)

fetch_Iowa_points needs to be modified to capture these zone 14 lakes.

This issue was discovered when working on #286 and will be resolved in the same pull request.

padilla410 commented 2 years ago

Here is a map of the UTM zones in Iowa (with hand annotation): image

https://mangomap.com/robertyoung/maps/69585/what-utm-zone-am-i-in-#

I manually verified that the 9 lakes that were identified in #286 are all UTM 15.

padilla410 commented 2 years ago

This should have closed with PR #321