Source for file E00.php
Documentation is available at E00.php
// +------------------------------------------------------------------------+
// | PEAR :: Image :: GIS :: E00 Parser |
// +------------------------------------------------------------------------+
// | Copyright (c) 2002-2005 Jan Kneschke <jan@kneschke.de> and |
// | Sebastian Bergmann <sb@sebastian-bergmann.de>. |
// +------------------------------------------------------------------------+
// | This source file is subject to version 3.00 of the PHP License, |
// | that is available at http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +------------------------------------------------------------------------+
// $Id: E00.php 299207 2010-05-10 10:21:58Z clockwerx $
require_once 'Image/GIS/LineSet.php';
require_once 'Image/GIS/Parser.php';
* @author Jan Kneschke <jan@kneschke.de>
* @author Sebastian Bergmann <sb@sebastian-bergmann.de>
* @copyright Copyright © 2002-2005 Jan Kneschke <jan@kneschke.de> and Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0
* @param string $dataFile
if ($fp = @fopen($dataFile, 'r')) {
while (0 || $line = fgets($fp, 1024 )) {
preg_match("#^\s+([0-9]+)\s+([-0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)#", $line, $a)) {
preg_match("#^([ -][0-9]\.[0-9]{7}E[-+][0-9]{2})([ -][0-9]\.[0-9]{7}E[-+][0-9]{2})([ -][0-9]\.[0-9]{7}E[-+][0-9]{2})([ -][0-9]\.[0-9]{7}E[-+][0-9]{2})#", $line, $a)) {
$lineSet->addLine ($pl['x'], $pl['y'], $a[1 ], $a[2 ]);
$lineSet->addLine ($a[1 ], $a[2 ], $a[3 ], $a[4 ]);
preg_match("#^([ -][0-9]\.[0-9]{7}E[-+][0-9]{2})([ -][0-9]\.[0-9]{7}E[-+][0-9]{2})#", $line, $a)) {
$lineSet->addLine ($pl['x'], $pl['y'], $a[1 ], $a[2 ]);
Documentation generated on Mon, 11 Mar 2019 15:39:26 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|