Feature Count Within Geometry in QML

2603
1
Jump to solution
09-02-2015 11:53 AM
KK2014
by
New Contributor III

Hi,

I have GeodatabaseFeatureServiceTable and point  FeatureLayer like below and I have geometry(ex:map extent), how can I find point feature count within that geometry.

   FeatureLayer

{

   id:featureLayer
   featureTable: geodatabaseTable

}

   GeodatabaseFeatureServiceTable

{

id:geodatabaseTable

url:"http://..................................................../MapServer/0"

}

Thanks for help.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

KK-

You should query the feature table, either with queryds or queryFeatures ArcGIS Runtime SDK for Qt QML API: FeatureTable Class Reference .

Both of these methods require you pass in a Query object ArcGIS Runtime SDK for Qt QML API: Query Class Reference. If you want all features within that geometry, make sure to set the where clause to "1=1" to get everything. If you just want a subset, specify your own SQL query. Make sure to set the spatialRelationship that you want (within, intersects, overlaps, etc), and this is what will filter based on geometry ArcGIS Runtime SDK for Qt QML API: Enums Class Reference

This will return a FeatureResult, which has a feature count ArcGIS Runtime SDK for Qt QML API: FeatureResult Class Reference

Thanks,

Luke

View solution in original post

1 Reply
LucasDanzinger
Esri Frequent Contributor

KK-

You should query the feature table, either with queryds or queryFeatures ArcGIS Runtime SDK for Qt QML API: FeatureTable Class Reference .

Both of these methods require you pass in a Query object ArcGIS Runtime SDK for Qt QML API: Query Class Reference. If you want all features within that geometry, make sure to set the where clause to "1=1" to get everything. If you just want a subset, specify your own SQL query. Make sure to set the spatialRelationship that you want (within, intersects, overlaps, etc), and this is what will filter based on geometry ArcGIS Runtime SDK for Qt QML API: Enums Class Reference

This will return a FeatureResult, which has a feature count ArcGIS Runtime SDK for Qt QML API: FeatureResult Class Reference

Thanks,

Luke

View solution in original post