Image_GIS
[ class tree: Image_GIS ] [ index: Image_GIS ] [ all elements ]

Class: Image_GIS

Source Location: /Image_GIS-1.1.2/Image/GIS.php

Class Overview


The following example draws the region around the German city of Kiel which is Jan's home town:


Author(s):

Copyright:

  • Copyright &copy; 2002-2005 Jan Kneschke <jan@kneschke.de> and Sebastian Bergmann <sb@sebastian-bergmann.de>

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 67]
The following example draws the region around the German city of Kiel which is Jan's home town:

  1.  <?php
  2.  require_once 'Image/GIS.php';
  3.  
  4.  // Create new map.
  5.  $map = new Image_GIS(
  6.    array(
  7.      'width'  =>  960,
  8.      'height' => 1280,
  9.      'range'  => array(
  10.        'x1' => 9.7,
  11.        'x2' => 10.5,
  12.        'y1' => 54.2,
  13.        'y2' => 54.7
  14.      )
  15.    )
  16.  );
  17.  
  18.  // Political
  19.  $map->addDataFile('germany_ponet.e00',  'black');
  20.  
  21.  // Roads
  22.  $map->addDataFile('germany_rdline.e00''gray');
  23.  
  24.  // Populated Places
  25.  $map->addDataFile('germany_pppoly.e00''green');
  26.  
  27.  // Drainage
  28.  $map->addDataFile('germany_dnnet.e00',  'blue');
  29.  
  30.  $map->saveImage('kiel.png');
  31.  ?>



[ Top ]


Class Variables

$debug =

[line 73]

Set to TRUE to enable debugging.

Type:   boolean


[ Top ]

$parser =

[line 80]

Image_GIS_Parser sub-class object.

Type:   Image_GIS_Parser


[ Top ]

$renderer =

[line 87]

Image_GIS_Renderer sub-class object.

Type:   Image_GIS_Renderer


[ Top ]



Method Detail

Image_GIS (Constructor)   [line 95]

Image_GIS Image_GIS( [array $parameters = array()])

Constructor.
  • Access: public

Parameters:

array   $parameters   — 

[ Top ]

addDataFile   [line 131]

boolean addDataFile( string $dataFile, mixed $color)

Adds a datafile to the map.
  • Access: public

Parameters:

string   $dataFile   — 
mixed   $color   — 

[ Top ]

getRange   [line 148]

array getRange( )

Returns the range of the data to be rendered.
  • Since: Image_GIS 1.0.1
  • Access: public

[ Top ]

render   [line 157]

void render( )

Renders the image.
  • Access: public

[ Top ]

saveImage   [line 168]

boolean saveImage( string $filename)

Saves the rendered image to a given file.
  • Access: public

Parameters:

string   $filename   — 

[ Top ]

setParser   [line 182]

void setParser( string $parser, boolean $cache)

Sets the Image_GIS_Parser sub-class to be used to parse a data file.
  • Access: public

Parameters:

string   $parser   — 
boolean   $cache   — 

[ Top ]

setRange   [line 195]

void setRange( float $x1, float $x2, float $y1, float $y2)

Sets the range of the data to be rendered.
  • Access: public

Parameters:

float   $x1   — 
float   $x2   — 
float   $y1   — 
float   $y2   — 

[ Top ]

setRenderer   [line 206]

void setRenderer( string $renderer, $width, $height)

Sets the Image_GIS_Renderer sub-class to be used to render an image.
  • Access: public

Parameters:

string   $renderer   — 
   $width   — 
   $height   — 

[ Top ]

showImage   [line 215]

void showImage( )

Shows the rendered image.
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:39:26 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.