Extract raster cells by polygon using Java ArcObjects

726
1
10-13-2011 07:08 AM
FrankMcLean
New Contributor III
Hi,

We have a national (US Lower 48) 30m grid raster and wish to overlay a polygon and get the raster cell values included.  We are having a terrible time getting anything to work.  I think we know we need to use Spatial Analyst, which is fine, but does anyone have working sample Java code which does this?  Ideally a few-liner that checks out the license, etc.  The raster would either live in an SDE or file geodatabase.  We're just getting a variety of unhelpful error messages whatever we try, e.g. 'Unspecified Error'.

On another note, providing our polygon is pretty small, should we expect reasonable performance?  We will be hosting our app locally to the data, to avoid network latency.

Thanks very much in advance to anyone who can help.

Frank
0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor
Frank,

I don't program in Java, may be others do but I think it would help if you post up your code so the Java gurus can have a look at it?

Duncan
0 Kudos