fixed multipolygon case

porting multipolygon fix to second tool

completed multipolygon fixes for third tool
Merge pull request #7 from kalxas/postgis

fixed multipolygon case