Using ArcGIS Pro and ArcPy (https://pro.arcgis.com/en/pro-app/latest/tool-reference/editing/align-features.htm), I was trying to align the Canada border to the USA border, but the tool does not work.
- downloaded the shapefiles of countries from https://hub.arcgis.com/datasets/2b93b06dc0dc4e809d3c8db5cb96ba69_0/explore?location=-2.688200%2C0.00...
- simplify the Canada shapefile by using mapshaper, so the borders between Canada and USA have small gaps: mapshaper ca.shp -simplify 30% keep-shapes -o ca_30.shp
- arcpy.edit.AlignFeatures("ca_30.shp", "us.shp", "0.00005 Decimal Degrees") # I also tried a lot of other search distance
- opened ArcGIS Pro and opened the "Align feature" tool and tried a lot of different search distances
- The results are either wired Canada borders or the gaps are still there
Attached are the shapefiles
If the borders are oversimplified, then finding candidate matches will be less likely.
Perhaps a screen grab of the inputs prior to alignment would be useful
@DanPatterson Please see the attached screenshots. The actual shapefiles are also attached in the OP. Thanks
Both inputs are multipart features. There is a known issue with Align Features tool in processing multipart features.
Please try the following:
Hope that helps.
@DanLee Wow, it works for the above ESRI data after converting to single-part. However, it does not work for my another similar US/CA data, which is attached. Any idea?
Screenshot before align:
Screenshot after align:
Thank you for reporting this problem. Sorry for the inconvenience it may have caused. We have logged a bug and will try to fix it soon. You can also submit a Tech Support issue; that way you will be able to check the bug fixing status.
Eventually, two solutions work for me:
https://gis.stackexchange.com/questions/403846/postgis-align-borders-of-countries/404080#404080