Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm creating an agent-based model in Agent Analyst for ArcGIS and I need to sum all the values in a raster that has about 7 million pixels. I'm a very beginner in programming, and have a script that iterates through every single pixel, checks to see if it has no data, otherwise if it has a value, it adds it. Problem is, it takes FOREVER. How do I do this with javascript?

Thanks!

share|improve this question
1  
Why would you want to do this in JavaScript? It is a terrible language for this purpose. You'll have better luck with maybe Python and numPy –  Devdatta Tengshe May 14 '13 at 3:00
    
Agent Analyst is a piece of middleware that uses mainly javascript and NQPy (Not quite Python). If anybody has a piece of python code, that might work, but NQPy doesn't have all the same functionality as python. –  Kory May 14 '13 at 3:48
    
Ok. I've added tags to indicate that you are using Agent Analyst. –  Devdatta Tengshe May 14 '13 at 3:54
    
Does AA include a license for Spatial Analyst? If so, a quick zonal sum does the trick. –  whuber May 14 '13 at 17:22
    
Agent Analyst is written in Java and can be automated with either NQPy (which is compiled to Java) or Java. NOT JavaScript. Java != JavaScript. –  blah238 May 23 '13 at 0:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.