[mapserver-users] WFS limit time interval to POSTGIS
Yewondwossen Assefa
yassefa at dmsolutions.ca
Thu Mar 18 13:20:19 PDT 2010
Heiko Schröter wrote:
> Hello,
>
> by setting up a WFS server i need to limit the time interval for the requests to the postgis db (Millions of data points inside POSTGIS).
> The WMS part with time interval requests is working and i'am trying to make these data available through WFS as well.
>
> What i can find in the docs is a FILTER with a WFS Client connecting a WFS server.
> But this seems not to apply for DATE interval calculus.
>
> The only thing i get in the moment is the whole data set at once or the first NUMBER (here 10) of entries.
>
> Is it possible at all to limit the requested time interval to a WFS server ?
> i.e. something like TIME=2007-1-2/2007-1-3
>
>
Hi there,
There is no explicit support of a TIME parameter in wfs but I believe
It should be possible on a postgis layer to use the FilterEncoding to
limit the request: would something like this work for you:
Filter=<Filter><And><PropertyIsGreaterThan><PropertyName>your_time_field</PropertyName><Literal>2007-01-02</Literal></PropertyIsGreaterThan><PropertyIsLessThan><PropertyName>your_time_field</PropertyName><Literal>2007-01-03</Literal></PropertyIsLessThan></And></Filter>
regards,
> Thanks and Regards
> Heiko
>
>
> LAYER
> EXTENT -180 -90 180 90
> CONNECTIONTYPE POSTGIS
> NAME "TEST"
> PROCESSING "CLOSE_CONNECTION=DEFER"
> OPACITY 60
> STATUS ON
> DUMP TRUE
> METADATA
> "wfs_title" "test"
> "wfs_maxfeatures" "10"
> "gml_featureid" "ID" ## REQUIRED
> "gml_include_items" "all" ## Optional (serves all attributes for layer)
> "gml_geometries" "rechteck"
> "gml_rechteck_type" "polygon"
> END
> PROJECTION
> "init=epsg:4326"
> END
> CONNECTION "user={BF961C25A57BA226} password={C9748CA35D48D049} dbname={6B40E65B12B92106} host=localhost"
> DATA "rechteck from test_data using srid=-1 using unique datum"
> TYPE POLYGON
> SIZEUNITS meters
> CLASS
> NAME "test_class"
> STYLE
> OUTLINECOLOR 0 0 0
> COLOR [farbe]
> END
> END
> END # Layer
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
More information about the MapServer-users
mailing list