0

我可以使用 ogrinfo 和 FID 的 sql 过滤数据集读取带有 GDAL 库 (1.10) 的 FileGDB (ArcGIS 10.1)

ogrinfo "...\test.gdb" -sql "SELECT edited FROM 'plz_simple_copy' WHERE fid = 1864" --debug on -dialect OGRSQL

或者通过 OBJECTID 这样

ogrinfo "...\test\plz.gdb" "plz_simple_copy" -where OBJECTID=1864

结果是:

using driver `FileGDB' successful.
Layer name: plz_simple_copy
Geometry: Multi Polygon
.....
plz (String) = 26452
quelle (String) = osm
osm_id (String) = -1187754
edited (DateTime) = 2013/07/09 17:34:49
Shape_Length (Real) = 0.401490815379519
Shape_Area (Real) = 0.00612509834536042

...但我需要按“已编辑”日期字段过滤数据。我尝试了很多变化,例如

ogrinfo "...\test.gdb" "plz_simple_copy" -where edited = '2013/07/09 17:34:49' 
ogrinfo "...\test.gdb" "plz_simple_copy" -where edited = '2013-07-09 17:34:49'    
ogrinfo "...\test.gdb" "plz_simple_copy" -where "edited" = date '2013-07-09 17:34:49'

..但我没有得到它。有人知道如何解决这个问题吗?

来自柏林 ralf 的问候

4

1 回答 1

0

我还在 ArcGIS 论坛“文件地理数据库 API”中打开了这个线程并在那里得到了答案 http://forums.arcgis.com/threads/88662-read-ESRI-FileGeoDataBase-sql-filter-on-date-field

正确的代码必须是

ogrinfo "...\test.gdb" "plz_simple_copy" -where "edited = date '2013/07/09 17:34:49'"

也许有人也需要这个

于 2013-07-17T18:39:22.357 回答