Can I create a query to count features with/without geometry?

816
1
Jump to solution
04-05-2021 11:59 PM
LarsFagerbakke
New Contributor III

I currently have a total count like this:

query?f=json&9999=9999&returnCountOnly=true

But is it possible to count the features with or without geometry? One or the other as I have the total count.

 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Yes! There should be an internal field named "SHAPE_Area" or similar. Just set the where clause to "SHAPE_Area is null / not null".

Here's an example from on of our layers:

https://maps.co.kendall.il.us/server/rest/services/Hosted/Current_Cadastral_Features/FeatureServer/0...

Which returns

{"count":9} 
- Josh Carlson
Kendall County GIS

View solution in original post

1 Reply
jcarlson
MVP Esteemed Contributor

Yes! There should be an internal field named "SHAPE_Area" or similar. Just set the where clause to "SHAPE_Area is null / not null".

Here's an example from on of our layers:

https://maps.co.kendall.il.us/server/rest/services/Hosted/Current_Cadastral_Features/FeatureServer/0...

Which returns

{"count":9} 
- Josh Carlson
Kendall County GIS