geometryEngine - tolerance (intersect in this case)

1013
3
07-02-2021 12:27 AM
Oyvind
by
New Contributor II

Hi,

due to small differences in input data, I need to be able to control the tolerance on certain operations. As far as I understand, the tolerance is determined by the geometry's spatial reference.

Is it possible to get around this somehow ?

 

Also, when trying to call geometryEngine.extendedSpatialReferenceInfo() (to get tolerance information), I get the following error (note: the SpatialReference object is constructed from wkid = 4230)

 

 

geometryEngineBase.js:5 Uncaught (in promise) TypeError: Cannot read property 'xc' of null
at Function.a [as extendedSpatialReferenceInfo] (geometryEngineBase.js:5)
at Module.t (geometryEngine.js:5)
.......

 

 

0 Kudos
3 Replies
KenBuja
MVP Esteemed Contributor

How are you calling that method? When testing in one of the samples, it works correctly. Insert the following at line 191 to check it out.

console.log(geometryEngine.extendedSpatialReferenceInfo(point.spatialReference));
Oyvind
by
New Contributor II

Hi, sorry for delayed reply (vacation).

 

Yeah, that's the way I'm calling it (there is no other way..). Note that we're using TypeScript (in a React App), via @arcgis/core, so it could be an anomaly due to that.

0 Kudos
Oyvind
by
New Contributor II

Tested with a dummy example using web-mercator (wkid = 102100), and it works like expected. In my case I'm using ED50 (wkid = 4230), which fails with the error above.

 

A multitude of the geometryEngine functions states that they only support WGS84 (4326) and Web Mercator (102113, 102100, 3857), so perhaps this is the case here too. In other words, the tolerance is unknown or a default value somewhere.

 

 

 

0 Kudos