POST
|
Yue, I think we've gotten a little far from what I was originally trying to do, sorry. I'm trying to count the total area for specific values (52 and 71) within the a county geometry. Originally I tried to find a way just to count the amount of pixels (I know each pixel is 30 meters) that is returned after I've clipped the image to the shape of the county. So right now I have a clipped image in the shape of a given county and I've filtered the values so that only 52 and 71 appear. I'm just stuck on how to find the area of the image that is showing (after the filter and clipping) inside a selected county. Here's a image of what I'm trying to accomplish: (The green area is the image I'd like to find the area of, ignore the red overlay) And if it helps the code for this project is on my github here although it's getting very long the important raster/image service stuff is along line 195. Thank you!
... View more
03-02-2016
03:23 PM
|
0
|
0
|
558
|
POST
|
Yue, Sorry for the confusion but I've actually meant I'm using the ImageServiceMeasureTask, which I assume can use the same parameter object. What I'm having trouble with is when the user selects a county of the state I'd like to know the total area of the raster (with certain values) within that county. So I'm trying to use the "fromGeometry" property of ImageServiceMeasureParameters by handing it the county's geometry. And right now the query fails with an error "unable to complete operation". I assume this is because I'm just not getting the parameter fields correctly? Thanks for the help.
... View more
03-02-2016
11:14 AM
|
0
|
2
|
558
|
POST
|
Yue, Thanks for the reply! The sample code does help, I'll work on integrating it into my own and I'll mark this question solved once I've gotten it working.
... View more
03-02-2016
10:49 AM
|
0
|
0
|
558
|
POST
|
Hello, I've been trying to measure the total area of a given raster from a clipped geometry (specifically a selected county), and I've been thinking that ImageServiceMeasureTask is what I need to use. My problem is I have no idea how to setup the ImageServiceMeasureParameters object to work with the image service I'm using. And I can not find any examples anywhere for either the task or the parameter so any help would be greatly appreciated. Here's the relevant javascript and the URL to the image service I'm using. var imageMeasureTask = new ImageServiceMeasureTask(rasterURL); imageServiceMeasureParams = new ImageServiceMeasureParameters(); imageServiceMeasureParams.fromGeometry = evt.graphic.geometry; imageMeasureTask.execute(imageServiceMeasureParams, success, failure);
... View more
02-29-2016
02:37 PM
|
0
|
9
|
2711
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|