[mapserver-dev] How to create a new layer provider?

Stephen Woodbridge woodbri at swoodbridge.com
Sun May 23 20:33:47 EDT 2010


Hi all,

I have the possibility of creating a new layer provider for mapserver 
and wanted to bounce some ideas around.

The use case:

Client has a search engine that has some simple spatial capabilities.
We would like to be able to connect mapserver to the search engine, 
probably via an HTTP GET or POST request with a bounding box, and the 
search engine would return a set of records that mapserver would draw.

The search engine would get an adapter written to format the data as 
required, it can currently export data as JSON and XML. These could 
probably be adapted to some existing standards, for example there is 
probably not reason that we could not format data is WKT or WKB 
cononical format like that used in postGIS.

The opportunity:

I am think that writing some custom interface is not much value to the 
community, but if we wrote a generic mapserver consumer interface that 
could be prototyped up in say PHP or python for the data provider, then 
this might be more interesting and we could then also write the search 
engine adapter to use that same interface.

Before I go too far down this line of thought:

1) are there other existing interfaces that this could easily be 
implemented through, like OGR?

2) what would be a good example code that I should look at mimicing a 
new layer provider?

3) I do not want this to get blown out of scope for what the client 
needs, but I would be interested in ideas on how to make this more 
generally useful to the community if we go forward with it.

4) I do not think we want to write a search engine adapter that 
implements something as complex as a WFS service.

Assuming this goes forward, I will write an RFC up after I've done some 
research and gotten some feedback.

Thoughts and ideas welcome,
   -Steve W
    http://imaptools.com/


More information about the mapserver-dev mailing list