POST
|
Hi, We will add a “Intersect 3D Line With Multipatch” method to Geometry Engine in a future release. Thanks for the suggestion. Annette
... View more
07-14-2025
01:54 PM
|
0
|
0
|
283
|
POST
|
Hi Bill, I have reached out to a colleague who knows more about this than I do to answer your question. You should be hearing from her soon. Annette
... View more
05-27-2025
09:54 AM
|
0
|
2
|
391
|
IDEA
|
There are two new methods. IReadOnlyList<MapPoint> QueryPoints(Segment segment, SegmentExtensionType extensionType, IEnumerable<double> distancesAlongCurve, AsRatioOrLength asRatioOrLength) IReadOnlyList<MapPoint> QueryPoints(Multipart multipart, SegmentExtensionType extensionType, IEnumerable<double> distancesAlongCurve, AsRatioOrLength asRatioOrLength)
... View more
05-22-2025
02:08 PM
|
0
|
0
|
328
|
IDEA
|
Hi, This functionality has been added to the next release which is 3.5.
... View more
04-14-2025
03:17 PM
|
0
|
0
|
453
|
POST
|
It is a bug in GeometryEngine, and the fix will be in the next release. Fortunately, you have the workaround in the meantime. Thank you for reporting this issue. Annette
... View more
03-04-2025
02:28 PM
|
0
|
0
|
553
|
POST
|
Hi Radek, I am able to reproduce this and have identified the problem. The fix will be in a future release. Thank you for reporting it. Annette
... View more
02-21-2025
11:20 AM
|
1
|
1
|
365
|
IDEA
|
Eugene, thank you for the suggestion. The Relation method will be added to ArcPy in a future release.
... View more
01-08-2025
12:41 PM
|
0
|
0
|
452
|
IDEA
|
By definition, if two polylines cross, then they don't touch and vice versa. Here's how it works. The interior of a polyline is the set of points in the polyline that are not start or end points of a path. If the intersection of the interiors is empty, but the intersection of the polylines is not empty (they intersect only at start or end points of a path), then the polylines touch. Two polylines cross if they meet at points only, and at least one of the shared points is internal to both polylines. See https://github.com/ArcGIS/arcgis-pro-sdk/wiki/ProConcepts-Geometry#predefined-relational-operations For your case, you can use the Relation operator. See https://developers.arcgis.com/python/latest/api-reference/arcgis.geometry.html#relation
... View more
01-02-2025
10:21 AM
|
0
|
0
|
501
|
IDEA
|
Hi, We will add it in the next release. Thank you for the suggestion. Annette
... View more
04-22-2024
09:35 AM
|
0
|
0
|
911
|
POST
|
Hi, This will be fixed in the ArcGIS Pro 3.3. Annette
... View more
01-08-2024
03:47 PM
|
0
|
0
|
562
|
POST
|
If you set HasZ = true in the builder, then all start and end points will have the HasZ property set to true too. Here is some code to set the z-values in the points while still preserving the curve segments. ///////////////////////////////// LineSegment line = LineBuilderEx.CreateLineSegment(new Coordinate2D(0, 0), new Coordinate2D(3, 3)); MapPoint start = MapPointBuilderEx.CreateMapPoint(3, 3); MapPoint end = MapPointBuilderEx.CreateMapPoint(7, 3); Coordinate2D center = new Coordinate2D(5, 5); EllipticArcSegment arc = EllipticArcBuilderEx.CreateCircularArc(start, end, center, ArcOrientation.ArcCounterClockwise); Polyline polyline = PolylineBuilderEx.CreatePolyline(new Segment[] { line, arc }); Assert.IsFalse(polyline.HasZ); PolylineBuilderEx polylineBuilder = new PolylineBuilderEx(polyline); polylineBuilder.HasZ = true; Polyline polyline3D = polylineBuilder.ToGeometry(); var points = polyline3D.Points; foreach (MapPoint p in points) Assert.IsTrue(p.HasZ); var part = polyline3D.Parts[0]; int numSegments = part.Count; for (int i = 0; i < numSegments; i++) { Segment segment = part[i]; MapPointBuilderEx pointBuilder = new MapPointBuilderEx(segment.StartPoint); pointBuilder.Z = i + 1; MapPoint startPoint = pointBuilder.ToGeometry(); pointBuilder = new MapPointBuilderEx(segment.EndPoint); pointBuilder.Z = i + 2; MapPoint endPoint = pointBuilder.ToGeometry(); SegmentType segmentType = segment.SegmentType; SegmentBuilderEx segmentBuilder = null; switch (segmentType) { case SegmentType.Line: segmentBuilder = new LineBuilderEx((LineSegment)segment); break; case SegmentType.Bezier: segmentBuilder = new CubicBezierBuilderEx((CubicBezierSegment)segment); break; case SegmentType.EllipticArc: segmentBuilder = new EllipticArcBuilderEx((EllipticArcSegment)segment); break; } segmentBuilder.StartPoint = startPoint; segmentBuilder.EndPoint = endPoint; segment = segmentBuilder.ToSegment(); polylineBuilder.ReplaceSegment(0, i, segment); } polyline3D = polylineBuilder.ToGeometry(); /////////////////////////////////
... View more
09-08-2023
04:06 PM
|
0
|
1
|
1206
|
POST
|
Can you use this workaround? private Multipart GetOffsetUsingGraphicBuffer(Multipart multipart, double offsetDistance, LineJoinType joinType)
{
Polygon graphicBuffer = GeometryEngine.Instance.GraphicBuffer(multipart, Math.Abs(offsetDistance), joinType, LineCapType.Square, 4, 0, 96) as Polygon;
Polyline boundary = GeometryEngine.Instance.Boundary(graphicBuffer) as Polyline;
ProximityResult startResult = GeometryEngine.Instance.NearestPoint(boundary, multipart.Points[0]);
Coordinate2D coord = (Coordinate2D)(startResult.Point);
Segment firstSegment = multipart.Parts[0][0];
// Negative offset distance means the offset line will be on the left side
bool isOnRightSide = PointIsOnRightSide(firstSegment.StartCoordinate, coord, firstSegment.EndCoordinate);
if (offsetDistance > 0 && !isOnRightSide)
coord.Rotate(Math.PI, (Coordinate2D)(multipart.Points[0]));
double distanceAlongCurve1, distanceFromCurve;
LeftOrRightSide whichSide;
MapPoint point = GeometryEngine.Instance.QueryPointAndDistance(boundary, SegmentExtensionType.NoExtension, coord.ToMapPoint(), AsRatioOrLength.AsRatio, out distanceAlongCurve1, out distanceFromCurve, out whichSide);
ProximityResult endResult = GeometryEngine.Instance.NearestPoint(boundary, multipart.Points.Last());
coord = (Coordinate2D)(endResult.Point);
if (offsetDistance > 0 && !isOnRightSide)
coord.Rotate(Math.PI, (Coordinate2D)(multipart.Points.Last()));
double distanceAlongCurve2;
point = GeometryEngine.Instance.QueryPointAndDistance(boundary, SegmentExtensionType.NoExtension, coord.ToMapPoint(), AsRatioOrLength.AsRatio, out distanceAlongCurve2, out distanceFromCurve, out whichSide);
double d1 = Math.Min(distanceAlongCurve1, distanceAlongCurve2);
double d2 = Math.Max(distanceAlongCurve1, distanceAlongCurve2);
Polyline subCurve = GeometryEngine.Instance.GetSubCurve(boundary, d1, d2, AsRatioOrLength.AsRatio) as Polyline;
return subCurve;
}
private bool PointIsOnRightSide(Coordinate2D origin, Coordinate2D p1, Coordinate2D p2)
{
// The result is positive if p1 lies on right side of origin-->p2;
double part1 = (p1.X - origin.X) * (p2.Y - origin.Y),
part2 = (p1.Y - origin.Y) * (p2.X - origin.X),
result = part1 - part2;
return result > 0;
}
// Here is a test
public void GEOffsetWorkaroundTest()
{
SpatialReference spatialReference = SpatialReferences.WGS84;
var coords = new List<Coordinate2D>
{
new Coordinate2D(0.1, 0.1),
new Coordinate2D(0.2, 0.5),
new Coordinate2D(0.3, 0.1),
new Coordinate2D(0.4, 0.1),
new Coordinate2D(0.5, 0.8)
};
Polyline polyline = PolylineBuilderEx.CreatePolyline(coords, spatialReference) as Polyline;
Polyline outputOffsetPolyline = GetOffsetUsingGraphicBuffer(polyline, 0.1, LineJoinType.Miter) as Polyline;
File.WriteAllText("C:\\temp\\outputOffsetPolyline_1_.txt", outputOffsetPolyline.ToJson());
outputOffsetPolyline = GetOffsetUsingGraphicBuffer(polyline, -0.1, LineJoinType.Miter) as Polyline;
File.WriteAllText("C:\\temp\\outputOffsetPolyline_2_.txt", outputOffsetPolyline.ToJson());
outputOffsetPolyline = GetOffsetUsingGraphicBuffer(polyline, 0.1, LineJoinType.Bevel) as Polyline;
File.WriteAllText("C:\\temp\\outputOffsetPolyline_3_.txt", outputOffsetPolyline.ToJson());
outputOffsetPolyline = GetOffsetUsingGraphicBuffer(polyline, -0.1, LineJoinType.Bevel) as Polyline;
File.WriteAllText("C:\\temp\\outputOffsetPolyline_4_.txt", outputOffsetPolyline.ToJson());
outputOffsetPolyline = GetOffsetUsingGraphicBuffer(polyline, 0.1, LineJoinType.Round) as Polyline;
File.WriteAllText("C:\\temp\\outputOffsetPolyline_5_.txt", outputOffsetPolyline.ToJson());
}
... View more
03-15-2023
01:53 PM
|
0
|
0
|
705
|
POST
|
This is a bug that will be addressed in a future release. Unfortunately, I can't give you an exact date at this time. I am working on a workaround for you, but I want to test it a little bit more. It will be ready tomorrow. Regarding SideBuffer, the corners of the buffer will always be round. The LineCapType refers only to the start and end of the line.
... View more
03-14-2023
04:30 PM
|
0
|
1
|
715
|
POST
|
Hi, I am looking into this. I will respond shortly. Thank you, Annette
... View more
03-06-2023
09:43 AM
|
0
|
1
|
2208
|
Title | Kudos | Posted |
---|---|---|
1 | 02-21-2025 11:20 AM | |
2 | 11-29-2022 02:02 PM | |
1 | 11-08-2022 09:14 AM | |
1 | 10-11-2022 08:18 AM | |
1 | 11-26-2018 02:52 PM |
Online Status |
Offline
|
Date Last Visited |
07-16-2025
08:41 AM
|