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.

Using the "IMultivariateOp.MLClassify" Method, it will create a field call "Count",which can be used for calculating area, as shown in the figure below:

MLClassify

But now I want to calculate the increase area of two rasters, for example a raster in "2000" year and "2013" year.

So I have to analyze the overlay, as shown in the figure below: The algorithm or the increasement

How do I execute this analysis in ArcObjects using C#?

Thanks very much.

share|improve this question
    
Welcome to GIS SE! I have made significant edits to the title and body of your post to clarify your question. If you feel that the essence of your question was not properly captured with these edits, feel free to edit your question as necessary. –  Conor Dec 11 '13 at 17:53
add comment

1 Answer 1

up vote 0 down vote accepted

Here is an approach:

  • Run the IMultivariateOp.MLClassify on year 2000 and year 2013 to create your 2 classification rasters, from your example they would have 9 classes.
  • Multiply your classified year 2000 raster by 10
  • Add your new, year 2000, raster to the 2013 classification raster. This gives the change between pixels so for example a final pixel of "72" would indicate it was originally 7 in 2000 and now 2 in 2013.

To be looking at change in the area specific to the overlay you would set the mask property in the IRasterAnalysisEnvironment Interface. Make sure you set that before you add the rasters.

share|improve this answer
    
Thank you very much for your response and it seems that you got the issue I launched,would you give some explanation about the "multiply by 10"? I mean that,even if we do this,it seems useless,or I haven't clearly describe my issue when posted? –  user2826759 Dec 12 '13 at 10:01
    
You are shifting the digit to the "left" so when you add the 2 rasters it's the coded combination that tells you exactly what has changed from what to what. If you did not then if you added the 2 classification rasters with your 9 classes then a final value for example of 8 does not say what changed from what, was it 3 to 5, 5 to 3, 4 to 4,7 to 1, 1 to 7....? –  Hornbydd Dec 12 '13 at 12:10
    
This approach works as you have less than 10 classes. –  Hornbydd Dec 12 '13 at 12:11
    
Yeah,thanks ,and this maybe a good ideal,but would you tell me that I must use the IRasterCursor to iterate the IPixelBlock? I have one more problem and I just can not work with this!!!!Thanks. –  user2826759 Dec 15 '13 at 16:55
    
I don't know why you would want to use the IRasterCursor you have not explained why you are even thinking about it? This sounds like you are mixing something else with this thread? May be you need to post another separate question? –  Hornbydd Dec 15 '13 at 18:36
show 1 more comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.