AnsweredAssumed Answered

Querying subset of large ArcGIS server dataset via REST

Question asked by maxler on Dec 10, 2015
Latest reply on Dec 13, 2015 by maxler

I'm currently set up as follows:

A large wetlands polygon dataset is stored in an arcgis.com account as a feature service (~395,000 polygons).

I'm using the Esri-leaflet javascript library in conjunction with leaflet to dynamically load polygons into my map by querying using the map bounds and limiting by zoom level (in order to avoid exceeding the feature limit). I set a minimum zoom level of 14 this purpose.

When I use a smaller dataset that is also stored on arcgis.com (~17,000 features) it works flawlessly but when I switch the URL to the larger dataset (~395,000) features it returns an empty dataset.

Here is a snippet of the working code with the "small" dataset test:

var wwi = L.esri.featureLayer("http://services.arcgis.com/F7DSX1DSNSiWmOqh/arcgis/rest/services/WAWFA_Small_test/FeatureServer/0",{
  precision: 4,
  style: function(feature){
  return {
  color: layerColorRamp(feature.properties,'wetlands','SP'),
  weight: 1.5,
  opacity: 1,
  fillOpacity: 0.7
  }
  },
  simplifyFactor: 0.3,
  minZoom: 14
}).addTo(map);

The large dataset uses this url: http://services.arcgis.com/F7DSX1DSNSiWmOqh/arcgis/rest/services/WAWFA_Large_test/FeatureServer/0

but should otherwise be identical. When I look at the network tab of Chrome's web tools, I see that the actual REST query looks like this:

http://services.arcgis.com/F7DSX1DSNSiWmOqh/arcgis/rest/services/WAWFA_Small_test/FeatureServer/0/query?returnGeometry=true&where=1%3D1&outSr=4326&outFields=*&inSr=4326&geometry=%7B%22xmin%22%3A-88.11035156249999%2C%22ymin%22%3A43.100982876188546%2C%22xmax%22%3A-88.08837890625%2C%22ymax%22%3A43.11702412135048%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&geometryPrecision=4&maxAllowableOffset=0.00003328443215608169&f=geojson

which produces a working geojson output but when I switch the prefix to http://services.arcgis.com/F7DSX1DSNSiWmOqh/arcgis/rest/services/WAWFA_Large_test/FeatureServer/0/ for the larger dataset I get an output like this:

{"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"features":[]}

Any ideas on why this might be happening and whether there is a way to address this?

Outcomes