Skip to content

Commit

Permalink
Fix undefined CRS bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mrustl committed Apr 15, 2024
1 parent 6a5e7cf commit 1678dcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/get_shapes_of_germany.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ get_shapes_of_germany <- function(recreate = FALSE, use_sf = FALSE)
example_grid <- get_example_grid_germany()

#crs_lines <- readLines("https://opendata.dwd.de/climate_environment/CDC/help/gk3.prj")
#print(example_grid@crs)
#print(example_grid@srs)
#cat(crs_lines)

# Transform all shapes according to the projection of the example grid
shapes_germany <- lapply(
shapes_germany,
FUN = transform_coords,
target_crs = example_grid@crs,
target_crs = example_grid@srs,
use_sf = use_sf
)

Expand Down
2 changes: 1 addition & 1 deletion R/read_data_over_shape.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ read_shape_with_dwd_projection <- function(file, ...)
example_grid <- get_example_grid_germany()

# Read the shape file, transforming the projection to DWD's projection
read_shape_file(file, target_crs = example_grid@crs, ...)
read_shape_file(file, target_crs = example_grid@srs, ...)
}

# get_data_from_grid_files -----------------------------------------------------
Expand Down

0 comments on commit 1678dcb

Please sign in to comment.