Question about ogrlayerinfo and wfslayerinfo (layer inheritance needed)

Daniel Morissette dmorissette at MAPGEARS.COM
Fri May 19 16:44:35 EDT 2006

Tamas Szekeres wrote:
> I can see the problem by now. WFS layer extends the functionality of the OGR
> layer and each of them should maintain separate layer information.


> In fact the problem could be solved if we could establish a similar concept
> like inheritance in the OO design. WFS layer should be inherited from the
> OGR layer by adding the WFS specific layer information.

Yup, having the WFS layer struct as an extension of the OGR layer struct 
should do. There's a few tricks we can do with C structs to emulate that 
kind of behavior.

> I am thinking of a solution targeting this problem that could allow a layer
> provider to extend the functionality of another provider. The recently added
> vtable architecture makes a good foundation to achieve this. It could also
> bring in great additions of the functionality in other areas.
> For example:
> - we could implement a provider independent feature caching system to
> increase the rendering speed of the applications that can maintain the layer
> object state between the drawings. By reducing the access to the providers
> could decrease the thread interaction of the application as well.
> - we could implement various provider independent data filters.
> - by creating a "layer extender" we could increase the rendering area at the
> provider side to allow drawing of the annotations falling onto the map
> borders (see the related kamap label splitting issue)
> - and many more...

Hummm... this is definitely more than we need for this specific issue 
which is simply that WFS layers use an OGR connection to read the GML.

Daniel Morissette

More information about the mapserver-dev mailing list