TransWikia.com

Spatially joining district wise polygon shapefile with smaller polygon indicating loamy soil proportion in 5km by 5km grid using QGIS

Geographic Information Systems Asked by user180941 on August 2, 2021

I have two shapefiles:

  1. a shape-file for India district wise
  2. I have another .asc raster file for India’s loamy soil area in a 5km by 5km grid cell (and a converted shape file version for the same). Each cell in this data contains the data on fraction of grid cell area in absolute integer term that is loamy textured (needs to be divided by 10000 for fraction) .

Now what I wish to find is the total fraction of land in loamy texture by district. So, I wish to spatially join the two shapefiles in order for each of this 5*5km grids to have a district code (i.e. the census code in my attributes table). I have tried the spatial join by vector-> data management-> Join attributes by location. But it reported "invalid geometry" for both the data sets. So I tried it by fixing geometry using the vector geometry-> fix geometry for both the shape files. Now joining them on fixed geometry shape file using the Join attributes by location reports:

No spatial index exists for join layer, performance will be severely
degraded.

I really feel it a very basic question on joins but I still didn’t manage to find any legible answer to it online and hence, I am stuck.

How do I join the two shapefiles to have a single district code along every grid and also how do I join them in a way that the grid cells which lies in the intersection of two districts goes to the district where it has the grid’s centroid or the grid’s major area (any one of them would do)?

My attribute tables look like the following:

enter image description here

enter image description here

and My shapefiles look like the following:

enter image description here

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