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

Class: Image_GIS2

Source Location: /Image_GIS2-0.1.0/Image/GIS2.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>

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/GIS2.php';
  3.  
  4.  // Create new map.
  5.  $map = new Image_GIS2(
  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 ]


Method Detail

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 146]

array getRange( )

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

[ Top ]

Image_GIS   [line 95]

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

Constructor.
  • Access: public

Parameters:

array   $parameters     

[ Top ]

render   [line 155]

void render( )

Renders the image.
  • Access: public

[ Top ]

saveImage   [line 166]

boolean saveImage( string $filename)

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

Parameters:

string   $filename     

[ Top ]

setParser   [line 180]

void setParser( string $parser, boolean $cache)

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

Parameters:

string   $parser     
boolean   $cache     

[ Top ]

setRange   [line 193]

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 204]

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

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

Parameters:

string   $renderer     
   $width     
   $height     

[ Top ]

showImage   [line 213]

void showImage( )

Shows the rendered image.
  • Access: public

[ Top ]


Documentation generated on Mon, 14 May 2012 13:30:03 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.