I have two tables one with block group+data and another with geometries of communities. I want to calculate the intersection area so I can later calculate the proportion of each block group in a given community

I wrote this query, which runs successfully but says no rows are affected--they should be. Basically, some block groups fall entirely into a community, and others are bisected by the community boundaries. What is causing this?

  ST_Intersection(bg_pop.geom, com.geom) as new_geom,
  ST_Area(ST_Intersection(bg_pop.geom, com.geom)) as new_area
  laco_pop_by_bg as bg_pop, laco_community as com
 ST_Intersects(bg_pop.geom, com.geom)
  • 2
    Can you confirm they are both in the same CRS? – Liam G Dec 30 '17 at 0:09
  • Yes, they are both in the same CRS – atlasofcoffee Jan 3 '18 at 18:14
  • Even if datasets are in the same SRID, one might have been shifted for mysterious reason. It's always important to have a visual look at the data. – Pierre Racine Jan 23 '18 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.