QueryParameters ReturnGeometry Not Honored

142
7
10-17-2017 05:30 PM
Highlighted
Occasional Contributor II

I have a feature service that contains polygons.  When I execute a query using QueryFeaturesAsync with QueryParameters that sets the ReturnGeometry = false I get an error:  "Error performing query operation".

If I do the same query using the REST API, I get the same error, unless I switch the query to not return geometries.

We tracked this down because only certain queries will cause this issue.  We think it has something to do with the shapes (maybe the # of vertices or true curves), but have not nailed it down yet.

The issue though is that even for the queries that work, the return features still have the geometries, although the flag was set the false.  This makes me think the flag is not being honored.

Anyone else see this issue?

Reply
0 Kudos
7 Replies
Highlighted
Occasional Contributor III

Hello Chad,

Two questions: What version on Quartz are you using? 

Are you using Manual Cache and using PopulateFromServiceAsync() to populate the data?

--Preeti

Reply
0 Kudos
Highlighted
Occasional Contributor II

v100.1

Not using PopulateFromServiceAsync(), using QueryFeaturesAsync on the feature table.

I can try that approach and let you know if you'd like.

Reply
0 Kudos
Highlighted
Occasional Contributor III

Ya, sure, try that 

Reply
0 Kudos
Highlighted
Occasional Contributor II

Pretti, that worked, and no geometry was returned.  I'll just have to code to handle online/offline a bit differently.

I did notice the results returned almost immediately using this approach vs. just calling QueryFeaturesAsync().  Is that expected?  Is the the most efficient way to query an online service?

Thanks.

Reply
0 Kudos
Highlighted
Occasional Contributor III

>"The issue though is that even for the queries that work, the return features still have the geometries, although the flag was set the false.  This makes me think the flag is not being honored."

This should not happen, I will look into it.

>I did notice the results returned almost immediately using this approach vs. just calling QueryFeaturesAsync().  Is that expected?  Is the the most efficient way to query an online service?

Well, that also should not happen, the response time should be same. Although with ManualCache, subsequent layer operations will be little faster as there is no http traffic to fetch the more data. 

Is it possible to share the service end point? Also share the code snippet that didn't work. I will give a closer look and let you know.

Reply
0 Kudos
Highlighted
Occasional Contributor II

Can I email you directly with this information?

Reply
0 Kudos
Highlighted
Occasional Contributor III

Sure, email me at pmaske@esri.com

Reply
0 Kudos