Git Product home page Git Product logo

Comments (9)

lukepc avatar lukepc commented on July 18, 2024

Hey Sean,

This works for me:

to store-raster
  
  let patches_out nobody
  
  ask patches [
    set patches_out gis:patch-dataset pcolor
  ]  
  
  gis:store-dataset patches_out "patch_out.asc"
  
end

However, for large worlds it takes a very long time since it queries each patch, so I wonder if there is something that is closer to the reverse of "apply-raster" in terms of speed.

from gis-extension.

seanbergin avatar seanbergin commented on July 18, 2024

Thanks for looking at this. Previously (v5.3) I used the

set patches_out gis:patch-dataset pcolor

without being inside of the ask patches and it worked just fine.

The Netlogo 6 editor flags that as incorrect (specifically the editor then believes the method is no longer in observer context and doesn't like that the tick command is present)

If I add the ask patches to my Netlogo version 6.0 code, it works again in the editor. However, as you noted this slows things WAY down. I have large maps. While you are right that the code you posted works in the editor - I don't think this is the way it is supposed to work. As you said it is asking each patch to create the entire map. I think it should just make the map - without the ask patches statement surrounding it.

Thanks

from gis-extension.

lukepc avatar lukepc commented on July 18, 2024

Agreed- I had been playing around with syntax before stumbling on the ask patches solution, but it does seem like the 5.3 version is faster and more intuitive/correct. If you figure out or hear about a better way for 6.0, please let me know!

from gis-extension.

lukepc avatar lukepc commented on July 18, 2024

Update, Sean- as you mentioned, each patch was being asked to create the entire map. However, I tried using one-of and that appears to have solved my problem- not sure if it would work for you.

to store-raster-2
  
  let patches_out nobody
  
  ask one-of patches [
    set patches_out gis:patch-dataset pcolor
  ]
  
  gis:store-dataset patches_out "patch_out_check.asc"
  
end

from gis-extension.

mrerrormessage avatar mrerrormessage commented on July 18, 2024

Thanks for posting this, sorry it has taken me so long to respond. This was a bug introduced in NetLogo 6. The one-of fix is a great temporary workaround until we can get a fix for this.

from gis-extension.

seanbergin avatar seanbergin commented on July 18, 2024

Indeed, thanks for the work around! It has been working flawlessly.

Cheers!

from gis-extension.

lukepc avatar lukepc commented on July 18, 2024

Thanks guys, glad it works!

from gis-extension.

mrerrormessage avatar mrerrormessage commented on July 18, 2024

Just wanted to provide an update on this. The problem is in NetLogo, so the fix will come in the next version of NetLogo instead of a new release of the GIS extension. Progress can be tracked on that fix here. I expect to merge the changes in within the week and they should be usable immediately after merge if you're interested in running NetLogo from source. Thanks so much for reporting this!

from gis-extension.

lukepc avatar lukepc commented on July 18, 2024

Awesome, thank you for the heads-up. Cheers!

from gis-extension.

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.