deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.graphics
Class MapFactory

java.lang.Object
  extended by org.deegree.graphics.MapFactory

public class MapFactory
extends java.lang.Object

Factory class for creating MapViews, Layers and Themes. RB: Is this class really necessary? it just calls the appropriate constructors.

------------------------------------------------------------------------

Version:
$Revision: 18195 $ $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Andreas Poth

Constructor Summary
MapFactory()
           
 
Method Summary
static Layer createFeatureLayer(java.lang.String name)
          creates an empty feature layer with EPSG:4326 as default coordinate reference system.
static Layer createFeatureLayer(java.lang.String name, CoordinateSystem crs)
          creates an empty feature layer.
static Layer createFeatureLayer(java.lang.String name, CoordinateSystem crs, FeatureCollection fc)
          creates a complete feature layer.
static MapView createMapView(java.lang.String name, Envelope boundingbox, CoordinateSystem crs, Theme[] themes, double pixelsize)
          creates a MapView with a name, a boundingbox describing the area coverd by the MapView, a CRS and n Themes.
static Layer createRasterLayer(java.lang.String name, GridCoverage raster)
          creates a raster layer.
static Layer createRasterLayer(java.lang.String name, GridCoverage raster, GetMap request)
           
static Theme createTheme(java.lang.String name, Layer layer)
          creates a theme with a name, a Layer containing the themes data and an array of styles to be known by the Theme
static Theme createTheme(java.lang.String name, Layer layer, UserStyle[] styles)
          creates a theme with a name, a Layer containing the themes data and an array of styles to be known by the Theme
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapFactory

public MapFactory()
Method Detail

createFeatureLayer

public static Layer createFeatureLayer(java.lang.String name)
                                throws java.lang.Exception
creates an empty feature layer with EPSG:4326 as default coordinate reference system. All data that will be added to the layer will be converted to the EPSG:4326 coordinate reference system if no other CRS is set.

Parameters:
name - of the layer
Returns:
the layer with epsg:4326 set as crs
Throws:
java.lang.Exception

createFeatureLayer

public static Layer createFeatureLayer(java.lang.String name,
                                       CoordinateSystem crs)
                                throws java.lang.Exception
creates an empty feature layer. All data that will be added to the layer will be converted to the submitted coordinate reference system if no other CRS is set.

Parameters:
name - of the layer
crs - of the crs
Returns:
the feature layer with given crs and name.
Throws:
java.lang.Exception

createFeatureLayer

public static Layer createFeatureLayer(java.lang.String name,
                                       CoordinateSystem crs,
                                       FeatureCollection fc)
                                throws java.lang.Exception
creates a complete feature layer. If the CRS of the geometries contained within the submitted feature collection are not the same as the submitted CRS all geometries will be converted to the submitted CRS.

Parameters:
name - of the feature layer
crs - of the crs of the feature layer
fc - to get the geometries from
Returns:
to the Layer created from given paraemters.
Throws:
java.lang.Exception

createRasterLayer

public static Layer createRasterLayer(java.lang.String name,
                                      GridCoverage raster)
                               throws java.lang.Exception
creates a raster layer. The required CRS is contained within the GC_GridCoverage object

Parameters:
name - name of raster layer
raster - the raster to create the layer from.
Returns:
the raster layer.
Throws:
java.lang.Exception

createRasterLayer

public static Layer createRasterLayer(java.lang.String name,
                                      GridCoverage raster,
                                      GetMap request)
                               throws java.lang.Exception
Parameters:
name -
raster -
request -
Returns:
the new layer
Throws:
java.lang.Exception

createTheme

public static Theme createTheme(java.lang.String name,
                                Layer layer,
                                UserStyle[] styles)
creates a theme with a name, a Layer containing the themes data and an array of styles to be known by the Theme

Parameters:
name - of the theme
layer - the layer to create the theme from
styles - the styles to set
Returns:
the created theme from given parameters

createTheme

public static Theme createTheme(java.lang.String name,
                                Layer layer)
creates a theme with a name, a Layer containing the themes data and an array of styles to be known by the Theme

Parameters:
name - of the theme
layer - to use
Returns:
the created theme from given parameters

createMapView

public static MapView createMapView(java.lang.String name,
                                    Envelope boundingbox,
                                    CoordinateSystem crs,
                                    Theme[] themes,
                                    double pixelsize)
                             throws java.lang.Exception
creates a MapView with a name, a boundingbox describing the area coverd by the MapView, a CRS and n Themes.

Parameters:
name - of the mapview
boundingbox - of the mapview
crs - of the mapview
themes - of the mapview
pixelsize - used for rendering
Returns:
the mapview created from given parameters
Throws:
java.lang.Exception

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org