org.deegree.services.wms
Class MapService

java.lang.Object
  extended by org.deegree.services.wms.MapService

public class MapService
extends Object

MapService

Version:
$Revision: 32138 $, $Date: 2011-10-12 15:26:22 +0200 (Wed, 12 Oct 2011) $
Author:
Andreas Schmitz, last edited by: $Author: aschmitz $

Field Summary
 HashMap<String,Layer> layers
           
 StyleRegistry registry
           
 int updateSequence
          The current update sequence.
 
Constructor Summary
MapService()
          Empty map service with an empty root layer.
MapService(ServiceConfigurationType conf, XMLAdapter adapter, DeegreeWorkspace workspace)
           
 
Method Summary
protected static void applyHints(Layer l, Map<Layer,GetMap.Quality> qualities, Map<Layer,GetMap.Interpolation> interpolations, Map<Layer,GetMap.Antialias> antialiases, Graphics2D g)
           
 void close()
           
static void fillInheritedInformation(Layer layer, List<ICRS> srs)
           
 HashMap<Layer,GetMap.Antialias> getDefaultAntialiases()
           
 HashMap<Layer,Integer> getDefaultFeatureInfoRadius()
           
 HashMap<Layer,GetMap.Interpolation> getDefaultInterpolations()
           
 HashMap<Layer,Integer> getDefaultMaxFeatures()
           
 HashMap<Layer,GetMap.Quality> getDefaultQualities()
           
 ArrayList<LayerUpdater> getDynamics()
           
 Pair<FeatureCollection,LinkedList<String>> getFeatures(GetFeatureInfo fi)
           
 Pair<FeatureCollection,LinkedList<String>> getFeatures(RenderingInfo info, List<String> themes)
           
 int getGlobalFeatureInfoRadius()
           
 int getGlobalMaxFeatures()
           
 Layer getLayer(String name)
           
 BufferedImage getLegend(GetLegendGraphic req)
           
 Pair<Integer,Integer> getLegendSize(Style style)
           
 Pair<BufferedImage,LinkedList<String>> getMapImage(GetMap gm)
           
 void getMapImage(RenderContext ctx, RenderingInfo info, List<String> themes)
           
 Layer getRootLayer()
           
 List<FeatureType> getSchema(GetFeatureInfoSchema fis)
           
 StyleRegistry getStyles()
           
 List<Theme> getThemes()
           
 boolean isNewStyle()
           
protected  LinkedList<String> paintLayer(Layer l, Style s, Graphics2D g, GetMap gm)
           
 void paintMap(Graphics2D g, GetMap gm, LinkedList<String> warnings)
          Paints the map on a graphics object.
static BufferedImage prepareImage(Object req)
           
 void update()
          Updates any dynamic layers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layers

public HashMap<String,Layer> layers

registry

public StyleRegistry registry

updateSequence

public int updateSequence
The current update sequence.

Constructor Detail

MapService

public MapService(ServiceConfigurationType conf,
                  XMLAdapter adapter,
                  DeegreeWorkspace workspace)
           throws MalformedURLException
Parameters:
conf -
adapter -
Throws:
MalformedURLException

MapService

public MapService()
Empty map service with an empty root layer.

Method Detail

getThemes

public List<Theme> getThemes()
Returns:
the list of themes if configuration is based on themes, else null

isNewStyle

public boolean isNewStyle()
Returns:
true, if configuration is based on themes

fillInheritedInformation

public static void fillInheritedInformation(Layer layer,
                                            List<ICRS> srs)
Parameters:
layer -
srs -

update

public void update()
Updates any dynamic layers.


getDynamics

public ArrayList<LayerUpdater> getDynamics()
Returns:
the dynamic layer updaters for this map service

getRootLayer

public Layer getRootLayer()
Returns:
the root layer

getLayer

public Layer getLayer(String name)
Parameters:
name -
Returns:
the named layer, or null

paintLayer

protected LinkedList<String> paintLayer(Layer l,
                                        Style s,
                                        Graphics2D g,
                                        GetMap gm)
                                 throws WMSException.MissingDimensionValue,
                                        WMSException.InvalidDimensionValue
Throws:
WMSException.MissingDimensionValue
WMSException.InvalidDimensionValue

prepareImage

public static BufferedImage prepareImage(Object req)
Parameters:
req - should be a GetMap or GetLegendGraphic
Returns:
an empty image conforming to the request parameters

applyHints

protected static void applyHints(Layer l,
                                 Map<Layer,GetMap.Quality> qualities,
                                 Map<Layer,GetMap.Interpolation> interpolations,
                                 Map<Layer,GetMap.Antialias> antialiases,
                                 Graphics2D g)

paintMap

public void paintMap(Graphics2D g,
                     GetMap gm,
                     LinkedList<String> warnings)
              throws WMSException.MissingDimensionValue,
                     WMSException.InvalidDimensionValue
Paints the map on a graphics object.

Parameters:
g -
gm -
warnings -
Throws:
WMSException.InvalidDimensionValue
WMSException.MissingDimensionValue

getFeatures

public Pair<FeatureCollection,LinkedList<String>> getFeatures(RenderingInfo info,
                                                              List<String> themes)
                                                       throws WMSException.MissingDimensionValue,
                                                              WMSException.InvalidDimensionValue
Throws:
WMSException.MissingDimensionValue
WMSException.InvalidDimensionValue

getMapImage

public void getMapImage(RenderContext ctx,
                        RenderingInfo info,
                        List<String> themes)
                 throws WMSException.MissingDimensionValue,
                        WMSException.InvalidDimensionValue
Throws:
WMSException.MissingDimensionValue
WMSException.InvalidDimensionValue

getMapImage

public Pair<BufferedImage,LinkedList<String>> getMapImage(GetMap gm)
                                                   throws WMSException.MissingDimensionValue,
                                                          WMSException.InvalidDimensionValue
Parameters:
gm -
Returns:
a rendered image, containing the requested maps
Throws:
WMSException.InvalidDimensionValue
WMSException.MissingDimensionValue

getFeatures

public Pair<FeatureCollection,LinkedList<String>> getFeatures(GetFeatureInfo fi)
                                                       throws WMSException.MissingDimensionValue,
                                                              WMSException.InvalidDimensionValue
Parameters:
fi -
Returns:
a collection of feature values for the selected area, and warning headers
Throws:
WMSException.InvalidDimensionValue
WMSException.MissingDimensionValue

getSchema

public List<FeatureType> getSchema(GetFeatureInfoSchema fis)
Parameters:
fis -
Returns:
an application schema object

close

public void close()

getStyles

public StyleRegistry getStyles()
Returns:
the style registry

getLegendSize

public Pair<Integer,Integer> getLegendSize(Style style)
Parameters:
style -
Returns:
the optimal legend size

getLegend

public BufferedImage getLegend(GetLegendGraphic req)

getDefaultAntialiases

public HashMap<Layer,GetMap.Antialias> getDefaultAntialiases()
Returns:
the map w/ default settings

getDefaultInterpolations

public HashMap<Layer,GetMap.Interpolation> getDefaultInterpolations()
Returns:
the map w/ default settings

getDefaultQualities

public HashMap<Layer,GetMap.Quality> getDefaultQualities()
Returns:
the map w/ default settings

getDefaultMaxFeatures

public HashMap<Layer,Integer> getDefaultMaxFeatures()
Returns:
the map w/ default settings

getDefaultFeatureInfoRadius

public HashMap<Layer,Integer> getDefaultFeatureInfoRadius()
Returns:
the map w/ default settings

getGlobalFeatureInfoRadius

public int getGlobalFeatureInfoRadius()
Returns:
the default feature info radius

getGlobalMaxFeatures

public int getGlobalMaxFeatures()
Returns:
the global max features setting


Copyright © 2011. All Rights Reserved.