org.deegree_impl.graphics
Class MapFactory

java.lang.Object
  extended byorg.deegree_impl.graphics.MapFactory

public class MapFactory
extends java.lang.Object

Factory class for creating MapViews, Layers and Themes.

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

Version:
$Revision: 1.6 $ $Date: 2004/02/09 07:59:36 $
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, CS_CoordinateSystem crs)
          creates an empty feature layer.
static Layer createFeatureLayer(java.lang.String name, CS_CoordinateSystem crs, FeatureCollection fc)
          creates a complete feature layer.
static MapView createMapView(java.lang.String name, GM_Envelope boundingbox)
          creates a MapView with a name and a boundingbox describing the area coverd by the MapView.
static MapView createMapView(java.lang.String name, GM_Envelope boundingbox, CS_CoordinateSystem crs)
          creates a MapView with a name, a boundingbox describing the area coverd by the MapView and a CRS.
static MapView createMapView(java.lang.String name, GM_Envelope boundingbox, CS_CoordinateSystem crs, Layer[] layers)
          creates a MapView with a name, a boundingbox describing the area coverd by the MapView, a CRS and n Layers.
static MapView createMapView(java.lang.String name, GM_Envelope boundingbox, CS_CoordinateSystem crs, Theme[] themes)
          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, GC_GridCoverage raster)
          creates a raster layer.
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.

Throws:
java.lang.Exception

createFeatureLayer

public static Layer createFeatureLayer(java.lang.String name,
                                       CS_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.

Throws:
java.lang.Exception

createFeatureLayer

public static Layer createFeatureLayer(java.lang.String name,
                                       CS_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.

Throws:
java.lang.Exception

createRasterLayer

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

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


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


createMapView

public static MapView createMapView(java.lang.String name,
                                    GM_Envelope boundingbox)
creates a MapView with a name and a boundingbox describing the area coverd by the MapView. The MapView uses EPSG:4326 as default coordinate reference system. All data (Themes, Layers) passed to the MapView will be converted to this CRS.


createMapView

public static MapView createMapView(java.lang.String name,
                                    GM_Envelope boundingbox,
                                    CS_CoordinateSystem crs)
creates a MapView with a name, a boundingbox describing the area coverd by the MapView and a CRS. All data (Themes, Layers) passed to the MapView will be converted to this CRS.


createMapView

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

Throws:
java.lang.Exception

createMapView

public static MapView createMapView(java.lang.String name,
                                    GM_Envelope boundingbox,
                                    CS_CoordinateSystem crs,
                                    Layer[] layers)
                             throws java.lang.Exception
creates a MapView with a name, a boundingbox describing the area coverd by the MapView, a CRS and n Layers. For each submitted Layer a Theme having the same name as the Layer will be created.

Throws:
java.lang.Exception