Comments (9)
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.
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.
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.
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.
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.
Indeed, thanks for the work around! It has been working flawlessly.
Cheers!
from gis-extension.
Thanks guys, glad it works!
from gis-extension.
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.
Awesome, thank you for the heads-up. Cheers!
from gis-extension.
Related Issues (20)
- `gis:link-dataset` and user-defined breed causes crash
- apply-raster and raster-sample generate different results HOT 1
- Scientific e notation not recognized
- Clearer documentation about and/or support for multipart features
- nothing named gis:project-lat-lon defined error HOT 1
- Netlogo 6.2.0 breaks gis:import-wms-drawing
- NetLogo 6.2 Parsing error while loading .asc file HOT 3
- `gis:create-turtles-from-points`: Turtle placed outside of envelope when envelope set to `gis:envelope-of` the dataset in question
- netlogo 6.3 R error HOT 1
- `import-wms-drawing` fails in GIS General Examples model with Internal Server Error (HTTP code 500) HOT 1
- `gis:create-turtles-inside-polygon` fails with `Extension exception: Index 0 out of bounds for length 0` HOT 2
- NetLogo let target min-one-of neighbors math operation produced a non-number HOT 1
- gis:find-features always returns partial string matches, StringUtils.matches problem HOT 2
- GIS extension needs to support more grid data formats
- How to Enable GIS Extension to Support Gaussian Projection
- Expose coordinate transformation methods as primitives HOT 1
- Primitives to access world edges
- Add gis:set-property-value primitive
- NetLogo GIS Extension Problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gis-extension.