Cannot allocate vector of size... Background surface generator

33 views
Skip to first unread message

Michelle Emily DePrenger-Levin

unread,
Jan 5, 2019, 1:46:16 PM1/5/19
to VisTrails SAHM
In the background surface generator, I've exceeded R's ability to deal with my giant rasters. I would guess that I could rescale the rasters, I'm using DEM (to slope, aspect, roughness) but it would be nice if I could use them at the scale they're at. 

Any suggestions on how to deal with the rasters? Can I break up the rasters in some way and stitch them back together? 

Any help or suggestions are appreciated. 

Michelle

Julia Sullivan

unread,
Jan 5, 2019, 8:45:23 PM1/5/19
to VisTrails SAHM
Hi Michelle,
Something that has worked for me in the past is to set your datatype to integer. Your rasters will take up less space. If you don't want to lose the accuracy of your values, you can always multiply the values by 100 and then set them to integers.
If you have the option, using a computer that has more cores and/or RAM is also a possible solution.
Best,
Julia

Michelle Emily DePrenger-Levin

unread,
Jan 6, 2019, 4:33:37 PM1/6/19
to VisTrails SAHM
Thanks Julia,

Where might I set the datatype as integer? I see an integer (multiplier maybe) under isopleth in the Background Generator but am unsure where I'd set it to integer. 

Thanks,

Michelle

Julia Sullivan

unread,
Jan 6, 2019, 9:10:11 PM1/6/19
to Michelle Emily DePrenger-Levin, vistrai...@googlegroups.com
Oops, let me clarify. Unfortunately there is no handy button in the vistrails sahm package. Setting your datatype to integers has to happen separately in R or using ArcMap/ArcPro. You can do it in R, or there's an Arcmap tool called Int to allow you to convert them.

Virus-free. www.avg.com

--
You received this message because you are subscribed to the Google Groups "VisTrails SAHM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vistrails-sah...@googlegroups.com.
To post to this group, send email to vistrai...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michelle Emily DePrenger-Levin

unread,
Jan 7, 2019, 10:40:02 AM1/7/19
to VisTrails SAHM
Ah ha! Before I run the rasters through sahm. Thank you! 

In addition to the R and ArcGIS resources you included, I'm running through https://courses.washington.edu/gis250/lessons/raster_analysis1/exercise/index.html and putting it in this thread so I can find it again when I hit this problem next time. :)

Thanks,

Michelle

Peder Engelstad

unread,
Jan 7, 2019, 10:54:03 AM1/7/19
to VisTrails SAHM
Michelle,

Would you also be willing to share some additional info with us to help with the development of VisTrails? If you would be so kind, it would be good to know some information about the raster you're using for your template. Specifically, the file size and geographic extent. This information could be helpful in any future optimizations of the program.

Thank you!

Peder

Michelle Emily DePrenger-Levin

unread,
Jan 7, 2019, 1:51:09 PM1/7/19
to VisTrails SAHM
The rasters that are too large and caused me trouble are DEMs from The National Map USGS https://viewer.nationalmap.gov/basic/

 I stitched together elevation maps from lon/lat (-111,  43) to (-101, 36) and made a slope, aspect, and ruggedness layer (each around 43,000,000 KB). I expanded the pixel size to about 10 meters (ca. 3,000,000 KB each) and then followed the suggestion to round/make them integers and got to ca. 1,000,000 KB each and they are now working in VisTrails/sahm! 

Let me know if you need any other information. 

Peder Engelstad

unread,
Jan 7, 2019, 1:59:05 PM1/7/19
to VisTrails SAHM
Holy smokes! 43 gigabytes is a massive file. Definitely makes sense that you ran out of memory.

Glad to see that the reduced file size did the trick.
Reply all
Reply to author
Forward
0 new messages