TransWikia.com

How to automatically align a line with a grid

Geographic Information Systems Asked by Peet Whittaker on December 3, 2020

I have a line layer (orange line in image below) that I need to snap/align with an underlying grid (light blue lines below). The desired result would be something like the purple line.

I have already tried rasterizing the line (using a snap raster that was shifted by half the grid resolution in both the x and y directions) and then re-vectorizing it, but that did not give satisfactory results in all cases (some of the resulting lines had loops, or were just missing entirely).

I also tried using the Snap tool in ArcGIS, but that only snapped the vertices of the line to grid, rather than forcing the edges of the line to coincide with the grid lines.

Is there a name for this technique or an algorithm that I’ve missed for this kind of processing? I’m not tied to any particular GIS software, just looking for an idea of the general process.

enter image description here

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP