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– blah2382014年02月20日 17:30:24 +00:00Commented Feb 20, 2014 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– shika-kun2014年02月21日 08:07:23 +00:00Commented Feb 21, 2014 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– blah2382014年02月21日 17:43:01 +00:00Commented Feb 21, 2014 at 17:43
-
done. Though I guess I already answered it.shika-kun– shika-kun2014年02月22日 15:07:40 +00:00Commented Feb 22, 2014 at 15:07
2 Answers 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.
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.
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.
Explore related questions
See similar questions with these tags.