Tag Archives: Geographic Information Systems

How to join all of the polygons that intersects and leave others without change in postgis?

What I need is to unite intersecting polygons in a single geometry and leave others without change. I am able to do this using the following query, which unites all of the polygons into a single geometry and then dumps it to the separate ones. INSERT INTO unioned(geom) SELECT ST_MULTI((ST_Dump(ST_Union(geom))).geom) from footprints; The problem is… Read More »

Raster alignment

I have a problem with raster aligning. Given: Two rasters that need to be aligned. Rasters a little bit shifted, scaled and rotated. Two arrays of matched keypoints. Transformation is wrong, so usual methods don’t work. My code: with rasterio.open(‘non_aligned_imagery/121817_Sq_GH3_index_ndvi.tif’) as src: # checkout array data = src.read() reshaped = data[0] rows, cols = reshaped.shape… Read More »