Is it possible to perform spatial join in PostGIS and keep all features?

المشرف العام

Administrator
طاقم الإدارة
I am attempting to create an employment change map using a hex grid. I have individual establishment data as points with attached employment figures. When I ran the spatial join using the postGIS extension in QGIS 2.6 it returns all of the hexes where the join is true, as expected. But for cartographic sake I would like the whole net return where I could symbolize the null cells myself and not just have them drop out.

Is there a way to do this through postGIS similar to the return all features option in ArcMap's spatial join? My sample code right now.

--calculate the employment change per hex, nulling out --hexes that started at 0 SELECT gid, emp_2010,emp_2012, CASE emp_2010 WHEN 0 THEN NULL ELSE (emp_2012 - emp_2010)/emp_2010 END AS emp_per_change, geom from food_employment_2yr_hex;

أكثر...
 
أعلى