I'm looking for a good method for reshaping parcel polygons that have curves. One side of a given polygon (like in my screenshot) has a curve but for some reason, the other side was made with straight segments. There is only a very small difference (0.5 feet for example). I'd like to replace the straight segments with the same curve as on the adjacent polygon. Often the straight segments are on very large right-of-ways so the reshape tool (without temporarily clipping the polygon into a smaller sub-unit) is not a great option. When I try to reshape, and trace the curve, it inevitably follows the path of the straight segment (I think these straight pieces were created through tracing anyway? though I'm not entirely sure). I tried setting the snapping tolerance to like 2 pixels but then I often can't even find the start of the curve. I should add that I don't know the radii of these curves so tracing would be best. Can anyone recommend a working solution to help me out? Simpler would better, obviously, but I'm ready to jump through hoops if necessary.
[GIS] Reshaping polygons with curves in ArcMap
arcgis-10.3arcgis-desktoparcmapeditingpolygon
Related Solutions
I don't think anything happen to the ring as the Reshape tool does not allow rings to be cut if more than one polygon is crossed. The documentation regarding reshaping features might be helpful in describing this in more detail. The following quote is taken from the link:
You can reshape line and polygon features using the Reshape Features icon on the toolbar. It replaces the line or polygon part from the first to the last intersection with the original line. With polygons, this can sometimes lead to unintended results. It is mainly useful to replace smaller parts of a polygon, not for major overhauls, and the reshape line is not allowed to cross several polygon rings, as this would generate an invalid polygon.
If you want to reshape rings then make sure you only draw a line covering the ring itself. There is also the Delete Ring tool if you want to completely remove them.
I believe QgsCircularString.fromTwoPointsAndCenter()
is a method that could help you construct those arcs.
It creates a circular string consisting of a single arc which represents the curve from one point to another with a specified center point.
I've updated your example using the mentioned method and also addressed your problem of converting the exterior line to a polygon.
# coord for curved section
start_lat, start_lon = 39.08626748, -2.66563606
end_lat, end_lon = 39.20366816, -2.51489454
# coord for squared section
point3_lat, point3_lon = 39.11293834, -2.41907255
point4_lat, point4_lon = 38.98554723, -2.55822285
# center coord
centre_lat, centre_lon = 39.13921171, -2.58290392
# Create the arc segment
arc = QgsCircularString.fromTwoPointsAndCenter(
QgsPoint(start_lon, start_lat),
QgsPoint(end_lon, end_lat),
QgsPoint(centre_lon, centre_lat)
)
# Creates the polygon segment
line = QgsLineString(
[QgsPoint(end_lon, end_lat), QgsPoint(point3_lon, point3_lat),
QgsPoint(point4_lon, point4_lat), QgsPoint(start_lon, start_lat)]
)
# join both segments together
curve = line.toCurveType()
curve.addCurve(arc)
# create polygon geometry from exterior line
polygon = QgsPolygon()
polygon.setExteriorRing(curve)
geom = QgsGeometry(polygon)
# Create polygon feature
poly_feat = QgsFeature()
poly_feat.setGeometry(polygon)
# Create a memory layer
layer = QgsVectorLayer(
"Polygon?crs=epsg:4326&field=id:integer&field=name:string(20)&index=yes",
"temporary_points",
"memory"
)
# Add the layer
QgsProject.instance().addMapLayer(layer)
# Add the feature to the layer provider
pr = layer.dataProvider()
pr.addFeatures([poly_feat])
# Update extent
layer.updateExtents()
# Zoom to extent
iface.mapCanvas().setExtent(layer.extent())
iface.mapCanvas().refresh()
Best Answer
Assuming that you are dealing with a true curve stored in a geodatabase, the method that I would try to use is to turn it into a vertexed curve first.
The method I use when I need to do this, is to copy the polygon from the geodatabase feature class to a shapefile, delete the original and then copy the vertexed curve from the shapefile into the geodatabase feature class.
The above method, by default, seems to place a very large number of vertices so that the shape appears identical until zoomed in a long way.
You should then be able to use the Trace tool to get a near perfect result.