File indexing completed on 2024-12-22 05:36:51
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Measure 0017 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0018 * @license http://framework.zend.com/license/new-bsd New BSD License 0019 * @version $Id$ 0020 */ 0021 0022 /** 0023 * Implement needed classes 0024 */ 0025 // require_once 'Zend/Measure/Abstract.php'; 0026 // require_once 'Zend/Locale.php'; 0027 0028 /** 0029 * Class for handling area conversions 0030 * 0031 * @category Zend 0032 * @package Zend_Measure 0033 * @subpackage Zend_Measure_Area 0034 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0035 * @license http://framework.zend.com/license/new-bsd New BSD License 0036 */ 0037 class Zend_Measure_Area extends Zend_Measure_Abstract 0038 { 0039 const STANDARD = 'SQUARE_METER'; 0040 0041 const ACRE = 'ACRE'; 0042 const ACRE_COMMERCIAL = 'ACRE_COMMERCIAL'; 0043 const ACRE_SURVEY = 'ACRE_SURVEY'; 0044 const ACRE_IRELAND = 'ACRE_IRELAND'; 0045 const ARE = 'ARE'; 0046 const ARPENT = 'ARPENT'; 0047 const BARN = 'BARN'; 0048 const BOVATE = 'BOVATE'; 0049 const BUNDER = 'BUNDER'; 0050 const CABALLERIA = 'CABALLERIA'; 0051 const CABALLERIA_AMERICA = 'CABALLERIA_AMERICA'; 0052 const CABALLERIA_CUBA = 'CABALLERIA_CUBA'; 0053 const CARREAU = 'CARREAU'; 0054 const CARUCATE = 'CARUCATE'; 0055 const CAWNEY = 'CAWNEY'; 0056 const CENTIARE = 'CENTIARE'; 0057 const CONG = 'CONG'; 0058 const COVER = 'COVER'; 0059 const CUERDA = 'CUERDA'; 0060 const DEKARE = 'DEKARE'; 0061 const DESSIATINA = 'DESSIATINA'; 0062 const DHUR = 'DHUR'; 0063 const DUNUM = 'DUNUM'; 0064 const DUNHAM = 'DUNHAM'; 0065 const FALL_SCOTS = 'FALL_SCOTS'; 0066 const FALL = 'FALL'; 0067 const FANEGA = 'FANEGA'; 0068 const FARTHINGDALE = 'FARTHINGDALE'; 0069 const HACIENDA = 'HACIENDA'; 0070 const HECTARE = 'HECTARE'; 0071 const HIDE = 'HIDE'; 0072 const HOMESTEAD = 'HOMESTEAD'; 0073 const HUNDRED = 'HUNDRED'; 0074 const JERIB = 'JERIB'; 0075 const JITRO = 'JITRO'; 0076 const JOCH = 'JOCH'; 0077 const JUTRO = 'JUTRO'; 0078 const JO = 'JO'; 0079 const KAPPLAND = 'KAPPLAND'; 0080 const KATTHA = 'KATTHA'; 0081 const LABOR = 'LABOR'; 0082 const LEGUA = 'LEGUA'; 0083 const MANZANA_COSTA_RICA = 'MANZANA_COSTA_RICA'; 0084 const MANZANA = 'MANZANA'; 0085 const MORGEN = 'MORGEN'; 0086 const MORGEN_AFRICA = 'MORGEN_AFRICA'; 0087 const MU = 'MU'; 0088 const NGARN = 'NGARN'; 0089 const NOOK = 'NOOK'; 0090 const OXGANG = 'OXGANG'; 0091 const PERCH = 'PERCH'; 0092 const PERCHE = 'PERCHE'; 0093 const PING = 'PING'; 0094 const PYONG = 'PYONG'; 0095 const RAI = 'RAI'; 0096 const ROOD = 'ROOD'; 0097 const SECTION = 'SECTION'; 0098 const SHED = 'SHED'; 0099 const SITIO = 'SITIO'; 0100 const SQUARE = 'SQUARE'; 0101 const SQUARE_ANGSTROM = 'SQUARE_ANGSTROM'; 0102 const SQUARE_ASTRONOMICAL_UNIT = 'SQUARE_ASTRONOMICAL_UNIT'; 0103 const SQUARE_ATTOMETER = 'SQUARE_ATTOMETER'; 0104 const SQUARE_BICRON = 'SQUARE_BICRON'; 0105 const SQUARE_CENTIMETER = 'SQUARE_CENTIMETER'; 0106 const SQUARE_CHAIN = 'SQUARE_CHAIN'; 0107 const SQUARE_CHAIN_ENGINEER = 'SQUARE_CHAIN_ENGINEER'; 0108 const SQUARE_CITY_BLOCK_US_EAST = 'SQUARE_CITY_BLOCK_US_EAST'; 0109 const SQUARE_CITY_BLOCK_US_WEST = 'SQUARE_CITY_BLOCK_US_WEST'; 0110 const SQUARE_CITY_BLOCK_US_SOUTH = 'SQUARE_CITY_BLOCK_US_SOUTH'; 0111 const SQUARE_CUBIT = 'SQUARE_CUBIT'; 0112 const SQUARE_DECIMETER = 'SQUARE_DECIMETER'; 0113 const SQUARE_DEKAMETER = 'SQUARE_DEKAMETER'; 0114 const SQUARE_EXAMETER = 'SQUARE_EXAMETER'; 0115 const SQUARE_FATHOM = 'SQUARE_FATHOM'; 0116 const SQUARE_FEMTOMETER = 'SQUARE_FEMTOMETER'; 0117 const SQUARE_FERMI = 'SQUARE_FERMI'; 0118 const SQUARE_FOOT = 'SQUARE_FOOT'; 0119 const SQUARE_FOOT_SURVEY = 'SQUARE_FOOT_SURVEY'; 0120 const SQUARE_FURLONG = 'SQUARE_FURLONG'; 0121 const SQUARE_GIGAMETER = 'SQUARE_GIGAMETER'; 0122 const SQUARE_HECTOMETER = 'SQUARE_HECTOMETER'; 0123 const SQUARE_INCH = 'SQUARE_INCH'; 0124 const SQUARE_INCH_SURVEY = 'SQUARE_INCH_SURVEY'; 0125 const SQUARE_KILOMETER = 'SQUARE_KILOMETER'; 0126 const SQUARE_LEAGUE_NAUTIC = 'SQUARE_LEAGUE_NAUTIC'; 0127 const SQUARE_LEAGUE = 'SQUARE_LEAGUE'; 0128 const SQUARE_LIGHT_YEAR = 'SQUARE_LIGHT_YEAR'; 0129 const SQUARE_LINK = 'SQUARE_LINK'; 0130 const SQUARE_LINK_ENGINEER = 'SQUARE_LINK_ENGINEER'; 0131 const SQUARE_MEGAMETER = 'SQUARE_MEGAMETER'; 0132 const SQUARE_METER = 'SQUARE_METER'; 0133 const SQUARE_MICROINCH = 'SQUARE_MICROINCH'; 0134 const SQUARE_MICROMETER = 'SQUARE_MICROMETER'; 0135 const SQUARE_MICROMICRON = 'SQUARE_MICROMICRON'; 0136 const SQUARE_MICRON = 'SQUARE_MICRON'; 0137 const SQUARE_MIL = 'SQUARE_MIL'; 0138 const SQUARE_MILE = 'SQUARE_MILE'; 0139 const SQUARE_MILE_NAUTIC = 'SQUARE_MILE_NAUTIC'; 0140 const SQUARE_MILE_SURVEY = 'SQUARE_MILE_SURVEY'; 0141 const SQUARE_MILLIMETER = 'SQUARE_MILLIMETER'; 0142 const SQUARE_MILLIMICRON = 'SQUARE_MILLIMICRON'; 0143 const SQUARE_MYRIAMETER = 'SQUARE_MYRIAMETER'; 0144 const SQUARE_NANOMETER = 'SQUARE_NANOMETER'; 0145 const SQUARE_PARIS_FOOT = 'SQUARE_PARIS_FOOT'; 0146 const SQUARE_PARSEC = 'SQUARE_PARSEC'; 0147 const SQUARE_PERCH = 'SQUARE_PERCH'; 0148 const SQUARE_PERCHE = 'SQUARE_PERCHE'; 0149 const SQUARE_PETAMETER = 'SQUARE_PETAMETER'; 0150 const SQUARE_PICOMETER = 'SQUARE_PICOMETER'; 0151 const SQUARE_ROD = 'SQUARE_ROD'; 0152 const SQUARE_TENTHMETER = 'SQUARE_TENTHMETER'; 0153 const SQUARE_TERAMETER = 'SQUARE_TERAMETER'; 0154 const SQUARE_THOU = 'SQUARE_THOU'; 0155 const SQUARE_VARA = 'SQUARE_VARA'; 0156 const SQUARE_VARA_TEXAS = 'SQUARE_VARA_TEXAS'; 0157 const SQUARE_YARD = 'SQUARE_YARD'; 0158 const SQUARE_YARD_SURVEY = 'SQUARE_YARD_SURVEY'; 0159 const SQUARE_YOCTOMETER = 'SQUARE_YOCTOMETER'; 0160 const SQUARE_YOTTAMETER = 'SQUARE_YOTTAMETER'; 0161 const STANG = 'STANG'; 0162 const STREMMA = 'STREMMA'; 0163 const TAREA = 'TAREA'; 0164 const TATAMI = 'TATAMI'; 0165 const TONDE_LAND = 'TONDE_LAND'; 0166 const TOWNSHIP = 'TOWNSHIP'; 0167 const TSUBO = 'TSUBO'; 0168 const TUNNLAND = 'TUNNLAND'; 0169 const YARD = 'YARD'; 0170 const VIRGATE = 'VIRGATE'; 0171 0172 /** 0173 * Calculations for all area units 0174 * 0175 * @var array 0176 */ 0177 protected $_units = array( 0178 'ACRE' => array('4046.856422', 'A'), 0179 'ACRE_COMMERCIAL' => array('3344.50944', 'A'), 0180 'ACRE_SURVEY' => array('4046.872627', 'A'), 0181 'ACRE_IRELAND' => array('6555', 'A'), 0182 'ARE' => array('100', 'a'), 0183 'ARPENT' => array('3418.89', 'arpent'), 0184 'BARN' => array('1e-28', 'b'), 0185 'BOVATE' => array('60000', 'bovate'), 0186 'BUNDER' => array('10000', 'bunder'), 0187 'CABALLERIA' => array('400000', 'caballeria'), 0188 'CABALLERIA_AMERICA' => array('450000', 'caballeria'), 0189 'CABALLERIA_CUBA' => array('134200', 'caballeria'), 0190 'CARREAU' => array('12900', 'carreau'), 0191 'CARUCATE' => array('486000', 'carucate'), 0192 'CAWNEY' => array('5400', 'cawney'), 0193 'CENTIARE' => array('1', 'ca'), 0194 'CONG' => array('1000', 'cong'), 0195 'COVER' => array('2698', 'cover'), 0196 'CUERDA' => array('3930', 'cda'), 0197 'DEKARE' => array('1000', 'dekare'), 0198 'DESSIATINA' => array('10925', 'dessiantina'), 0199 'DHUR' => array('16.929', 'dhur'), 0200 'DUNUM' => array('1000', 'dunum'), 0201 'DUNHAM' => array('1000', 'dunham'), 0202 'FALL_SCOTS' => array('32.15', 'fall'), 0203 'FALL' => array('47.03', 'fall'), 0204 'FANEGA' => array('6430', 'fanega'), 0205 'FARTHINGDALE' => array('1012', 'farthingdale'), 0206 'HACIENDA' => array('89600000', 'hacienda'), 0207 'HECTARE' => array('10000', 'ha'), 0208 'HIDE' => array('486000', 'hide'), 0209 'HOMESTEAD' => array('647500', 'homestead'), 0210 'HUNDRED' => array('50000000', 'hundred'), 0211 'JERIB' => array('2000', 'jerib'), 0212 'JITRO' => array('5755', 'jitro'), 0213 'JOCH' => array('5755', 'joch'), 0214 'JUTRO' => array('5755', 'jutro'), 0215 'JO' => array('1.62', 'jo'), 0216 'KAPPLAND' => array('154.26', 'kappland'), 0217 'KATTHA' => array('338', 'kattha'), 0218 'LABOR' => array('716850', 'labor'), 0219 'LEGUA' => array('17920000', 'legua'), 0220 'MANZANA_COSTA_RICA' => array('6988.96', 'manzana'), 0221 'MANZANA' => array('10000', 'manzana'), 0222 'MORGEN' => array('2500', 'morgen'), 0223 'MORGEN_AFRICA' => array('8567', 'morgen'), 0224 'MU' => array(array('' => '10000', '/' => '15'), 'mu'), 0225 'NGARN' => array('400', 'ngarn'), 0226 'NOOK' => array('80937.128', 'nook'), 0227 'OXGANG' => array('60000', 'oxgang'), 0228 'PERCH' => array('25.29285264', 'perch'), 0229 'PERCHE' => array('34.19', 'perche'), 0230 'PING' => array('3.305', 'ping'), 0231 'PYONG' => array('3.306', 'pyong'), 0232 'RAI' => array('1600', 'rai'), 0233 'ROOD' => array('1011.7141', 'rood'), 0234 'SECTION' => array('2589998.5', 'sec'), 0235 'SHED' => array('10e-52', 'shed'), 0236 'SITIO' => array('18000000', 'sitio'), 0237 'SQUARE' => array('9.290304', 'sq'), 0238 'SQUARE_ANGSTROM' => array('1.0e-20', 'A²'), 0239 'SQUARE_ASTRONOMICAL_UNIT' => array('2.2379523e+22', 'AU²'), 0240 'SQUARE_ATTOMETER' => array('1.0e-36', 'am²'), 0241 'SQUARE_BICRON' => array('1.0e-24', 'µµ²'), 0242 'SQUARE_CENTIMETER' => array('0.0001', 'cm²'), 0243 'SQUARE_CHAIN' => array('404.68726', 'ch²'), 0244 'SQUARE_CHAIN_ENGINEER' => array('929.03412', 'ch²'), 0245 'SQUARE_CITY_BLOCK_US_EAST' => array('4.97027584', 'sq block'), 0246 'SQUARE_CITY_BLOCK_US_WEST' => array('17.141056', 'sq block'), 0247 'SQUARE_CITY_BLOCK_US_SOUTH' => array('99.88110336', 'sq block'), 0248 'SQUARE_CUBIT' => array('0.20903184', 'sq cubit'), 0249 'SQUARE_DECIMETER' => array('0.01', 'dm²'), 0250 'SQUARE_DEKAMETER' => array('100', 'dam²'), 0251 'SQUARE_EXAMETER' => array('1.0e+36', 'Em²'), 0252 'SQUARE_FATHOM' => array('3.3445228', 'fth²'), 0253 'SQUARE_FEMTOMETER' => array('1.0e-30', 'fm²'), 0254 'SQUARE_FERMI' => array('1.0e-30', 'f²'), 0255 'SQUARE_FOOT' => array('0.09290304', 'ft²'), 0256 'SQUARE_FOOT_SURVEY' => array('0.092903412', 'ft²'), 0257 'SQUARE_FURLONG' => array('40468.726', 'fur²'), 0258 'SQUARE_GIGAMETER' => array('1.0e+18', 'Gm²'), 0259 'SQUARE_HECTOMETER' => array('10000', 'hm²'), 0260 'SQUARE_INCH' => array(array('' => '0.09290304','/' => '144'), 'in²'), 0261 'SQUARE_INCH_SURVEY' => array(array('' => '0.092903412','/' => '144'), 'in²'), 0262 'SQUARE_KILOMETER' => array('1000000', 'km²'), 0263 'SQUARE_LEAGUE_NAUTIC' => array('3.0869136e+07', 'sq league'), 0264 'SQUARE_LEAGUE' => array('2.3309986e+07', 'sq league'), 0265 'SQUARE_LIGHT_YEAR' => array('8.9505412e+31', 'ly²'), 0266 'SQUARE_LINK' => array('0.040468726', 'sq link'), 0267 'SQUARE_LINK_ENGINEER' => array('0.092903412', 'sq link'), 0268 'SQUARE_MEGAMETER' => array('1.0e+12', 'Mm²'), 0269 'SQUARE_METER' => array('1', 'm²'), 0270 'SQUARE_MICROINCH' => array(array('' => '1.0e-6','*' => '6.4516e-10'), 'µin²'), 0271 'SQUARE_MICROMETER' => array('1.0e-12', 'µm²'), 0272 'SQUARE_MICROMICRON' => array('1.0e-24', 'µµ²'), 0273 'SQUARE_MICRON' => array('1.0e-12', 'µ²'), 0274 'SQUARE_MIL' => array('6.4516e-10', 'sq mil'), 0275 'SQUARE_MILE' => array(array('' => '0.09290304','*' => '27878400'), 'mi²'), 0276 'SQUARE_MILE_NAUTIC' => array('3429904', 'mi²'), 0277 'SQUARE_MILE_SURVEY' => array('2589998.5', 'mi²'), 0278 'SQUARE_MILLIMETER' => array('0.000001', 'mm²'), 0279 'SQUARE_MILLIMICRON' => array('1.0e-18', 'mµ²'), 0280 'SQUARE_MYRIAMETER' => array('1.0e+8', 'mym²'), 0281 'SQUARE_NANOMETER' => array('1.0e-18', 'nm²'), 0282 'SQUARE_PARIS_FOOT' => array('0.1055', 'sq paris foot'), 0283 'SQUARE_PARSEC' => array('9.5214087e+32', 'pc²'), 0284 'SQUARE_PERCH' => array('25.292954', 'sq perch'), 0285 'SQUARE_PERCHE' => array('51.072', 'sq perche'), 0286 'SQUARE_PETAMETER' => array('1.0e+30', 'Pm²'), 0287 'SQUARE_PICOMETER' => array('1.0e-24', 'pm²'), 0288 'SQUARE_ROD' => array(array('' => '0.092903412','*' => '272.25'), 'rd²'), 0289 'SQUARE_TENTHMETER' => array('1.0e-20', 'sq tenth-meter'), 0290 'SQUARE_TERAMETER' => array('1.0e+24', 'Tm²'), 0291 'SQUARE_THOU' => array('6.4516e-10', 'sq thou'), 0292 'SQUARE_VARA' => array('0.70258205', 'sq vara'), 0293 'SQUARE_VARA_TEXAS' => array('0.71684731', 'sq vara'), 0294 'SQUARE_YARD' => array('0.83612736', 'yd²'), 0295 'SQUARE_YARD_SURVEY' => array('0.836130708', 'yd²'), 0296 'SQUARE_YOCTOMETER' => array('1.0e-48', 'ym²'), 0297 'SQUARE_YOTTAMETER' => array('1.0e+48', 'Ym²'), 0298 'STANG' => array('2709', 'stang'), 0299 'STREMMA' => array('1000', 'stremma'), 0300 'TAREA' => array('628.8', 'tarea'), 0301 'TATAMI' => array('1.62', 'tatami'), 0302 'TONDE_LAND' => array('5516', 'tonde land'), 0303 'TOWNSHIP' => array('93239945.3196288', 'twp'), 0304 'TSUBO' => array('3.3058', 'tsubo'), 0305 'TUNNLAND' => array('4936.4', 'tunnland'), 0306 'YARD' => array('0.83612736', 'yd'), 0307 'VIRGATE' => array('120000', 'virgate'), 0308 'STANDARD' => 'SQUARE_METER' 0309 ); 0310 }