dmBridge PHP API
UNLVSpatialPointObject.php
00001 <?php
00002 #
00003 # UNLVSpatial: a dmBridge module for spatial content
00004 #
00005 # Copyright © 2011 Board of Regents of the Nevada System of Higher
00006 # Education, on behalf of the University of Nevada, Las Vegas
00007 #
00008 
00022 class UNLVSpatialPointObject extends UNLVSpatialAbstractSpatialObject {
00023 
00025    private $lat, $long;
00026 
00027 
00033    public function getSpatialCenterLat() {
00034       return $this->getSpatialLat();
00035    }
00036 
00042    public function getSpatialCenterLong() {
00043       return $this->getSpatialLong();
00044    }
00045 
00049    public function getSpatialLat() {
00050       return $this->lat;
00051    }
00052 
00056    public function setSpatialLat($float) {
00057       $this->lat = (float) $float;
00058    }
00059 
00063    public function getSpatialLong() {
00064       return $this->long;
00065    }
00066 
00070    public function setSpatialLong($float) {
00071       $this->long = (float) $float;
00072    }
00073 
00077    public function isSpatiallyValid() {
00078       if ($this->getSpatialLong() > 180 || $this->getSpatialLong() < -180) {
00079          return false;
00080       }
00081       if ($this->getSpatialLat() > 90 || $this->getSpatialLat() < -90) {
00082          return false;
00083       }
00084       return true;
00085    }
00086 
00087 }
00088 
 All Data Structures Functions Variables