diff --git a/libraries/gis/pma_gis_geometry.php b/libraries/gis/pma_gis_geometry.php index 91f0fec545..a09d30d269 100644 --- a/libraries/gis/pma_gis_geometry.php +++ b/libraries/gis/pma_gis_geometry.php @@ -36,13 +36,13 @@ abstract class PMA_GIS_Geometry * * @param string $spatial GIS data object * @param string $label Label for the GIS data object - * @param string $line_color Color for the GIS data object + * @param string $color Color for the GIS data object * @param array $scale_data Array containing data related to scaling * @param image $pdf TCPDF instance * * @return the modified TCPDF instance */ - public abstract function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf); + public abstract function prepareRowAsPdf($spatial, $label, $color, $scale_data, $pdf); /** * Prepares the JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. @@ -50,12 +50,12 @@ abstract class PMA_GIS_Geometry * @param string $spatial GIS data object * @param int $srid Spatial reference ID * @param string $label Label for the GIS data object - * @param string $point_color Color for the GIS data object + * @param string $color Color for the GIS data object * @param array $scale_data Array containing data related to scaling * * @return the JavaScript related to a row in the GIS dataset */ - public abstract function prepareRowAsOl($spatial, $srid, $label, $point_color, $scale_data); + public abstract function prepareRowAsOl($spatial, $srid, $label, $color, $scale_data); /** * Scales each row. diff --git a/libraries/gis/pma_gis_linestring.php b/libraries/gis/pma_gis_linestring.php index 228c32fde8..dad4f9bcbe 100644 --- a/libraries/gis/pma_gis_linestring.php +++ b/libraries/gis/pma_gis_linestring.php @@ -59,10 +59,10 @@ class PMA_GIS_Linestring extends PMA_GIS_Geometry public function prepareRowAsPng($spatial, $label, $line_color, $scale_data, $image) { // allocate colors - $r = hexdec(substr($line_color, 1, 2)); - $g = hexdec(substr($line_color, 3, 2)); - $b = hexdec(substr($line_color, 4, 2)); - $color = imagecolorallocate($image, $r, $g, $b); + $red = hexdec(substr($line_color, 1, 2)); + $green = hexdec(substr($line_color, 3, 2)); + $blue = hexdec(substr($line_color, 4, 2)); + $color = imagecolorallocate($image, $red, $green, $blue); // Trim to remove leading 'LINESTRING(' and trailing ')' $linesrting = substr($spatial, 11, (strlen($spatial) - 12)); @@ -94,10 +94,10 @@ class PMA_GIS_Linestring extends PMA_GIS_Geometry public function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf) { // allocate colors - $r = hexdec(substr($line_color, 1, 2)); - $g = hexdec(substr($line_color, 3, 2)); - $b = hexdec(substr($line_color, 4, 2)); - $line = array('width' => 1.5, 'color' => array($r, $g, $b)); + $red = hexdec(substr($line_color, 1, 2)); + $green = hexdec(substr($line_color, 3, 2)); + $blue = hexdec(substr($line_color, 4, 2)); + $line = array('width' => 1.5, 'color' => array($red, $green, $blue)); // Trim to remove leading 'LINESTRING(' and trailing ')' $linesrting = substr($spatial, 11, (strlen($spatial) - 12)); diff --git a/libraries/gis/pma_gis_multilinestring.php b/libraries/gis/pma_gis_multilinestring.php index 6fcf0280da..1289a93115 100644 --- a/libraries/gis/pma_gis_multilinestring.php +++ b/libraries/gis/pma_gis_multilinestring.php @@ -68,10 +68,10 @@ class PMA_GIS_Multilinestring extends PMA_GIS_Geometry public function prepareRowAsPng($spatial, $label, $line_color, $scale_data, $image) { // allocate colors - $r = hexdec(substr($line_color, 1, 2)); - $g = hexdec(substr($line_color, 3, 2)); - $b = hexdec(substr($line_color, 4, 2)); - $color = imagecolorallocate($image, $r, $g, $b); + $red = hexdec(substr($line_color, 1, 2)); + $green = hexdec(substr($line_color, 3, 2)); + $blue = hexdec(substr($line_color, 4, 2)); + $color = imagecolorallocate($image, $red, $green, $blue); // Trim to remove leading 'MULTILINESTRING((' and trailing '))' $multilinestirng = substr($spatial, 17, (strlen($spatial) - 19)); @@ -108,10 +108,10 @@ class PMA_GIS_Multilinestring extends PMA_GIS_Geometry public function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf) { // allocate colors - $r = hexdec(substr($line_color, 1, 2)); - $g = hexdec(substr($line_color, 3, 2)); - $b = hexdec(substr($line_color, 4, 2)); - $line = array('width' => 1.5, 'color' => array($r, $g, $b)); + $red = hexdec(substr($line_color, 1, 2)); + $green = hexdec(substr($line_color, 3, 2)); + $blue = hexdec(substr($line_color, 4, 2)); + $line = array('width' => 1.5, 'color' => array($red, $green, $blue)); // Trim to remove leading 'MULTILINESTRING((' and trailing '))' $multilinestirng = substr($spatial, 17, (strlen($spatial) - 19)); diff --git a/libraries/gis/pma_gis_multipoint.php b/libraries/gis/pma_gis_multipoint.php index b365a3dc82..48e9099260 100644 --- a/libraries/gis/pma_gis_multipoint.php +++ b/libraries/gis/pma_gis_multipoint.php @@ -48,21 +48,21 @@ class PMA_GIS_Multipoint extends PMA_GIS_Geometry /** * Adds to the PNG image object, the data related to a row in the GIS dataset. * - * @param string $spatial GIS MULTIPOINT object - * @param string $label Label for the GIS MULTIPOINT object - * @param string $line_color Color for the GIS MULTIPOINT object - * @param array $scale_data Array containing data related to scaling - * @param image $image Image object + * @param string $spatial GIS MULTIPOINT object + * @param string $label Label for the GIS MULTIPOINT object + * @param string $point_color Color for the GIS MULTIPOINT object + * @param array $scale_data Array containing data related to scaling + * @param image $image Image object * * @return the modified image object */ - public function prepareRowAsPng($spatial, $label, $line_color, $scale_data, $image) + public function prepareRowAsPng($spatial, $label, $point_color, $scale_data, $image) { // allocate colors - $r = hexdec(substr($line_color, 1, 2)); - $g = hexdec(substr($line_color, 3, 2)); - $b = hexdec(substr($line_color, 4, 2)); - $color = imagecolorallocate($image, $r, $g, $b); + $red = hexdec(substr($point_color, 1, 2)); + $green = hexdec(substr($point_color, 3, 2)); + $blue = hexdec(substr($point_color, 4, 2)); + $color = imagecolorallocate($image, $red, $green, $blue); // Trim to remove leading 'MULTIPOINT(' and trailing ')' $multipoint = substr($spatial, 11, (strlen($spatial) - 12)); @@ -78,21 +78,21 @@ class PMA_GIS_Multipoint extends PMA_GIS_Geometry /** * Adds to the TCPDF instance, the data related to a row in the GIS dataset. * - * @param string $spatial GIS MULTIPOINT object - * @param string $label Label for the GIS MULTIPOINT object - * @param string $line_color Color for the GIS MULTIPOINT object - * @param array $scale_data Array containing data related to scaling - * @param image $pdf TCPDF instance + * @param string $spatial GIS MULTIPOINT object + * @param string $label Label for the GIS MULTIPOINT object + * @param string $point_color Color for the GIS MULTIPOINT object + * @param array $scale_data Array containing data related to scaling + * @param image $pdf TCPDF instance * * @return the modified TCPDF instance */ - public function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf) + public function prepareRowAsPdf($spatial, $label, $point_color, $scale_data, $pdf) { // allocate colors - $r = hexdec(substr($line_color, 1, 2)); - $g = hexdec(substr($line_color, 3, 2)); - $b = hexdec(substr($line_color, 4, 2)); - $line = array('width' => 1.25, 'color' => array($r, $g, $b)); + $red = hexdec(substr($point_color, 1, 2)); + $green = hexdec(substr($point_color, 3, 2)); + $blue = hexdec(substr($point_color, 4, 2)); + $line = array('width' => 1.25, 'color' => array($red, $green, $blue)); // Trim to remove leading 'MULTIPOINT(' and trailing ')' $multipoint = substr($spatial, 11, (strlen($spatial) - 12)); diff --git a/libraries/gis/pma_gis_multipolygon.php b/libraries/gis/pma_gis_multipolygon.php index 8bd9c5cb14..9be480137a 100644 --- a/libraries/gis/pma_gis_multipolygon.php +++ b/libraries/gis/pma_gis_multipolygon.php @@ -82,10 +82,10 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry public function prepareRowAsPng($spatial, $label, $fill_color, $scale_data, $image) { // allocate colors - $r = hexdec(substr($fill_color, 1, 2)); - $g = hexdec(substr($fill_color, 3, 2)); - $b = hexdec(substr($fill_color, 4, 2)); - $color = imagecolorallocate($image, $r, $g, $b); + $red = hexdec(substr($fill_color, 1, 2)); + $green = hexdec(substr($fill_color, 3, 2)); + $blue = hexdec(substr($fill_color, 4, 2)); + $color = imagecolorallocate($image, $red, $green, $blue); // Trim to remove leading 'MULTIPOLYGON(((' and trailing ')))' $multipolygon = substr($spatial, 15, (strlen($spatial) - 18)); @@ -130,10 +130,10 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry public function prepareRowAsPdf($spatial, $label, $fill_color, $scale_data, $pdf) { // allocate colors - $r = hexdec(substr($fill_color, 1, 2)); - $g = hexdec(substr($fill_color, 3, 2)); - $b = hexdec(substr($fill_color, 4, 2)); - $color = array($r, $g, $b); + $red = hexdec(substr($fill_color, 1, 2)); + $green = hexdec(substr($fill_color, 3, 2)); + $blue = hexdec(substr($fill_color, 4, 2)); + $color = array($red, $green, $blue); // Trim to remove leading 'MULTIPOLYGON(((' and trailing ')))' $multipolygon = substr($spatial, 15, (strlen($spatial) - 18)); diff --git a/libraries/gis/pma_gis_point.php b/libraries/gis/pma_gis_point.php index 257462cbd7..431857240d 100644 --- a/libraries/gis/pma_gis_point.php +++ b/libraries/gis/pma_gis_point.php @@ -48,21 +48,21 @@ class PMA_GIS_Point extends PMA_GIS_Geometry /** * Adds to the PNG image object, the data related to a row in the GIS dataset. * - * @param string $spatial GIS POINT object - * @param string $label Label for the GIS POINT object - * @param string $line_color Color for the GIS POINT object - * @param array $scale_data Array containing data related to scaling - * @param image $image Image object + * @param string $spatial GIS POINT object + * @param string $label Label for the GIS POINT object + * @param string $point_color Color for the GIS POINT object + * @param array $scale_data Array containing data related to scaling + * @param image $image Image object * * @return the modified image object */ - public function prepareRowAsPng($spatial, $label, $line_color, $scale_data, $image) + public function prepareRowAsPng($spatial, $label, $point_color, $scale_data, $image) { // allocate colors - $r = hexdec(substr($line_color, 1, 2)); - $g = hexdec(substr($line_color, 3, 2)); - $b = hexdec(substr($line_color, 4, 2)); - $color = imagecolorallocate($image, $r, $g, $b); + $red = hexdec(substr($point_color, 1, 2)); + $green = hexdec(substr($point_color, 3, 2)); + $blue = hexdec(substr($point_color, 4, 2)); + $color = imagecolorallocate($image, $red, $green, $blue); // Trim to remove leading 'POINT(' and trailing ')' $point = substr($spatial, 6, (strlen($spatial) - 7)); @@ -76,21 +76,21 @@ class PMA_GIS_Point extends PMA_GIS_Geometry /** * Adds to the TCPDF instance, the data related to a row in the GIS dataset. * - * @param string $spatial GIS POINT object - * @param string $label Label for the GIS POINT object - * @param string $line_color Color for the GIS POINT object - * @param array $scale_data Array containing data related to scaling - * @param image $pdf TCPDF instance + * @param string $spatial GIS POINT object + * @param string $label Label for the GIS POINT object + * @param string $point_color Color for the GIS POINT object + * @param array $scale_data Array containing data related to scaling + * @param image $pdf TCPDF instance * * @return the modified TCPDF instance */ - public function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf) + public function prepareRowAsPdf($spatial, $label, $point_color, $scale_data, $pdf) { // allocate colors - $r = hexdec(substr($line_color, 1, 2)); - $g = hexdec(substr($line_color, 3, 2)); - $b = hexdec(substr($line_color, 4, 2)); - $line = array('width' => 1.25, 'color' => array($r, $g, $b)); + $red = hexdec(substr($point_color, 1, 2)); + $green = hexdec(substr($point_color, 3, 2)); + $blue = hexdec(substr($point_color, 4, 2)); + $line = array('width' => 1.25, 'color' => array($red, $green, $blue)); // Trim to remove leading 'POINT(' and trailing ')' $point = substr($spatial, 6, (strlen($spatial) - 7)); diff --git a/libraries/gis/pma_gis_polygon.php b/libraries/gis/pma_gis_polygon.php index 9872bda743..cc96f9a214 100644 --- a/libraries/gis/pma_gis_polygon.php +++ b/libraries/gis/pma_gis_polygon.php @@ -77,10 +77,10 @@ class PMA_GIS_Polygon extends PMA_GIS_Geometry public function prepareRowAsPng($spatial, $label, $fill_color, $scale_data, $image) { // allocate colors - $r = hexdec(substr($fill_color, 1, 2)); - $g = hexdec(substr($fill_color, 3, 2)); - $b = hexdec(substr($fill_color, 4, 2)); - $color = imagecolorallocate($image, $r, $g, $b); + $red = hexdec(substr($fill_color, 1, 2)); + $green = hexdec(substr($fill_color, 3, 2)); + $blue = hexdec(substr($fill_color, 4, 2)); + $color = imagecolorallocate($image, $red, $green, $blue); // Trim to remove leading 'POLYGON((' and trailing '))' $polygon = substr($spatial, 9, (strlen($spatial) - 11)); @@ -122,10 +122,10 @@ class PMA_GIS_Polygon extends PMA_GIS_Geometry public function prepareRowAsPdf($spatial, $label, $fill_color, $scale_data, $pdf) { // allocate colors - $r = hexdec(substr($fill_color, 1, 2)); - $g = hexdec(substr($fill_color, 3, 2)); - $b = hexdec(substr($fill_color, 4, 2)); - $color = array($r, $g, $b); + $red = hexdec(substr($fill_color, 1, 2)); + $green = hexdec(substr($fill_color, 3, 2)); + $blue = hexdec(substr($fill_color, 4, 2)); + $color = array($red, $green, $blue); // Trim to remove leading 'POLYGON((' and trailing '))' $polygon = substr($spatial, 9, (strlen($spatial) - 11));