Hoppa till huvudinnehållet

Return statistics on featureSet attribute values

Kommentarer

6 kommentarer

  • Berend Veldkamp
    The QueryTask's OutStatistics is a list of all the statistics you need, and can be set as follows { New OutStatistic ("S_PRICE", "MAX_S_PRICE", StatisticType.Max), New OutStatistic ("S_PRICE", "MIN_S_PRICE", StatisticType.Min) } The first parameter is the actual fieldname that you want to run the stats on, the second one is the fieldname in the resulting featureset, and the third is the type of statistic. Add as many OutStatistic objects as you like to this list.

     

    This example will return a featureset with a single feature and attributes MAX_S_PRICE and MIN_S_PRICE.

     

    Supported statistic types are: Average, Count, Max, Min, StandardDeviation, Sum and Variance. Median seems not to be supported, I'm not sure if there is some kind of workaround for that.

     

     
    0
  • Permanently deleted user
    Thanks Berend.  So, how can I then get the newly created fields (MAX_S_PRICE, MIN_S_PRICE) attribute values?
    0
  • Permanently deleted user
    I'm also getting an error message that states :

     

    _img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000bqQR&feoid=Body&refid=0EMf2000000cZs6"_/_img_
    0
  • Berend Veldkamp
    That list should go directly into the QueryTask's OutStatistics property, which is a list of OutStatistic objects.

     

    Once you have the featureset, you can get the values in the same way you would read any attribute: featureset.Features.First.Attributes("MIN_S_PRICE")
    0
  • Permanently deleted user
    Thanks for the reply Berend.  I'm new to Geocortex and Workflows so your help is greatly appreciated.  Ok, I have placed the list directly into the QueryTask's OutStatistics property; however, I'm receiving an error from the QueryTask.  My QueryTask worked before entering the OutStatistics property.  Below is a screen shot of my QueryTask and the error message._img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000bqRA&feoid=Body&refid=0EMf2000000cZsB" _/_img_

     

    _img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000bqRA&feoid=Body&refid=0EMf2000000cZsG"_/_img_
    0
  • Berend Veldkamp
    That seems like a (network) problem with your ArcGIS Server, rather than a problem with the Query Task.
    0

Du måste logga in om du vill lämna en kommentar.