Hi,
In a FeatureService query, to limit JSON export, I'd like to specify a geographic extent to filter out the result? With Top, Bottom, Left and Right extent coordinates (in decimal degrees). I guess it is possible but I wonder how...
Thanks
Solved! Go to Solution.
With Geometry Type set to Envelope, set the Input Geometry to something like this:
{xmin: -104, ymin: 35.6, xmax: -94.32, ymax: 41}
Just be sure to specify the Input Spatial Reference accordingly.
With Geometry Type set to Envelope, set the Input Geometry to something like this:
{xmin: -104, ymin: 35.6, xmax: -94.32, ymax: 41}
Just be sure to specify the Input Spatial Reference accordingly.
Thanks, it helped.
I had found the Query (Feature Service) which explains the geometry parameters. However, if you use WGS84 (WKID 4326) decimal degrees and you specify it in the Input Spatial Reference as 4326, the output is not as expected. It looks like the export is confused if the FeatureService spatial reference is different!
Instead, I used the Envelope with coordinates in the same Spatial Reference as the FeatureService and it did work. Although, it still exports 28,000+ features, thus exceeding the usual 2,000 features limit.
I am stuck again.
Vincent,
You can "page" through the records using resultOffset=2000 and resultRecordCount=2000. Your first query will need to use resultOffset=0 and subsequent queries you will have to increase the offset by 2000. Some server admins might consider this scraping. Hopefully, each query for 2000 records only ties up the server for a few seconds.
Bernie.