Coder Social home page Coder Social logo

Comments (2)

pat-s avatar pat-s commented on August 18, 2024

@karstenv thanks for reporting your issue!

A few notes first:

  • Please avoid inserting screenshots of your RStudio IDE if that does not add any value (the plot would have been sufficient but also not essential)
  • Also it is more efficient to shrink down the code to lines which cause the error instead of providing your whole script. This simplifies the understanding of your issue.

Regarding your issue: You need to use load_output = con_params$OUTPUT_VECTOR instead of load_output = con_params$OUTPUT_LAYER in run_qgis. Double-check the function arguments of gdalogr::contour as returned by get_args_man().

See a full reproducible example here:

pacman::p_load(RQGIS, raster)

my_env <- set_env()
data("dem")

con_params <- get_args_man(alg = "gdalogr:contour", 
                           qgis_env = my_env)

con_params$OUTPUT_VECTOR <- file.path(tempdir(), "tz_contours1.shp")
con_params$INPUT_RASTER  <- dem
con_params$INTERVAL <- "\"200\""
con_params$FIELD_NAME <- "\"m\""

tz_200m_contours <- run_qgis(alg = "gdalogr:contour",
                             params = con_params,
                             load_output = con_params$OUTPUT_VECTOR,
                             qgis_env = my_env)

plot(dem)
plot(tz_200m_contours, add = TRUE, col = "darkred" )

rplot

from rqgis.

karstenv avatar karstenv commented on August 18, 2024

from rqgis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.