Serving many shapefiles through WFS

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Fri Oct 19 14:10:48 EDT 2007


 

> -----Original Message-----
> From: UMN MapServer Users List 
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of 
> Kralidis,Tom [Burlington]
> Sent: 19 October, 2007 11:20 AM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Serving many shapefiles through WFS
> 
>  
> 
> > -----Original Message-----
> > From: UMN MapServer Users List
> > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Maarten Plieger
> > Sent: 19 October, 2007 5:44 AM
> > To: MAPSERVER-USERS at LISTS.UMN.EDU
> > Subject: [UMN_MAPSERVER-USERS] Serving many shapefiles through WFS
> > 
> > Hi all,
> > Maybe someone can help me out with this problem:
> > What is the best solution for serving thousands of 
> shapefiles through 
> > a Web Feature Service?
> > These shapefiles are files with daily observations. Every day a new 
> > shapefile is generated and needs to be served.
> > 
> 
> If you're serving observations, you might want to consider 
> MapServer's OGC Sensor Observation Service (SOS) support.
> 
> > Currently I make use of a script which reads the directory with the 
> > names of the shapefiles, this script creates for each shapefile a 
> > layer in the mapfile. This means that there is a layer for each 
> > shapefile, resulting in many layers. The disadvantage is 
> that the map 
> > file will grow to infinite in time, because every day a new file is 
> > added to the mapfile.
> > 
> > In the case of a WMS, it is possible to make use of a 
> TILEINDEX which 
> > contains the names of these shapefiles and their corresponding 
> > time/date of observation. With the WMS TIME parameter one 
> can select 
> > the desired file. In this case only one layer is needed, 
> the file with 
> > the TILEINDEX is the only thing that needs to be updated.
> > 
> > It seems that this is not possible with a Web Feature Service. Am i 
> > right with this?
> > So how can i serve all these shapefiles through WFS?
> >
> 
> WFS 1.0.0 doesn't support the TIME parameter natively.
> 
> SOS supports eventtime as part of the GetObservation operation.
> 
> I've setup a dummy TILEINDEX'd dataset and have tried a GetObservation
> request:
> 
> (tests are doing using trunk):
> 
> http://devgeo.cciw.ca/cgi-bin/mapserv/sostest?service=SOS&vers
> ion=1.0.0&
> request=GetObservation&offering=Water&observedproperty=WaterQu
> ality&resp
> onseFormat=text/xml;%20subtype=om/0.0.0
> 
> http://devgeo.cciw.ca/cgi-bin/mapserv/sostest?service=SOS&vers
> ion=1.0.0&
> request=GetObservation&offering=Water&observedproperty=test_op
> &responseF
> ormat=text/xml;%20subtype=om/0.0.0&eventtime=%3Cgml:TimePeriod
> %3E%3Cgml:
> beginPosition%3E2001-07-11%3C/gml:beginPosition%3E%3Cgml:endPo
> sition%3E2
> 007-07-13%3C/gml:endPosition%3E%3C/gml:TimePeriod%3E
> 
> ...which renders no results, but it should.  I will look 
> further into this.
> 

FYI this is due to the time window processing MapServer does.  There is
a ticket filed at: http://trac.osgeo.org/mapserver/ticket/2196

So, to answer your question, SOS can do what you want, and can do time
querying based on a TILEINDEX'd dataset, but you will have to be careful
w.r.t. the ticket mentioned, maybe defining a slightly larger time
metadata window for the time being.

..Tom



More information about the mapserver-users mailing list