HARPgroup / HARParchive

This repo houses HARP code development items, resources, and intermediate work products.
1 stars 0 forks source link

Map_layer undefined #1293

Open gmahadwar opened 2 months ago

gmahadwar commented 2 months ago

One of the commits in the past week is breaking something across multiple regions we are testing, and leading to this error.

Quitting from lines 556-647 [Create Map 2] (WSP_Regional_Summaries.Rmd) Error: ! Cannot generate maps due to a conflict in the basemap layer. See fns_mapgen.R for more. Backtrace:

  1. global fn_mapgen(...)
  2. global fn_catchMapErrors(...) at Mapping/Functions/fns_mapgen.R:356:3

Fails at line 630, temp fixes: Line 108: sf::st_make_valid(mapdata) Line 630: map_layer is not defined, can replace with base_layer, but not giving the desired map

Updated error message

Quitting from lines 554-645 [Create Map 2] (WSP_Regional_Summaries.Rmd) Error: ! Cannot generate maps due to a conflict in the basemap layer. See fns_mapgen.R for more. Backtrace:

  1. global fn_mapgen(...)
  2. global fn_catchMapErrors(...) at Mapping/Functions/fns_mapgen.R:362:3
gmahadwar commented 2 months ago

Also, one of the recent commits is causing the legend to be too large for the Viewport, leading to:

Error in grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto), : Viewport has zero dimension(s)

"Recent" = 6/24/24 or more recent commits

gmahadwar commented 2 months ago

Also this is happening when we add in the fixes above and crop roads:

image

gmahadwar commented 2 months ago

Also for @megpritch

Move messages like these out of the word doc and into the errors

"1.3.1 Map: ## [1] "No map created for this metric" "

Plus expanding on the error message output at the next troubleshooting call