[Mapserver-dev] Advice requested

Frank Warmerdam warmerdam at pobox.com
Fri Feb 20 21:42:11 EST 2004


Ned Harding wrote:
> I have our proprietary vector file format as well as a thematic join to our
> demographic retrieval engine done and working within MapServer, but right
> now I have it pretty hacked in to MapServer and I'm looking for a more
> general solution so I don't have to completely reimplement with each
> MapServer build.
> 
> Would people rather see me implement a CONNECTIONTYPE "Custom" and some sort
> of plugin interface so any proprietary data sources would go through the
> same function stubs with maybe a run time binding (a structure full of
> pointers, similar to C++ virtual functions), or should I just create a
> CONNECTIONTYPE "SRC_GEO" and provide stub functions to CVS that say that
> file format is not implemented?
> 
> Once again, thanks to all the MapServer developers.  This is good stuff.  If
> anyone wants to see a rough demo of MapServer dynamically theming with a
> choice of thousands of demographic variables, let me know and I'll send you
> a link.

Ned,

What about using the name of the shared library or DLL to be loaded as the
value for the CONNECTIONTYPE?  In the code a dynamic connection type code
would be assigned when otherwise unknown connection types with a .so or .dll
ending are encountered, and the .so/DLL would be loaded.  Some standard function
name could be invoked to populate the structure full of function pointers.

Alternatively a CONNECTIONTYPE of CUSTOM with a PROCESSING "LIB=..." directive
used to indicate what shared library or DLL should be loaded.

The advantage of this sort of approach is that stock builds of MapServer could
load custom connection types without having them built in, or being limited to
just one connection type.  Of course the approach is a bit complicated.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the mapserver-dev mailing list