Skip to content

Conversation

@ake123
Copy link

@ake123 ake123 commented May 22, 2025

Add Finnish Digital Elevation Model (DEM) #18

@pitkant
Copy link
Member

pitkant commented May 22, 2025

Ok, cool. I quickly tested this and it seems to work ok. terra is a big import but I guess it can't be helped with data like this.

The examples seemed a bit weird to me:

dem_file <- plot(ogc_get_dem("22.235421,60.446375,22.257050,60.453402",geometry_type ="bbox", resolution = "2m"))
#' plot(dem_file)

There's 2 plot functions there. Also importing the whole terra in the function imports does not seem to overwrite the plot method to SpatRaster objects so the example also fails because of that, if terra is not loaded the regular way with library(terra) into namespace.

Error in plot.xy(xy, type, ...) : 
  invalid type passed to graphics function

After loading terra, plotting works as it should.

At this point I think it would be useful if you would provide more examples for other types of geometry types and 10m resolution as well. These can be later turned into unit tests, I think.

@muuankarski
Copy link
Collaborator

I have totally missed this PR. My apologies.. Will take a look as soon as I can!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants