3

Is there a way in ArcMap plugin to make Summarize-function like functionality programmatically?

There is a feature layer, lets say Building, And it has fields like OID, FloorNumber, Color, Height etc... So I want summary like:

Floors TotalHeight Heightest 
3      120         20 ( 4 floor buildings in total have 120 meters height ) 
4      ...         ...
  • Can you give an example of what your inputs and outputs might look like? – blah238 Feb 20 '14 at 17:30
  • Well, there is a feature layer, lets say Building, And it has fields like OID, FloorNumber, Color, Height etc... So I want summary like: Floors TotalHeight Heightest 3 120 20 ( 4 floor buildings in total have 120 meters height ) 4 ... ... – shika-kun Feb 21 '14 at 8:07
  • Please edit your question to add this information. The comments are very limited in length and formatting capabilities and it's easier for everyone if all the relevant information is contained within the question body itself. – blah238 Feb 21 '14 at 17:43
  • done. Though I guess I already answered it. – shika-kun Feb 22 '14 at 15:07
2

It sounds like you are looking for the IDataStatistics interface. You can pass it an ITable reference in the form of a search cursor (with query filter applied) to return a BaseStatistics object via the IStatisticsResults interface.

IDataStatistics Help Link

If you are looking for some more advanced statistics then you might want to try using StatDescriptive.dll, you can get it here and reference it in your c# project:

Link to Stat Class on Code Project

There is a good tutorial there on how to use the class. You'll just need to convert the values from your table into a double array first which should be pretty easy.

0

IFilterQueryDefinition allows GROUP BY and ORDER BY in postfix, I guess you can try to write your own statistics, but it has limitations on ArcIS version and data types behind the scene. Will try to implement this one, but I don't think it is the right way to do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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