Added code for setting up PostGIS database and calculating pixels by value per polygon