internal OperatorClipCursor(com.epl.geometry.GeometryCursor geoms, com.epl.geometry.Envelope2D envelope, com.epl.geometry.SpatialReference spatial_ref, com.epl.geometry.ProgressTracker progress_tracker)
 {
     m_index = -1;
     if (geoms == null)
     {
         throw new System.ArgumentException();
     }
     m_envelope            = envelope;
     m_inputGeometryCursor = geoms;
     m_spatialRefImpl      = (com.epl.geometry.SpatialReferenceImpl)spatial_ref;
     m_tolerance           = com.epl.geometry.InternalUtils.CalculateToleranceFromGeometry(spatial_ref, envelope, false);
 }
        /// <summary>Indicates if one geometry overlaps another geometry.</summary>
        /// <remarks>
        /// Indicates if one geometry overlaps another geometry.
        /// See OperatorOverlaps.
        /// </remarks>
        /// <param name="geometry1">The geometry to overlap.</param>
        /// <param name="geometry2">The geometry to be overlapped.</param>
        /// <param name="spatialReference">The spatial reference of the geometries.</param>
        /// <returns>TRUE if geometry1 overlaps geometry2.</returns>
        public static bool Overlaps(com.epl.geometry.Geometry geometry1, com.epl.geometry.Geometry geometry2, com.epl.geometry.SpatialReference spatialReference)
        {
            com.epl.geometry.OperatorOverlaps op = (com.epl.geometry.OperatorOverlaps)factory.GetOperator(com.epl.geometry.Operator.Type.Overlaps);
            bool result = op.Execute(geometry1, geometry2, spatialReference, null);

            return(result);
        }
        /// <summary>Calculates the 2D planar distance between two geometries.</summary>
        /// <remarks>
        /// Calculates the 2D planar distance between two geometries.
        /// See OperatorDistance.
        /// </remarks>
        /// <param name="geometry1">Geometry.</param>
        /// <param name="geometry2">Geometry.</param>
        /// <param name="spatialReference">
        /// The spatial reference of the geometries. This parameter is not
        /// used and can be null.
        /// </param>
        /// <returns>The distance between the two geometries.</returns>
        public static double Distance(com.epl.geometry.Geometry geometry1, com.epl.geometry.Geometry geometry2, com.epl.geometry.SpatialReference spatialReference)
        {
            com.epl.geometry.OperatorDistance op = (com.epl.geometry.OperatorDistance)factory.GetOperator(com.epl.geometry.Operator.Type.Distance);
            double result = op.Execute(geometry1, geometry2, null);

            return(result);
        }
        /// <summary>See OperatorDisjoint.</summary>
        public static bool Disjoint(com.epl.geometry.Geometry geometry1, com.epl.geometry.Geometry geometry2, com.epl.geometry.SpatialReference spatialReference)
        {
            com.epl.geometry.OperatorDisjoint op = (com.epl.geometry.OperatorDisjoint)factory.GetOperator(com.epl.geometry.Operator.Type.Disjoint);
            bool result = op.Execute(geometry1, geometry2, spatialReference, null);

            return(result);
        }
 /// <summary>Creates a geometry through intersection between two geometries.</summary>
 /// <remarks>
 /// Creates a geometry through intersection between two geometries.
 /// See OperatorIntersection.
 /// </remarks>
 /// <param name="geometry1">The first geometry.</param>
 /// <param name="intersector">The geometry to intersect the first geometry.</param>
 /// <param name="spatialReference">The spatial reference of the geometries.</param>
 /// <returns>The geometry created through intersection.</returns>
 public static com.epl.geometry.Geometry Intersect(com.epl.geometry.Geometry geometry1, com.epl.geometry.Geometry intersector, com.epl.geometry.SpatialReference spatialReference)
 {
     com.epl.geometry.OperatorIntersection op     = (com.epl.geometry.OperatorIntersection)factory.GetOperator(com.epl.geometry.Operator.Type.Intersection);
     com.epl.geometry.Geometry             result = op.Execute(geometry1, intersector, spatialReference, null);
     return(result);
 }
Example #6
0
 /// <summary>Creates offset version of the input geometries.</summary>
 /// <remarks>
 /// Creates offset version of the input geometries.
 /// The offset operation creates a geometry that is a constant distance from
 /// an input polyline or polygon. It is similar to buffering, but produces a
 /// one sided result. If offsetDistance &gt; 0, then the offset geometry is
 /// constructed to the right of the oriented input geometry, otherwise it is
 /// constructed to the left. For a simple polygon, the orientation of outer
 /// rings is clockwise and for inner rings it is counter clockwise. So the
 /// "right side" of a simple polygon is always its inside. The bevelRatio is
 /// multiplied by the offset distance and the result determines how far a
 /// mitered offset intersection can be from the input curve before it is
 /// beveled.
 /// </remarks>
 /// <param name="inputGeometries">
 /// The geometries to calculate offset for. Point and MultiPoint
 /// are not supported.
 /// </param>
 /// <param name="sr">The SpatialReference of the Geometries.</param>
 /// <param name="distance">The offset distance for the Geometries.</param>
 /// <param name="joins">The join type of the offset geometry.</param>
 /// <param name="bevelRatio">
 /// The ratio used to produce a bevel join instead of a miter join
 /// (used only when joins is Miter)
 /// </param>
 /// <param name="flattenError">
 /// The maximum distance of the resulting segments compared to the
 /// true circular arc (used only when joins is Round). If
 /// flattenError is 0, tolerance value is used. Also, the
 /// algorithm never produces more than around 180 vertices for
 /// each round join.
 /// </param>
 /// <returns>Returns the result of the offset operation.</returns>
 public abstract com.epl.geometry.GeometryCursor Execute(com.epl.geometry.GeometryCursor inputGeometries, com.epl.geometry.SpatialReference sr, double distance, com.epl.geometry.OperatorOffset.JoinType joins, double bevelRatio, double flattenError, com.epl.geometry.ProgressTracker
                                                         progressTracker);
 /// <summary>Creates the difference of two geometries.</summary>
 /// <remarks>
 /// Creates the difference of two geometries. The dimension of geometry2 has
 /// to be equal to or greater than that of geometry1.
 /// See OperatorDifference.
 /// </remarks>
 /// <param name="geometry1">The geometry being subtracted.</param>
 /// <param name="substractor">The geometry object to subtract from.</param>
 /// <param name="spatialReference">The spatial reference of the geometries.</param>
 /// <returns>The geometry of the differences.</returns>
 public static com.epl.geometry.Geometry Difference(com.epl.geometry.Geometry geometry1, com.epl.geometry.Geometry substractor, com.epl.geometry.SpatialReference spatialReference)
 {
     com.epl.geometry.OperatorDifference op     = (com.epl.geometry.OperatorDifference)factory.GetOperator(com.epl.geometry.Operator.Type.Difference);
     com.epl.geometry.Geometry           result = op.Execute(geometry1, substractor, spatialReference, null);
     return(result);
 }
        public override bool IsSimpleOGC(com.epl.geometry.Geometry geom, com.epl.geometry.SpatialReference spatialRef, bool bForceTest, com.epl.geometry.NonSimpleResult result, com.epl.geometry.ProgressTracker progressTracker)
        {
            int res = com.epl.geometry.OperatorSimplifyLocalHelper.IsSimpleOGC(geom, spatialRef, bForceTest, result, progressTracker);

            return(res > 0);
        }
 public override com.epl.geometry.Geometry Execute(com.epl.geometry.Geometry geom, com.epl.geometry.SpatialReference spatialRef, bool bForceSimplify, com.epl.geometry.ProgressTracker progressTracker)
 {
     com.epl.geometry.SimpleGeometryCursor inputCursor  = new com.epl.geometry.SimpleGeometryCursor(geom);
     com.epl.geometry.GeometryCursor       outputCursor = Execute(inputCursor, spatialRef, bForceSimplify, progressTracker);
     return(outputCursor.Next());
 }
		public override com.epl.geometry.Geometry Execute(com.epl.geometry.Geometry inputGeometry, com.epl.geometry.SpatialReference sr, int curveType, double distanceMeters, double maxDeviationMeters, bool bReserved, com.epl.geometry.ProgressTracker progressTracker)
		{
			throw new com.epl.geometry.GeometryException("not implemented");
		}
 public override com.epl.geometry.GeometryCursor Execute(com.epl.geometry.GeometryCursor geoms, com.epl.geometry.SpatialReference spatialRef, bool bForceSimplify, com.epl.geometry.ProgressTracker progressTracker)
 {
     return(new com.epl.geometry.OperatorSimplifyCursorOGC(geoms, spatialRef, bForceSimplify, progressTracker));
 }
Example #12
0
 public override bool Execute(com.epl.geometry.Geometry inputGeom1, com.epl.geometry.Geometry inputGeom2, com.epl.geometry.SpatialReference sr, string scl, com.epl.geometry.ProgressTracker progress_tracker)
 {
     return(com.epl.geometry.RelationalOperationsMatrix.Relate(inputGeom1, inputGeom2, sr, scl, progress_tracker));
 }
Example #13
0
 public OGCConcreteGeometryCollection(com.epl.geometry.ogc.OGCGeometry geom, com.epl.geometry.SpatialReference sr)
 {
     geometries = new System.Collections.Generic.List <com.epl.geometry.ogc.OGCGeometry>(1);
     geometries.Add(geom);
     esriSR = sr;
 }
Example #14
0
 public OGCConcreteGeometryCollection(System.Collections.Generic.IList <com.epl.geometry.ogc.OGCGeometry> geoms, com.epl.geometry.SpatialReference sr)
 {
     geometries = geoms;
     esriSR     = sr;
 }
 internal OperatorOffsetCursor(com.epl.geometry.GeometryCursor inputGeometries, com.epl.geometry.SpatialReference sr, double distance, com.epl.geometry.OperatorOffset.JoinType joins, double bevelRatio, double flattenError, com.epl.geometry.ProgressTracker progressTracker)
 {
     m_index            = -1;
     m_inputGeoms       = inputGeometries;
     m_spatialReference = (com.epl.geometry.SpatialReferenceImpl)sr;
     m_distance         = distance;
     m_joins            = joins;
     m_miterLimit       = bevelRatio;
     m_flattenError     = flattenError;
     m_progressTracker  = progressTracker;
 }
Example #16
0
 public override bool Execute(com.epl.geometry.Geometry inputGeom1, com.epl.geometry.Geometry inputGeom2, com.epl.geometry.SpatialReference sr, com.epl.geometry.ProgressTracker progressTracker)
 {
     return(com.epl.geometry.RelationalOperations.Relate(inputGeom1, inputGeom2, sr, com.epl.geometry.RelationalOperations.Relation.within, progressTracker));
 }
 /// <summary>Same as above, but works with a single geometry.</summary>
 public abstract com.epl.geometry.Geometry Execute(com.epl.geometry.Geometry geom, double maxSegmentLengthMeters, com.epl.geometry.SpatialReference sr, int curveType, com.epl.geometry.ProgressTracker progressTracker);
Example #18
0
        internal static string GetJSonStringFromGeometry(com.epl.geometry.Geometry geomIn, com.epl.geometry.SpatialReference sr)
        {
            string jsonStr4Geom = com.epl.geometry.GeometryEngine.GeometryToJson(sr, geomIn);
            string jsonStrNew   = "{\"geometryType\":\"" + GetGeometryType(geomIn) + "\",\"geometries\":[" + jsonStr4Geom + "]}";

            return(jsonStrNew);
        }
 /// <summary>Constructs a new geometry by union an array of geometries.</summary>
 /// <remarks>
 /// Constructs a new geometry by union an array of geometries. All inputs
 /// must be of the same type of geometries and share one spatial reference.
 /// See OperatorUnion.
 /// </remarks>
 /// <param name="geometries">The geometries to union.</param>
 /// <param name="spatialReference">The spatial reference of the geometries.</param>
 /// <returns>The geometry object representing the resultant union.</returns>
 public static com.epl.geometry.Geometry Union(com.epl.geometry.Geometry[] geometries, com.epl.geometry.SpatialReference spatialReference)
 {
     com.epl.geometry.OperatorUnion        op = (com.epl.geometry.OperatorUnion)factory.GetOperator(com.epl.geometry.Operator.Type.Union);
     com.epl.geometry.SimpleGeometryCursor inputGeometries = new com.epl.geometry.SimpleGeometryCursor(geometries);
     com.epl.geometry.GeometryCursor       result          = op.Execute(inputGeometries, spatialReference, null);
     return(result.Next());
 }
Example #20
0
 /// <summary>Performs the Topological Difference operation on the two geometries.</summary>
 /// <param name="inputGeometry">
 /// is the Geometry instance on the left hand side of the
 /// subtraction.
 /// </param>
 /// <param name="subtractor">is the Geometry on the right hand side being subtracted.</param>
 /// <returns>Returns the result of subtraction.</returns>
 public abstract com.epl.geometry.Geometry Execute(com.epl.geometry.Geometry inputGeometry, com.epl.geometry.Geometry subtractor, com.epl.geometry.SpatialReference sr, com.epl.geometry.ProgressTracker progressTracker);
 /// <summary>Creates the symmetric difference of two geometries.</summary>
 /// <remarks>
 /// Creates the symmetric difference of two geometries.
 /// See OperatorSymmetricDifference.
 /// </remarks>
 /// <param name="leftGeometry">is one of the Geometry instances in the XOR operation.</param>
 /// <param name="rightGeometry">is one of the Geometry instances in the XOR operation.</param>
 /// <param name="spatialReference">The spatial reference of the geometries.</param>
 /// <returns>Returns the result of the symmetric difference.</returns>
 public static com.epl.geometry.Geometry SymmetricDifference(com.epl.geometry.Geometry leftGeometry, com.epl.geometry.Geometry rightGeometry, com.epl.geometry.SpatialReference spatialReference)
 {
     com.epl.geometry.OperatorSymmetricDifference op = (com.epl.geometry.OperatorSymmetricDifference)factory.GetOperator(com.epl.geometry.Operator.Type.SymmetricDifference);
     com.epl.geometry.Geometry result = op.Execute(leftGeometry, rightGeometry, spatialReference, null);
     return(result);
 }
 /// <summary>Performs the Topological Union operation on the geometry set.</summary>
 /// <param name="inputGeometries">is the set of Geometry instances to be unioned.</param>
 public abstract com.epl.geometry.GeometryCursor Execute(com.epl.geometry.GeometryCursor inputGeometries, com.epl.geometry.SpatialReference sr, com.epl.geometry.ProgressTracker progressTracker);
 /// <summary>
 /// Constructs the set-theoretic intersection between an array of geometries
 /// and another geometry.
 /// </summary>
 /// <remarks>
 /// Constructs the set-theoretic intersection between an array of geometries
 /// and another geometry.
 /// See OperatorIntersection (also for dimension specific intersection).
 /// </remarks>
 /// <param name="inputGeometries">An array of geometry objects.</param>
 /// <param name="geometry">The geometry object.</param>
 /// <returns>Any array of geometry objects showing the intersection.</returns>
 internal static com.epl.geometry.Geometry[] Intersect(com.epl.geometry.Geometry[] inputGeometries, com.epl.geometry.Geometry geometry, com.epl.geometry.SpatialReference spatialReference)
 {
     com.epl.geometry.OperatorIntersection op = (com.epl.geometry.OperatorIntersection)factory.GetOperator(com.epl.geometry.Operator.Type.Intersection);
     com.epl.geometry.SimpleGeometryCursor inputGeometriesCursor = new com.epl.geometry.SimpleGeometryCursor(inputGeometries);
     com.epl.geometry.SimpleGeometryCursor intersectorCursor     = new com.epl.geometry.SimpleGeometryCursor(geometry);
     com.epl.geometry.GeometryCursor       result = op.Execute(inputGeometriesCursor, intersectorCursor, spatialReference, null);
     System.Collections.Generic.List <com.epl.geometry.Geometry> resultGeoms = new System.Collections.Generic.List <com.epl.geometry.Geometry>();
     com.epl.geometry.Geometry g;
     while ((g = result.Next()) != null)
     {
         resultGeoms.Add(g);
     }
     com.epl.geometry.Geometry[] resultarr = resultGeoms.ToArray();
     return(resultarr);
 }
 /// <summary>Performs the Topological Union operation on two geometries.</summary>
 /// <param name="geom1">and geom2 are the geometry instances to be unioned.</param>
 public abstract com.epl.geometry.Geometry Execute(com.epl.geometry.Geometry geom1, com.epl.geometry.Geometry geom2, com.epl.geometry.SpatialReference sr, com.epl.geometry.ProgressTracker progressTracker);
        /// <summary>Indicates if one geometry is within another geometry.</summary>
        /// <remarks>
        /// Indicates if one geometry is within another geometry.
        /// See OperatorWithin.
        /// </remarks>
        /// <param name="geometry1">
        /// The base geometry that is tested for within relationship to
        /// the other geometry.
        /// </param>
        /// <param name="geometry2">
        /// The comparison geometry that is tested for the contains
        /// relationship to the other geometry.
        /// </param>
        /// <param name="spatialReference">The spatial reference of the geometries.</param>
        /// <returns>TRUE if the first geometry is within the other geometry.</returns>
        public static bool Within(com.epl.geometry.Geometry geometry1, com.epl.geometry.Geometry geometry2, com.epl.geometry.SpatialReference spatialReference)
        {
            com.epl.geometry.OperatorWithin op = (com.epl.geometry.OperatorWithin)factory.GetOperator(com.epl.geometry.Operator.Type.Within);
            bool result = op.Execute(geometry1, geometry2, spatialReference, null);

            return(result);
        }
Example #26
0
 public override com.epl.geometry.Geometry FoldInto360RangeGeodetic(com.epl.geometry.Geometry _geom, com.epl.geometry.SpatialReference pannableSR, int curveType)
 {
     /* const */
     /* const */
     /* GeodeticCurveType */
     throw new com.epl.geometry.GeometryException("not implemented");
 }
        /// <summary>Indicates if the given relation holds for the two geometries.</summary>
        /// <remarks>
        /// Indicates if the given relation holds for the two geometries.
        /// See OperatorRelate.
        /// </remarks>
        /// <param name="geometry1">The first geometry for the relation.</param>
        /// <param name="geometry2">The second geometry for the relation.</param>
        /// <param name="spatialReference">The spatial reference of the geometries.</param>
        /// <param name="relation">The DE-9IM relation.</param>
        /// <returns>TRUE if the given relation holds between geometry1 and geometry2.</returns>
        public static bool Relate(com.epl.geometry.Geometry geometry1, com.epl.geometry.Geometry geometry2, com.epl.geometry.SpatialReference spatialReference, string relation)
        {
            com.epl.geometry.OperatorRelate op = (com.epl.geometry.OperatorRelate)factory.GetOperator(com.epl.geometry.Operator.Type.Relate);
            bool result = op.Execute(geometry1, geometry2, spatialReference, relation, null);

            return(result);
        }
Example #28
0
 public override com.epl.geometry.Geometry FoldInto360Range(com.epl.geometry.Geometry geom, com.epl.geometry.SpatialReference pannableSR)
 {
     /* const */
     /* const */
     throw new com.epl.geometry.GeometryException("not implemented");
 }
 /// <summary>Calculates the clipped geometry from a target geometry using an envelope.</summary>
 /// <remarks>
 /// Calculates the clipped geometry from a target geometry using an envelope.
 /// See OperatorClip.
 /// </remarks>
 /// <param name="geometry">The geometry to be clipped.</param>
 /// <param name="envelope">The envelope used to clip.</param>
 /// <param name="spatialReference">The spatial reference of the geometries.</param>
 /// <returns>The geometry created by clipping.</returns>
 public static com.epl.geometry.Geometry Clip(com.epl.geometry.Geometry geometry, com.epl.geometry.Envelope envelope, com.epl.geometry.SpatialReference spatialReference)
 {
     com.epl.geometry.OperatorClip op     = (com.epl.geometry.OperatorClip)factory.GetOperator(com.epl.geometry.Operator.Type.Clip);
     com.epl.geometry.Geometry     result = op.Execute(geometry, com.epl.geometry.Envelope2D.Construct(envelope.GetXMin(), envelope.GetYMin(), envelope.GetXMax(), envelope.GetYMax()), spatialReference, null);
     return(result);
 }
Example #30
0
 /// <summary>Performs the Shape Preserving Densify operation on the geometry.</summary>
 /// <remarks>
 /// Performs the Shape Preserving Densify operation on the geometry. Attributes are interpolated along the scalar t-values of the input segments obtained from the length ratios along the densified
 /// segments.
 /// </remarks>
 /// <param name="geom">The geometry to be densified.</param>
 /// <param name="sr">The spatial reference of the geometry.</param>
 /// <param name="maxLengthMeters">The maximum segment length allowed. Must be a positive value to be used. Pass zero or NaN to disable densification by length.</param>
 /// <param name="maxDeviationMeters">The maximum deviation. Must be a positive value to be used. Pass zero or NaN to disable densification by deviation.</param>
 /// <param name="reserved">Must be 0 or NaN. Reserved for future use. Throws and exception if not NaN or 0.</param>
 /// <returns>
 /// Returns the densified geometries (It does nothing to geometries with dim less than 1, but simply passes them along).
 /// The operation always starts from the lowest point on the segment, thus guaranteeing that topologically equal segments are always densified exactly the same.
 /// </returns>
 public abstract com.epl.geometry.Geometry Execute(com.epl.geometry.Geometry geom, com.epl.geometry.SpatialReference sr, double maxLengthMeters, double maxDeviationMeters, double reserved, com.epl.geometry.ProgressTracker progressTracker);