johann sorel wrote:
> Hi, I have few questions about the MapLayer interface.
>
> 1-------------------------------------------------------
> CollectionSource getSource();
>
> I've never seen any use of this method. I always use getFeatureSource Is this 
> deprecated ?
>   
It was used by the JPOX developers so they could have a layer of 
Objects. The ConnectionSource API was common to FeatureSource, 
GridSource and ObjectSource.
What we need to do here is make a small heirarchy of MapLayer classes 
(following the OWS-Context abstractions).
- MapLayer (abstract super with name / title)
- FeatureLayer extends MapLayer with a getFeatureSource() method and 
getStyle() methods
- WMSLayer extends MapLayer with getOWSLayer() and getWMS() methods
- CoverageLayer extends MapLayer with getGridCoverageReader()

The scariest one is the way coverages are currently handled - a Feature 
is made with the GridCoverage as one of the attributes; it is bundled up 
in a FeatureCollecton and handled in the system as an in memory 
DataStore (so you can request GridCoverages that are on screen)
> 2------------------------------------------------------
> public HashMap<String, String> getDimensions();
> public void setDimensions(HashMap<String, String> dimensions);
> public void setDimension(String dimName, String value);
>
> Same thing here, never seen any use of thoses.
>   
We should do a check in the GeoServer and uDig code base to see if they 
can be stripped out.
> 3--------------------------------------------------
> public String getOpacity();
> public void setOpacity(String opacity);
>
> The style of the layer define the opacity. So what is that for ? and why a 
> String ?
>   
Good question; the style of the layer defines opacity on a feature by 
feature basis; this one (my guess) would be used to define how the 
layers are composed onto the screen. Allowing you to control the alpha
for an entire layer in one go (after it is finished rendering). I am not 
sure why it is a String or if it is even used.
> 4----------------------------------------------------
> String getId();
> void setId(String id);
>
> What is the difference between ID and Name ?
> Name is already used as an identifier, title and abstract are used for UI.
>   
Not sure on this one; my guess would be a more complete URI indicating 
where the data is from.


Great questions; this is the worst part of the library in terms of 
random undocumented feature creap. My plan was to set up a heirarchy of 
MapLayers based on the OWS-Context and migrate to it over time.
Jody

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to