[Geoserver-users] WFS Comparison operatos

hi everybody,

is it possible to encode a filter which does temporal selection ?

ie, uses comparison operatos on timeStamp field in a postGIS datastore ?

Merci !

--
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre __at__ meteo.fr

Sébastien Geindre a écrit :

hi everybody,

is it possible to encode a filter which does temporal selection ?

ie, uses comparison operatos on timeStamp field in a postGIS datastore ?

Merci !

Yes it is : <ogc:Between> does not seem to work...
but it can be done with <ogc:PropertyIsGreaterThan> and <ogc:PropertyIsLessThan>

and what about the time zone ?

which timezone geoserver use when it fills postGIS datastore through WFS ???

<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature service="WFS" version="1.1.0" xmlns:wims="http://www.flysafe-eu.org/wims&quot; xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="http://www.opengis.net/wfs
  http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;

  <wfs:Query typeName="wims:ice_geom">
    <ogc:Filter>
      <ogc:And>
        <ogc:PropertyIsGreaterThan>
          <ogc:PropertyName>issue_time</ogc:PropertyName>
          <ogc:Literal>2006-12-14T12:00:13</ogc:Literal>
        </ogc:PropertyIsGreaterThan>
        <ogc:PropertyIsLessThan>
          <ogc:PropertyName>issue_time</ogc:PropertyName>
          <ogc:Literal>2006-12-14T13:00:13</ogc:Literal>
        </ogc:PropertyIsLessThan>
      </ogc:And>
    </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

--
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre __at__ meteo.fr
05 61 07 84 93

Sébastien Geindre ha scritto:

Sébastien Geindre a écrit :

hi everybody,

is it possible to encode a filter which does temporal selection ?

ie, uses comparison operatos on timeStamp field in a postGIS datastore ?

Merci !

Yes it is : <ogc:Between> does not seem to work...
but it can be done with <ogc:PropertyIsGreaterThan> and <ogc:PropertyIsLessThan>

and what about the time zone ?

which timezone geoserver use when it fills postGIS datastore through

Geoserver has no timezone handling whatsoever now...
Besides, I never played with multiple timezones myself... in GML there
is in fact the possibility to specify the timezone while specifying
a date and time, but how do you know in which timezone the database
server is handling your data? To make a comparison, you have to
reduce all of the times to a common timezone, no?
Cheers
Andrea

Geoserver has no timezone handling whatsoever now...
Besides, I never played with multiple timezones myself... in GML there
is in fact the possibility to specify the timezone while specifying
a date and time, but how do you know in which timezone the database
server is handling your data? To make a comparison, you have to
reduce all of the times to a common timezone, no?
Cheers
Andrea

Thanks Andrea,

Just a small question bug 'Time Conversion Failed' (http://jira.codehaus.org/browse/GEOT-1331) fixed in 1.5 version also fixed in 1.6 version ?

or 1.6 is a branck which forked before the GEOT-1331ixed release ?

this question because it seems that i have this problem with 1.6 version.
i explain :
in my postGIS database i have
id : 4
issue_time (timeStamp) : 2006-12-14 12:18:00

when i request via wfs :

  <wfs:Query typeName="wims:ice_geom">
    <ogc:Filter>
       <ogc:FeatureId fid="1"/>
    </ogc:Filter>
    </wfs:Query>

i get :
<wims:ice_geom fid="ice_geom.1">
   <wims:issue_time>2006-12-14T11:18:00</wims:issue_time>

it seems that postGIS has +01 time zone.
but a SHOW TIMEZONE gives me Europe/Paris which is +02 UTC

and when i change the database type of issue-time colunm to timestamptz (with tz), the data changed into 2006-12-14 12:18:00+01
And that explain thw wfs response.

it seems to be a postGIS configuration problem...But i ask, we never know...perhaps you met this kind f pb....