[Mapbender-commits] r1952 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jan 7 03:45:45 EST 2008


Author: christoph
Date: 2008-01-07 03:45:44 -0500 (Mon, 07 Jan 2008)
New Revision: 1952

Removed:
   trunk/mapbender/http/classes/class_geomColl.php
   trunk/mapbender/http/classes/class_geomObj.php
   trunk/mapbender/http/classes/class_gmlMember.php
Log:
deprecated, belonged to old class gml which is no longer used (has it ever been used?).

Deleted: trunk/mapbender/http/classes/class_geomColl.php
===================================================================
--- trunk/mapbender/http/classes/class_geomColl.php	2008-01-04 16:35:54 UTC (rev 1951)
+++ trunk/mapbender/http/classes/class_geomColl.php	2008-01-07 08:45:44 UTC (rev 1952)
@@ -1,88 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/class_geomColl.php
-# Copyright (C) 2002 CCGIS 
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-class geomColl { 
-
-	var $cnt_member;
-	var $member = array();
-	
-	function geomColl () {
-		$this->cnt_member = -1;
-	}
-
-	function addGeometryMember($type) {
-		$this->cnt_member++;
-		$this->member[$this->cnt_member] = new gmlMember($type);
-	}
-
-	function addPolygon () {
-		$this->member[$this->cnt_member]->addPolygon();
-	}
-
-	function addLine () {
-		$this->member[$this->cnt_member]->addLine();
-	}
-	function addPoint () {
-		$this->member[$this->cnt_member]->addPoint();
-	}
-	
-#	function addCoordinates ($coord, $pos) {
-#		$this->member[$this->cnt_member]->addCoordinates($coord, $pos);
-#	}
-
-	function addCoordinates ($coord) {
-		$this->member[$this->cnt_member]->addCoordinates($coord);
-	}
-
-	function addLabel($label) {
-		$this->member[$this->cnt_member]->addLabel($label);
-	}
-
-	function addAttribute($attribTag, $attrib) {
-		$this->member[$this->cnt_member]->setAttribute($attribTag, $attrib);
-	}
-
-	function addToPng($image, $bbox, $width, $height, $line, $text, $label) {
-		for($i=0; $i <= $this->cnt_member; $i++){
-			$image = $this->member[$i]->addToPng($image, $bbox, $width, $height, $line, $text, $label);
-		} 
-		return $image;
-	}
-
-	function getAllGeom() {
-		return $this->member;
-	}
-
-	function getMember($index) {
-		return $this->member[$index];
-	}
-
-	function getGeomCollSize() {
-		return count($this->member);
-	}	
-	
-	function getJavaObjStr($bbox, $width, $height) {
-		$javaObjStr = "";
-		for($i=0; $i <= $this->cnt_member; $i++){
-			$javaObjStr .= $this->member[$i]->getJavaObjStr($bbox, $width, $height);
-		}
-		return $javaObjStr;
-	}
-}
-?>
\ No newline at end of file

Deleted: trunk/mapbender/http/classes/class_geomObj.php
===================================================================
--- trunk/mapbender/http/classes/class_geomObj.php	2008-01-04 16:35:54 UTC (rev 1951)
+++ trunk/mapbender/http/classes/class_geomObj.php	2008-01-07 08:45:44 UTC (rev 1952)
@@ -1,86 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/class_geomObj.php
-# Copyright (C) 2002 CCGIS 
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-class _geomObj {
-	var $realx = array();
-	var $realy = array();
-#	var $pixx = array();
-#	var $pixy = array();
-	var $label;
-	
-	function _geomObj() {
-	}
-	
-	function getLabel() {
-		return $this->label;
-	}
-	
-	function setLabel($label) {
-		$this->label = $label;
-	}
-	
-	function addCoordinates ($coord) {
-		$this->realx[count($this->realx)] = $coord[0];
-		$this->realy[count($this->realy)] = $coord[1];
-	}
-	
-#	function addCoordinates ($coord, $pos) {
-#		$this->pixx[count($this->pixx)] = $pos[0];
-#		$this->pixy[count($this->pixy)] = $pos[1];
-#		$this->realx[count($this->realx)] = $coord[0];
-#		$this->realy[count($this->realy)] = $coord[1];
-#	}
-	
-#	function getCoordinates() {
-#		$data = array("x" => $this->pixx, "y" => $this->pixy);
-#		return $data;
-#	}
-
-	function getCoordinates() {
-		$data = array("x" => $this->realx, "y" => $this->realy);
-		return $data;
-	}
-}
-
-class _polygon extends _geomObj{
-
-	function getType() {
-		return "polygon";
-	}
-	
-}
-
-class _point extends _geomObj{
-
-	function getType() {
-		return "point";
-	}
-	
-}
-
-class _line extends _geomObj{
-
-	function getType() {
-		return "line";
-	}
-	
-}
-
-
-?>
\ No newline at end of file

Deleted: trunk/mapbender/http/classes/class_gmlMember.php
===================================================================
--- trunk/mapbender/http/classes/class_gmlMember.php	2008-01-04 16:35:54 UTC (rev 1951)
+++ trunk/mapbender/http/classes/class_gmlMember.php	2008-01-07 08:45:44 UTC (rev 1952)
@@ -1,175 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/class_gmlMember.php
-# Copyright (C) 2002 CCGIS 
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-class gmlMember { 
-	var $cnt_item;
-	var $memberType;
-	var $attributes = array();
-	var $geometry = array();
-	
-	function gmlMember ($type) {
-		$this->cnt_item = -1;
-		$this->setMemberType($type);
-	}
-
-	function setAttribute($attribTag, $attrib) {
-		$this->attributes[$attribTag] = $attrib;
-	}
-
-	function setMemberType($type) {
-		$this->memberType = $type;
-	}
-
-	function addPolygon () {
-		$this->cnt_item++;
-		$this->geometry[$this->cnt_item] = new _polygon();
-	}
-
-	function addLine () {
-		$this->cnt_item++;
-		$this->geometry[$this->cnt_item] = new _line();
-	}
-	
-	function addPoint () {
-		$this->cnt_item++;
-		$this->geometry[$this->cnt_item] = new _point();
-	}
-	
-#	function addCoordinates ($coord, $pos) {
-#		$this->geometry[$this->cnt_item]->addCoordinates($coord, $pos);
-#	}
-
-	function addCoordinates ($coord) {
-		$this->geometry[$this->cnt_item]->addCoordinates($coord);
-	}
-
-	function addLabel($label) {
-		$this->geometry[$this->cnt_item]->setLabel($label);
-	}
-
-	function addToPng($image, $bbox, $width, $height, $line, $text, $label) {
-		$pos = array();
-		$pos_next = array();
-
-		for ($j=0; $j < count($this->geometry); $j++) {
-				
-				$coord = $this->geometry[$j]->getCoordinates();
-
-				if ($this->geometry[$j]->getType() == "point") {
-				$topOffset = imagefontheight(2);
-				$pos = $this->makeRealWorld2mapPos($bbox, $width, $height, $coord["x"][0],$coord["y"][0]);
-				imagestring ($image, 2,$pos["x"], ($pos["y"] - $topOffset), $this->getAttribute($label), $text);
-				imageellipse($image, $pos["x"], $pos["y"], 5, 5, $line);
-				}
-				else { 
-				for($k=0; $k < count($coord["x"])-1; $k++){
-					$pos = $this->makeRealWorld2mapPos($bbox, $width, $height, $coord["x"][$k],$coord["y"][$k]);
-					$pos_next = $this->makeRealWorld2mapPos($bbox, $width, $height, $coord["x"][$k+1],$coord["y"][$k+1]);			  		
-					imageline($image,$pos["x"],$pos["y"],$pos_next["x"],$pos_next["y"],$line);
-
-				} 
-		} 
-		return $image;
-	}
-	}
-
-	function getAllGeom() {
-		return $this->geometry;
-	}
-
-	function getAllAttributes() {
-		return $this->attributes;
-	}
-
-	function getAllAttributeKeys() {
-		return array_keys($this->attributes);
-	}
-
-	function getAttribute($name) {
-		if (array_key_exists($name, $this->attributes)) {
-			return $this->attributes["$name"];
-		}
-		else {
-			return "";
-		}
-	}
-
-	function getGeomObj($index) {
-		return $this->geometry[$index];
-	}
-
-	function getMemberType() {
-		return $this->memberType;
-	}	
-
-	function getMemberSize() {
-		return count($this->geometry);
-	}	
-
-	function getGeomSize($i) {
-		return count($this->geometry[$i]);
-	}	
-
-
-	function getJavaObjStr($bbox, $width, $height) {
-		$str = "";
-		for ($j=0; $j < count($this->geometry); $j++) {
-			
-			$coord = $this->geometry[$j]->getCoordinates();
-
-			$str .= "register_D('" . $this->geometry[$j]->getType() . "');";
-			
-			if ($this->geometry[$j]->getType() == "point" && $this->geometry[$j]->getLabel()) {
-				$str .= "D[D.length-1].label = '" . $this->geometry[$j]->getLabel() . "';";
-			}		
-		
-			for($k=0; $k < count($coord["x"]); $k++){
-				$pos = $this->makeRealWorld2mapPos($bbox, $width, $height,$coord["x"][$k],$coord["y"][$k]);				
-				$str .= "D[D.length-1].x[D[D.length-1].x.length] = Math.round(" . $coord["x"][$k] . " * 100)/100;";
-				$str .= "D[D.length-1].y[D[D.length-1].y.length] = Math.round(" . $coord["y"][$k] . " * 100)/100;";				
-			}
-			$str .= "D[D.length-1].complete = true;";
-		}
-		return $str;
-	}
-
-	function makeRealWorld2mapPos($bbox, $width, $height, $x,$y){
-		$minx = $bbox[0];
-		$miny = $bbox[1];
-		$maxx = $bbox[2];
-		$maxy = $bbox[3];
-		$xtentx = $maxx - $minx;
-		$xtenty = $maxy - $miny;
-		if ($xtenty != 0 && $xtentx != 0) {
-			
-			$posx = (($x - $minx) / $xtentx) * $width;
-			$posy = (($maxy - $y) / $xtenty) * $height;
-
-			$pos = array("x" => $posx, "y" => $posy);
-			return $pos;
-		}
-		if ($xtenty == 0 || $xtentx == 0) {
-			$mb_exception = new mb_exception("Division by zero in makeRealWorld2mapPos");
-			return 0;
-		}
-	}
-
-
-}
-?>
\ No newline at end of file



More information about the Mapbender_commits mailing list