Skip to content

Commit 039dd8a

Browse files
authored
Merge pull request #491 from mneilson-usgs/ep_6_aoi_bb_note
Explain coordinate system mismatch
2 parents c99bee2 + b8288b4 commit 039dd8a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

episodes/06-vector-open-shapefile-in-r.Rmd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,15 @@ ggplot() +
172172
coord_sf()
173173
```
174174

175+
176+
On the boundary plot, the x and y axes are labeled in units of decimal degrees. However, the CRS
177+
for `aoi_boundary_HARV` is UTM zone 18N, which has units of meters. `geom_sf` will use
178+
the CRS of the data to set the CRS for the plot, so why is there a mismatch?
179+
180+
By default, `coord_sf()` generates a graticule with a CRS of WGS 84 (where the units
181+
are decimal degrees), and this sets our axis labels. To draw the graticule in the native
182+
CRS of our shapefile, we can set `datum=NULL` in the `coord_sf()` function.
183+
175184
::::::::::::::::::::::::::::::::::::::: challenge
176185

177186
## Challenge: Import Line and Point Vector Layers

0 commit comments

Comments
 (0)