<div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hi<div><br></div><div>I have some FlatGeoBuf files I have generated with the python fiona library. This is a lat lon point and a timestamp. So I want to filter by timestamp. What I have come up with is to use gdal sql dialect like this:<br><br>ogrinfo -sql "select * from flatgeobuf_demo where TimeStamp>='2013-06-20T17:00:29Z'" flatgeobuf-data/*<br>INFO: Open of `flatgeobuf-data/points-20130620070000.fgb'<br>      using driver `FlatGeobuf' successful.<br>layer names ignored in combination with -sql.<br><br>Layer name: flatgeobuf_demo<br>Geometry: Point<br>Feature Count: 17<br>Extent: (-55.071900, -57.866400) - (58.263300, 51.737400)<br>Layer SRS WKT:<br>GEOGCRS["WGS 84",<br>    ENSEMBLE["World Geodetic System 1984 ensemble",<br>        MEMBER["World Geodetic System 1984 (Transit)"],<br>        MEMBER["World Geodetic System 1984 (G730)"],<br>        MEMBER["World Geodetic System 1984 (G873)"],<br>        MEMBER["World Geodetic System 1984 (G1150)"],<br>        MEMBER["World Geodetic System 1984 (G1674)"],<br>        MEMBER["World Geodetic System 1984 (G1762)"],<br>        ELLIPSOID["WGS 84",6378137,298.257223563,<br>            LENGTHUNIT["metre",1]],<br>        ENSEMBLEACCURACY[2.0]],<br>    PRIMEM["Greenwich",0,<br>        ANGLEUNIT["degree",0.0174532925199433]],<br>    CS[ellipsoidal,2],<br>        AXIS["geodetic latitude (Lat)",north,<br>            ORDER[1],<br>            ANGLEUNIT["degree",0.0174532925199433]],<br>        AXIS["geodetic longitude (Lon)",east,<br>            ORDER[2],<br>            ANGLEUNIT["degree",0.0174532925199433]],<br>    USAGE[<br>        SCOPE["Horizontal component of 3D system."],<br>        AREA["World."],<br>        BBOX[-90,-180,90,180]],<br>    ID["EPSG",4326]]<br>Data axis to CRS axis mapping: 2,1<br>Geometry Column = _ogr_geometry_<br>TimeStamp: String (0.0)<br>OGRFeature(flatgeobuf_demo):19<br>  TimeStamp (String) = 2013-06-20T17:00:29Z<br>  POINT (11.3157 -5.3703)<br><div><truncated></div><div><br></div><div>However what I want is to make a query with all points between one timestamp and another. And here is my problem: the time parameters come from a request query and have the format YYYY-mm-ddTHH:MM:SSZ. So I need a way to say:</div><div><br></div><div>ogrinfo -sql "select * from flatgeobuf_demo where TimeStamp between '2013-06-20T17:00:29Z' and '2013-06-20T17:00:29Z'+TimeInterval" flatgeobuf-data/*<br></div><div><br></div><div>I could rewrite the flatgeobuf file setting TimeStamp as a float containing the epoch instead. But then I can not convert the incoming query with the time from my request( with fixed format)</div><div><br></div><div>Any idea if, and hopefully how, I can achieve this in OGR SQL?</div><div><br></div><div>Trygve Aspenes</div><div>--<br></div></div></div></div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Trygve Aspenes - Senioringeniør/Senior Engineer
<br>Fjernmåling Utvikling/Remotesensing development  Telefon/Phone: 22963133
<br>Fjernmålingsavdelingen/Remotesensing department  Postboks 43, Blindern
<br>Metklim                                          0313 OSLO
<br>Meteorologisk Institutt
<br>/Norwegian Meteorological Institute               NORWAY
</div></div></div></div></div>