Select to view content in your preferred language

GeometryEngine max records/running out of memory

848
4
Jump to solution
06-12-2017 12:26 PM
LindaDunklee
Occasional Contributor

I am trying to use the Geometry Engine module to buffer a route and return all of the parcels that are within 300 feet of it.  I am using the geodesic buffer method and I get results every time, however, it is unreliable.  Sometimes I get 500, sometimes 1300, sometimes anywhere in between.  It is a large operation (dataset contains about 50,000 parcels).  The max record count on the parcel service has been increased from 1,000 to 5,000 to compensate, but it does not seem to be helping.  Is there any other client side method that would be more reliable?  I've attempted to use the asynchronous geometryEngine module but I'm having load errors because of what seems to be jquery?  End goal is I am trying to create a widget in my application that mimics some of the "select by location" features you would get from ArcMap, with intersects, buffer, etc.

Thanks!

0 Kudos
1 Solution

Accepted Solutions
ThomasSolow
Frequent Contributor

That's a warning, but it shouldn't stop anything from working.

What happens if you add a .then, like:

geometryEngineAsync.geodesicBuffer(geometry2, [distance], distanceUnits, true).then(function(results){
  console.log(results);
});

All of the geometry engine async methods return a promise, so the results need to be obtained by chaining a .then.

View solution in original post

4 Replies
ThomasSolow
Frequent Contributor

For any large operation like this I would recommend the geometry engine async.  That version of the geometry engine runs in another CPU core via a web worker, so it won't lock up the main thread.

It seems like you've tried that but run into some issues.  Can you post an abbreviated sample?  I wouldn't think jQuery would cause problems here.

I'm not aware of any upper limits, but 50,000 parcels does seem like a lot.  I would look for ways to make that number smaller, but I don't know what you're going for exactly.

0 Kudos
LindaDunklee
Occasional Contributor

The error I get when I try the async method is "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience."

It seems to be some sort of load error... 

 geometryEngineAsync.geodesicBuffer(geometry2, [distance], distanceUnits, true);

0 Kudos
ThomasSolow
Frequent Contributor

That's a warning, but it shouldn't stop anything from working.

What happens if you add a .then, like:

geometryEngineAsync.geodesicBuffer(geometry2, [distance], distanceUnits, true).then(function(results){
  console.log(results);
});

All of the geometry engine async methods return a promise, so the results need to be obtained by chaining a .then.

LindaDunklee
Occasional Contributor

That was my problem - it was running and I wasn't doing anything with the results.  Thank you!

0 Kudos