[UMN_MAPSERVER-USERS] MS RFC 22: Data adapter support

Tamas Szekeres szekerest at GMAIL.COM
Tue Oct 24 06:10:15 EDT 2006


2006/10/24, Frank Warmerdam <warmerdam at pobox.com>:
> Tamas,
>
> Would you be willing to flesh out some details of how a feature caching
> adapter for work according to RFC 22?  Covering details like what happens
> to the cache when the spatial extent, or other constraints change?  What
> it would look like in the mapfile, etc?
>

Certainly.

I would support 2 rendering modes as:

1. The user could specify a constant extent to the adapter. The
adapter will fetch
the feature from this area regardless from the actual rendering area.
This approach
would be suitable to prefetch all of the features into the memory at
the startup and
no subsequent call to the provider should be made

2. The user could configure the adapter specifying a multiplication
factor (>=1). The
adapter would be aware of the actual extent of the map and when the
extent changes it
will prefetch the features from the new area multiplyed by the factor
mentioned previously.
The cache update could be done automatically or the adapter would
provide a custom
action forcing to reload the cache (even from a background thread).
The actual rendering area and the caching area are stored inside the
adapter specific
configuration structure. I would also provide a setting to control
that the adapter would not
refresh the cache until the actual rendering area falls inside the
prefetched area.

All of the adapter specific configuration should be placed into the METADATA
section of the DATAADAPTER element.

Since the adapter will retain features in the memory I would also
provide a support
to get the features by reference using a member function of
dataAdapterObj from the
mapscript API.
It would allow the user to modify the feature and render it during the
subsequent
drawing. In this case the adapter should be set as not to reload the
cache by itself
(See the 1. rendering mode).


Could I give adequate answer to your question?


Best Regards,

Tamas



More information about the mapserver-dev mailing list