public function findSvgGeometry($conn, $MultiPointBbox, $database,
            $geomColumn, $whereCol, $whereColValues, $width, $height)
    {
        $bboxGeoText = "ST_ENVELOPE("
                . SrsPoint::getGeomFromTextMultiPoint("POSTGIS", $MultiPointBbox)
                . ")";
        $paramArray = array();
        if(isset($whereColValues[0]))
        {
            if(is_string($whereColValues[0]))
            {
                $paramArray = array(\Doctrine\DBAL\Connection::PARAM_STR_ARRAY);
            } else if(is_int($whereColValues[0]))
            {
                $paramArray = array(\Doctrine\DBAL\Connection::PARAM_INT_ARRAY);
            }
        }
        $srsInt = $MultiPointBbox[0]->getSrs();
        $sql = "";
        if("POSTGIS")
        {
            $sql .= "SELECT st_assvg(ST_INTERSECTION(" . $bboxGeoText
                    . ", ST_UNION(ST_TRANSFORM(" . $geomColumn . ","
                    . $srsInt . ")))) as svg_geom"
                    . ",ST_INTERSECTS(ST_UNION(ST_TRANSFORM(" . $geomColumn
                    . "," . $srsInt . "))," . $bboxGeoText . ") as intersects"
                    . ",ST_CONTAINS(ST_UNION(ST_TRANSFORM(" . $geomColumn . ","
                    . $srsInt . "))," . $bboxGeoText . ") as contains"
                    . ",area2d(" . $bboxGeoText . ") as bboxarea"
                    . ",area2d(ST_INTERSECTION(" . $bboxGeoText
                    . ",ST_UNION(ST_TRANSFORM(" . $geomColumn
                    . "," . $srsInt . ")))) as geomarea"
                    . ",st_assvg(" . $bboxGeoText . ") as envelope"
                    . " FROM " . $database
                    . " WHERE " . $whereCol . " IN (?) AND ST_INTERSECTS("
                    . $bboxGeoText . ",ST_TRANSFORM(" . $geomColumn . "," . $srsInt . "))";
        }
        $stmt = $conn->executeQuery($sql, array($whereColValues), $paramArray);

        $row = $stmt->fetch();

        $this->svgEnvelope = $row["envelope"];
        $this->svgGeometry = $row["svg_geom"];
        $this->intersects = $row["intersects"] === null ? false : $row["intersects"];
        $this->contains = $row["contains"] === null ? false : $row["contains"];


        $geomarea = $row["geomarea"] !== null ? floatval($row["geomarea"]) : 0.0;
        $bboxarea = $row["bboxarea"];
        $factor = $geomarea / $bboxarea;
        $this->pixelNumber = intval($factor * $width * $height);
    }