internal double CalculateZToleranceFromGeometry(com.epl.geometry.SpatialReference sr, com.epl.geometry.Geometry geometry) { com.epl.geometry.Envelope1D env1D = geometry.QueryInterval(com.epl.geometry.VertexDescription.Semantics.Z, 0); double tolerance = env1D._calculateToleranceFromEnvelope(); return(System.Math.Max(sr != null ? sr.GetTolerance(com.epl.geometry.VertexDescription.Semantics.Z) : 0, tolerance)); }
public virtual void Test_80() { com.epl.geometry.SpatialReference sr = com.epl.geometry.SpatialReference.Create(3857); NUnit.Framework.Assert.IsTrue(sr.GetID() == 3857); NUnit.Framework.Assert.IsTrue(sr.GetLatestID() == 3857); NUnit.Framework.Assert.IsTrue(sr.GetOldID() == 102100); NUnit.Framework.Assert.IsTrue(sr.GetTolerance() == 0.001); }
public virtual void Test() { com.epl.geometry.SpatialReference sr = com.epl.geometry.SpatialReference.Create(102100); NUnit.Framework.Assert.IsTrue(sr.GetID() == 102100); NUnit.Framework.Assert.IsTrue(sr.GetLatestID() == 3857); NUnit.Framework.Assert.IsTrue(sr.GetOldID() == 102100); NUnit.Framework.Assert.IsTrue(sr.GetTolerance() == 0.001); com.epl.geometry.SpatialReference sr84 = com.epl.geometry.SpatialReference.Create(4326); double tol84 = sr84.GetTolerance(); NUnit.Framework.Assert.IsTrue(System.Math.Abs(tol84 - 1e-8) < 1e-8 * 1e-8); }
internal static double CalculateToleranceFromGeometry(com.epl.geometry.SpatialReference sr, com.epl.geometry.Envelope2D env2D, bool bConservative) { double gtolerance = env2D._calculateToleranceFromEnvelope(); double stolerance = sr != null?sr.GetTolerance(com.epl.geometry.VertexDescription.Semantics.POSITION) : 0; if (bConservative) { gtolerance *= 4; stolerance *= 1.1; } return(System.Math.Max(stolerance, gtolerance)); }
internal static double CalculateZToleranceFromGeometry(com.epl.geometry.SpatialReference sr, com.epl.geometry.Geometry geometry, bool bConservative) { com.epl.geometry.Envelope1D env1D = geometry.QueryInterval(com.epl.geometry.VertexDescription.Semantics.Z, 0); double gtolerance = env1D._calculateToleranceFromEnvelope(); double stolerance = sr != null?sr.GetTolerance(com.epl.geometry.VertexDescription.Semantics.Z) : 0; if (bConservative) { gtolerance *= 4; stolerance *= 1.1; } return(System.Math.Max(stolerance, gtolerance)); }