[gdal-dev] SQLite dialect in OGRDataSource::ExecuteSQL
Pierluigi Guasqui
guasqui at actgate.com
Tue Feb 10 10:05:58 PST 2015
Even,
here is the complete output:
Shape: DBF Codepage = LDID/87 for
D:/act_docs_pierluigi/act_dev/test_gdal_sqlite/xrs_2010jan21_mf2_geometry_polygons.shp
Shape: Treating as encoding 'ISO-8859-1'.
OGR:
OGROpen(D:/act_docs_pierluigi/act_dev/test_gdal_sqlite/xrs_2010jan21_mf2_geometry_polygons.shp/00440BB0)
succeeded as ESRI Shapefile.
SQLITE: OGR style SQLite DB found !
SQLITE: Spatialite not available. Implementing a few functions
OGR2SQLITE: sqlite3_declare_vtab(CREATE TABLE
"xrs_2010jan21_mf2_geometry_polygons"("et" FLOAT,"utc"
VARCHAR(25),"met" VARCHAR(11),"tint" FLOAT,"SunPosX_J2"
FLOAT,"SunPosY_J2" FLOAT,"SunPosZ_J2" FLOAT,"SCPosX_J2"
FLOAT,"SCPosY_J2" FLOAT,"SCPosZ_J2" FLOAT,"SCVelX_J2"
FLOAT,"SCVelY_J2" FLOAT,"SCVelZ_J2" FLOAT,"TargPlanet"
VARCHAR(22),"TP_PosX_J2" FLOAT,"TP_PosY_J2" FLOAT,"TP_PosZ_J2"
FLOAT,"TP2SunX_J2" FLOAT,"TP2SunY_J2" FLOAT,"TP2SunZ_J2"
FLOAT,"TP2SunX_TF" FLOAT,"TP2SunY_TF" FLOAT,"TP2SunZ_TF"
FLOAT,"TP2SC_x_J2" FLOAT,"TP2SC_y_J2" FLOAT,"TP2SC_z_J2"
FLOAT,"TP2SC_x_TF" FLOAT,"TP2SC_y_TF" FLOAT,"TP2SC_z_TF"
FLOAT,"TP_VelX_J2" FLOAT,"TP_VelY_J2" FLOAT,"TP_VelZ_J2"
FLOAT,"TPtrueAnom" FLOAT,"SC2TPctrD" FLOAT,"SubSCLAT"
FLOAT,"SubSCLON" FLOAT,"NADIR_ALT" FLOAT,"SubSolLAT"
FLOAT,"SubSolLON" FLOAT,"sc_inst" VARCHAR(22),"N_BsightV"
VARCHAR(22),"FOV_0" FLOAT,"BS_x_J20" FLOAT,"BS_y_J20"
FLOAT,"BS_z_J20" FLOAT,"BS_x_TBF0" FLOAT,"BS_y_TBF0"
FLOAT,"BS_z_TBF0" FLOAT,"BS_pLon0" FLOAT,"BS_pLat0" FLOAT,"BS_pEmi0"
FLOAT,"BS_pInc0" FLOAT,"BS_pPha0" FLOAT,"SUN2grnd0" FLOAT,"BS_RA0"
FLOAT,"BS_Dec0" FLOAT,"BS_twist0" FLOAT,"TangHght0" FLOAT,"TH_Lon0"
FLOAT,"TH_Lat0" FLOAT,"pNearTBFx0" FLOAT,"pNearTBFy0"
FLOAT,"pNearTBFz0" FLOAT,"sc2BSdist0" FLOAT,"FOV_1" FLOAT,"BS_x_J21"
FLOAT,"BS_y_J21" FLOAT,"BS_z_J21" FLOAT,"BS_x_TBF1"
FLOAT,"BS_y_TBF1" FLOAT,"BS_z_TBF1" FLOAT,"BS_pLon1"
FLOAT,"BS_pLat1" FLOAT,"BS_pEmi1" FLOAT,"BS_pInc1" FLOAT,"BS_pPha1"
FLOAT,"SUN2grnd1" FLOAT,"BS_RA1" FLOAT,"BS_Dec1" FLOAT,"BS_twist1"
FLOAT,"TangHght1" FLOAT,"TH_Lon1" FLOAT,"TH_Lat1" FLOAT,"pNearTBFx1"
FLOAT,"pNearTBFy1" FLOAT,"pNearTBFz1" FLOAT,"sc2BSdist1"
FLOAT,"FOV_2" FLOAT,"BS_x_J22" FLOAT,"BS_y_J22" FLOAT,"BS_z_J22"
FLOAT,"BS_x_TBF2" FLOAT,"BS_y_TBF2" FLOAT,"BS_z_TBF2"
FLOAT,"BS_pLon2" FLOAT,"BS_pLat2" FLOAT,"BS_pEmi2" FLOAT,"BS_pInc2"
FLOAT,"BS_pPha2" FLOAT,"SUN2grnd2" FLOAT,"BS_RA2" FLOAT,"BS_Dec2"
FLOAT,"BS_twist2" FLOAT,"TangHght2" FLOAT,"TH_Lon2" FLOAT,"TH_Lat2"
FLOAT,"pNearTBFx2" FLOAT,"pNearTBFy2" FLOAT,"pNearTBFz2"
FLOAT,"sc2BSdist2" FLOAT,"FOV_3" FLOAT,"BS_x_J23" FLOAT,"BS_y_J23"
FLOAT,"BS_z_J23" FLOAT,"BS_x_TBF3" FLOAT,"BS_y_TBF3"
FLOAT,"BS_z_TBF3" FLOAT,"BS_pLon3" FLOAT,"BS_pLat3" FLOAT,"BS_pEmi3"
FLOAT,"BS_pInc3" FLOAT,"BS_pPha3" FLOAT,"SUN2grnd3" FLOAT,"BS_RA3"
FLOAT,"BS_Dec3" FLOAT,"BS_twist3" FLOAT,"TangHght3" FLOAT,"TH_Lon3"
FLOAT,"TH_Lat3" FLOAT,"pNearTBFx3" FLOAT,"pNearTBFy3"
FLOAT,"pNearTBFz3" FLOAT,"sc2BSdist3" FLOAT,"FOV_4" FLOAT,"BS_x_J24"
FLOAT,"BS_y_J24" FLOAT,"BS_z_J24" FLOAT,"BS_x_TBF4"
FLOAT,"BS_y_TBF4" FLOAT,"BS_z_TBF4" FLOAT,"BS_pLon4"
FLOAT,"BS_pLat4" FLOAT,"BS_pEmi4" FLOAT,"BS_pInc4" FLOAT,"BS_pPha4"
FLOAT,"SUN2grnd4" FLOAT,"BS_RA4" FLOAT,"BS_Dec4" FLOAT,"BS_twist4"
FLOAT,"TangHght4" FLOAT,"TH_Lon4" FLOAT,"TH_Lat4" FLOAT,"pNearTBFx4"
FLOAT,"pNearTBFy4" FLOAT,"pNearTBFz4" FLOAT,"sc2BSdist4"
FLOAT,"FOV_5" FLOAT,"BS_x_J25" FLOAT,"BS_y_J25" FLOAT,"BS_z_J25"
FLOAT,"BS_x_TBF5" FLOAT,"BS_y_TBF5" FLOAT,"BS_z_TBF5"
FLOAT,"BS_pLon5" FLOAT,"BS_pLat5" FLOAT,"BS_pEmi5" FLOAT,"BS_pInc5"
FLOAT,"BS_pPha5" FLOAT,"SUN2grnd5" FLOAT,"BS_RA5" FLOAT,"BS_Dec5"
FLOAT,"BS_twist5" FLOAT,"TangHght5" FLOAT,"TH_Lon5" FLOAT,"TH_Lat5"
FLOAT,"pNearTBFx5" FLOAT,"pNearTBFy5" FLOAT,"pNearTBFz5"
FLOAT,"sc2BSdist5" FLOAT,"FOV_6" FLOAT,"BS_x_J26" FLOAT,"BS_y_J26"
FLOAT,"BS_z_J26" FLOAT,"BS_x_TBF6" FLOAT,"BS_y_TBF6"
FLOAT,"BS_z_TBF6" FLOAT,"BS_pLon6" FLOAT,"BS_pLat6" FLOAT,"BS_pEmi6"
FLOAT,"BS_pInc6" FLOAT,"BS_pPha6" FLOAT,"SUN2grnd6" FLOAT,"BS_RA6"
FLOAT,"BS_Dec6" FLOAT,"BS_twist6" FLOAT,"TangHght6" FLOAT,"TH_Lon6"
FLOAT,"TH_Lat6" FLOAT,"pNearTBFx6" FLOAT,"pNearTBFy6"
FLOAT,"pNearTBFz6" FLOAT,"sc2BSdist6" FLOAT,"BS2SCv_ang"
FLOAT,"IFOVatrack" FLOAT,"IFOVxtrack" FLOAT,"a-smear"
FLOAT,"x-smear" FLOAT,"a-azimuth" FLOAT,"BLatStart"
FLOAT,"BLonStart" FLOAT,"BLatEnd" FLOAT,"BLonEnd" FLOAT,"MET"
VARCHAR(15),"EDRFILE" VARCHAR(14),OGR_STYLE VARCHAR
HIDDEN,"GEOMETRY" BLOB_POLYGON_2D))
ERROR 1: Cannot create virtual table for layer
'xrs_2010jan21_mf2_geometry_polygons' : CREATE VIRTUAL: invalid SQL
statement : CREATE TABLE "xrs_2010jan21_mf2_geometry_polygons"("et"
FLOAT,"utc" VARCHAR(25),"met" VARCHAR(11),"tint" FLOAT,"SunPosX_J2"
FLOAT,"SunPosY_J2" FLOAT,"SunPosZ_J2" FLOAT,"SCPosX_J2"
FLOAT,"SCPosY_J2" FLOAT,"SCPosZ_J2" FLOAT,"SCVelX_J2"
FLOAT,"SCVelY_J2" FLOAT,"SCVelZ_J2" FLOAT,"TargPlanet"
VARCHAR(22),"TP_PosX_J2" FLOAT,"TP_PosY_J2" FLOAT,"TP_PosZ_J2"
FLOAT,"TP2SunX_J2" FLOAT,"TP2SunY_J2" FLOAT,"TP2SunZ_J2"
FLOAT,"TP2SunX_TF" FLOAT,"TP2SunY_TF" FLOAT,"TP2SunZ_TF"
FLOAT,"TP2SC_x_J2" FLOAT,"TP2SC_y_J2" FLOAT,"TP2SC_z_J2"
FLOAT,"TP2SC_x_TF" FLOAT,"TP2SC_y_TF" FLOAT,"TP2SC_z_TF"
FLOAT,"TP_VelX_J2" FLOAT,"TP_VelY_J2" FLOAT,"TP_VelZ_J2"
FLOAT,"TPtrueAnom" FLOAT,"SC2TPctrD" FLOAT,"SubSCLAT"
FLOAT,"SubSCLON" FLOAT,"NADIR_ALT" FLOAT,"SubSolLAT"
FLOAT,"SubSolLON" FLOAT,"sc_inst" VARCHAR(22),"N_BsightV"
VARCHAR(22),"FOV_0" FLOAT,"BS_x_J20" FLOAT,"BS_y_J20"
FLOAT,"BS_z_J20" FLOAT,"BS_x_TBF0" FLOAT,"BS_y_TBF0"
FLOAT,"BS_z_TBF0" FLOAT,"BS_pLon0" FLOAT,"BS_pLat0" FLOAT,"BS_pEmi0"
FLOAT,"BS_pInc0" FLOAT,"BS_pPha0" FLOAT,"SUN2grnd0" FLOAT,"BS_RA0"
FLOAT,"BS_Dec0" FLOAT,"BS_twist0" FLOAT,"TangHght0" FLOAT,"TH_Lon0"
FLOAT,"TH_Lat0" FLOAT,"pNearTBFx0" FLOAT,"pNearTBFy0"
FLOAT,"pNearTBFz0" FLOAT,"sc2BSdist0" FLOAT,"FOV_1" FLOAT,"BS_x_J21"
FLOAT,"BS_y_J21" FLOAT,"BS_z_J21" FLOAT,"BS_x_TBF1"
FLOAT,"BS_y_TBF1" FLOAT,"BS_z_TBF1" FLOAT,"BS_pLon1"
FLOAT,"BS_pLat1" FLOAT,"BS_pEmi1" FLOAT,"BS_pInc1" FLOAT,"BS_pPha1"
FLOAT,"SUN2grnd1" FLOAT,"BS_RA1" FLOAT,"BS_Dec1" FLOAT,"BS_twist1"
FLOAT,"TangHght1" FLOAT,"TH_Lon1" FLOAT,"TH_Lat1" FLOAT,"pNearTBFx1"
FLOAT,"pNearTBFy1" FLOAT,"pNearTBFz1" FLOAT,"sc2BSdist1"
FLOAT,"FOV_2" FLOAT,"BS_x_J22" FLOAT,"BS_y_J22" FLOAT,"BS_z_J22"
FLOAT,"BS_x_TBF2" FLOAT,"BS_y_TBF2" FLOAT,"BS_z_TBF2"
FLOAT,"BS_pLon2" FLOAT,"BS_pLat2" FLOAT,"BS_pEmi2" FLOAT,"BS_pInc2"
FLOAT,"BS_pPha2" FLOAT,"SUN2grnd2" FLOAT,"BS_RA2" FLOAT,"BS_Dec2"
FLOAT,"BS_twist2" FLOAT,"TangHght2" FLOAT,"TH_Lon2" FLOAT,"TH_Lat2"
FLOAT,"pNearTBFx2" FLOAT,"pNearTBFy2" FLOAT,"pNearTBFz2"
FLOAT,"sc2BSdist2" FLOAT,"FOV_3" FLOAT,"BS_x_J23" FLOAT,"BS_y_J23"
FLOAT,"BS_z_J23" FLOAT,"BS_x_TBF3" FLOAT,"BS_y_TBF3"
FLOAT,"BS_z_TBF3" FLOAT,"BS_pLon3" FLOAT,"BS_pLat3" FLOAT,"BS_pEmi3"
FLOAT,"BS_pInc3" FLOAT,"BS_pPha3" FLOAT,"SUN2grnd3" FLOAT,"BS_RA3"
FLOAT,"BS_Dec3" FLOAT,"BS_twist3" FLOAT,"TangHght3" FLOAT,"TH_Lon3"
FLOAT,"TH_Lat3" FLOAT,"pNearTBFx3" FLOAT,"pNearTBFy3"
FLOAT,"pNearTBFz3" FLOAT,"sc2BSdist3" FLOAT,"FOV_4" FLOAT,"BS_x_J24"
FLOAT,"BS_y_J24" FLOAT,"BS_z_J24" FLOAT,"BS_x_TBF4"
FLOAT,"BS_y_TBF4" FLOAT,"BS_z_TBF4" FLOAT,"BS_pLon4"
FLOAT,"BS_pLat4" FLOAT,"BS_pEmi4" FLOAT,"BS_pInc4" FLOAT,"BS_pPha4"
FLOAT,"SUN2grnd4" FLOAT,"BS_RA4" FLOAT,"BS_Dec4" FLOAT,"BS_twist4"
FLOAT,"TangHght4" FLOAT,"TH_Lon4" FLOAT,"TH_Lat4" FLOAT,"pNearTBFx4"
FLOAT,"pNearTBFy4" FLOAT,"pNearTBFz4" FLOAT,"sc2BSdist4"
FLOAT,"FOV_5" FLOAT,"BS_x_J25" FLOAT,"BS_y_J25" FLOAT,"BS_z_J25"
FLOAT,"BS_x_TBF5" FLOAT,"BS_y_TBF5" FLOAT,"BS_z_TBF5"
FLOAT,"BS_pLon5" FLOAT,"BS_pLat5" FLOAT,"BS_pEmi5" FLOAT,"BS_pInc5"
FLOAT,"BS_pPha5" FLOAT,"SUN2grnd5" FLOAT,"BS_RA5" FLOAT,"BS_Dec5"
FLOAT,"BS_twist5" FLOAT,"TangHght5" FLOAT,"TH_Lon5" FLOAT,"TH_Lat5"
FLOAT,"pNearTBFx5" FLOAT,"pNearTBFy5" FLOAT,"pNearTBFz5"
FLOAT,"sc2BSdist5" FLOAT,"FOV_6" FLOAT,"BS_x_J26" FLOAT,"BS_y_J26"
FLOAT,"BS_z_J26" FLOAT,"BS_x_TBF6" FLOAT,"BS_y_TBF6"
FLOAT,"BS_z_TBF6" FLOAT,"BS_pLon6" FLOAT,"BS_pLat6" FLOAT,"BS_pEmi6"
FLOAT,"BS_pInc6" FLOAT,"BS_pPha6" FLOAT,"SUN2grnd6" FLOAT,"BS_RA6"
FLOAT,"BS_Dec6" FLOAT,"BS_twist6" FLOAT,"TangHght6" FLOAT,"TH_Lon6"
FLOAT,"TH_Lat6" FLOAT,"pNearTBFx6" FLOAT,"pNearTBFy6"
FLOAT,"pNearTBFz6" FLOAT,"sc2BSdist6" FLOAT,"BS2SCv_ang"
FLOAT,"IFOVatrack" FLOAT,"IFOVxtrack" FLOAT,"a-smear"
FLOAT,"x-smear" FLOAT,"a-azimuth" FLOAT,"BLatStart"
FLOAT,"BLonStart" FLOAT,"BLatEnd" FLOAT,"BLonEnd" FLOAT,"MET"
VARCHAR(15),"EDRFILE" VARCHAR(14),OGR_STYLE VARCHAR
HIDDEN,"GEOMETRY" BLOB_POLYGON_2D)
SQLITE: OGR style SQLite DB found !
ERROR 1: In ExecuteSQL(): sqlite3_prepare(select * from
xrs_2010jan21_mf2_geometry_polygons):
no such table: xrs_2010jan21_mf2_geometry_polygons
OGR: Unloading VirtualOGR module
SQL syntax error: In ExecuteSQL(): sqlite3_prepare(select * from
xrs_2010jan21_mf2_geometry_polygons):
no such table: xrs_2010jan21_mf2_geometry_polygons
And this is the output of the "ogrinfo" command:
Shape: DBF Codepage = LDID/87 for
xrs_2010jan21_mf2_geometry_polygons.shp
Shape: Treating as encoding 'ISO-8859-1'.
OGR: OGROpen(xrs_2010jan21_mf2_geometry_polygons.shp/00FC5F78)
succeeded as ESRI Shapefile.
OGR: GetLayerCount() = 1
INFO: Open of `xrs_2010jan21_mf2_geometry_polygons.shp'
using driver `ESRI Shapefile' successful.
Layer name: xrs_2010jan21_mf2_geometry_polygons
Geometry: Polygon
Feature Count: 16
Extent: (-155.072038, -8.925269) - (-28.963009, 6.616499)
Layer SRS WKT:
(unknown)
et: Real (24.15)
utc: String (25.0)
met: String (11.0)
tint: Real (24.15)
SunPosX_J2: Real (24.15)
SunPosY_J2: Real (24.15)
SunPosZ_J2: Real (24.15)
SCPosX_J2: Real (24.15)
SCPosY_J2: Real (24.15)
SCPosZ_J2: Real (24.15)
SCVelX_J2: Real (24.15)
SCVelY_J2: Real (24.15)
SCVelZ_J2: Real (24.15)
TargPlanet: String (22.0)
TP_PosX_J2: Real (24.15)
TP_PosY_J2: Real (24.15)
TP_PosZ_J2: Real (24.15)
TP2SunX_J2: Real (24.15)
TP2SunY_J2: Real (24.15)
TP2SunZ_J2: Real (24.15)
TP2SunX_TF: Real (24.15)
TP2SunY_TF: Real (24.15)
TP2SunZ_TF: Real (24.15)
TP2SC_x_J2: Real (24.15)
TP2SC_y_J2: Real (24.15)
TP2SC_z_J2: Real (24.15)
TP2SC_x_TF: Real (24.15)
TP2SC_y_TF: Real (24.15)
TP2SC_z_TF: Real (24.15)
TP_VelX_J2: Real (24.15)
TP_VelY_J2: Real (24.15)
TP_VelZ_J2: Real (24.15)
TPtrueAnom: Real (24.15)
SC2TPctrD: Real (24.15)
SubSCLAT: Real (24.15)
SubSCLON: Real (24.15)
NADIR_ALT: Real (24.15)
SubSolLAT: Real (24.15)
SubSolLON: Real (24.15)
sc_inst: String (22.0)
N_BsightV: String (22.0)
FOV_0: Real (11.0)
BS_x_J20: Real (24.15)
BS_y_J20: Real (24.15)
BS_z_J20: Real (24.15)
BS_x_TBF0: Real (24.15)
BS_y_TBF0: Real (24.15)
BS_z_TBF0: Real (24.15)
BS_pLon0: Real (24.15)
BS_pLat0: Real (24.15)
BS_pEmi0: Real (24.15)
BS_pInc0: Real (24.15)
BS_pPha0: Real (24.15)
SUN2grnd0: Real (24.15)
BS_RA0: Real (24.15)
BS_Dec0: Real (24.15)
BS_twist0: Real (24.15)
TangHght0: Real (24.15)
TH_Lon0: Real (24.15)
TH_Lat0: Real (24.15)
pNearTBFx0: Real (24.15)
pNearTBFy0: Real (24.15)
pNearTBFz0: Real (24.15)
sc2BSdist0: Real (24.15)
FOV_1: Real (11.0)
BS_x_J21: Real (24.15)
BS_y_J21: Real (24.15)
BS_z_J21: Real (24.15)
BS_x_TBF1: Real (24.15)
BS_y_TBF1: Real (24.15)
BS_z_TBF1: Real (24.15)
BS_pLon1: Real (24.15)
BS_pLat1: Real (24.15)
BS_pEmi1: Real (24.15)
BS_pInc1: Real (24.15)
BS_pPha1: Real (24.15)
SUN2grnd1: Real (24.15)
BS_RA1: Real (24.15)
BS_Dec1: Real (24.15)
BS_twist1: Real (24.15)
TangHght1: Real (24.15)
TH_Lon1: Real (24.15)
TH_Lat1: Real (24.15)
pNearTBFx1: Real (24.15)
pNearTBFy1: Real (24.15)
pNearTBFz1: Real (24.15)
sc2BSdist1: Real (24.15)
FOV_2: Real (11.0)
BS_x_J22: Real (24.15)
BS_y_J22: Real (24.15)
BS_z_J22: Real (24.15)
BS_x_TBF2: Real (24.15)
BS_y_TBF2: Real (24.15)
BS_z_TBF2: Real (24.15)
BS_pLon2: Real (24.15)
BS_pLat2: Real (24.15)
BS_pEmi2: Real (24.15)
BS_pInc2: Real (24.15)
BS_pPha2: Real (24.15)
SUN2grnd2: Real (24.15)
BS_RA2: Real (24.15)
BS_Dec2: Real (24.15)
BS_twist2: Real (24.15)
TangHght2: Real (24.15)
TH_Lon2: Real (24.15)
TH_Lat2: Real (24.15)
pNearTBFx2: Real (24.15)
pNearTBFy2: Real (24.15)
pNearTBFz2: Real (24.15)
sc2BSdist2: Real (24.15)
FOV_3: Real (11.0)
BS_x_J23: Real (24.15)
BS_y_J23: Real (24.15)
BS_z_J23: Real (24.15)
BS_x_TBF3: Real (24.15)
BS_y_TBF3: Real (24.15)
BS_z_TBF3: Real (24.15)
BS_pLon3: Real (24.15)
BS_pLat3: Real (24.15)
BS_pEmi3: Real (24.15)
BS_pInc3: Real (24.15)
BS_pPha3: Real (24.15)
SUN2grnd3: Real (24.15)
BS_RA3: Real (24.15)
BS_Dec3: Real (24.15)
BS_twist3: Real (24.15)
TangHght3: Real (24.15)
TH_Lon3: Real (24.15)
TH_Lat3: Real (24.15)
pNearTBFx3: Real (24.15)
pNearTBFy3: Real (24.15)
pNearTBFz3: Real (24.15)
sc2BSdist3: Real (24.15)
FOV_4: Real (11.0)
BS_x_J24: Real (24.15)
BS_y_J24: Real (24.15)
BS_z_J24: Real (24.15)
BS_x_TBF4: Real (24.15)
BS_y_TBF4: Real (24.15)
BS_z_TBF4: Real (24.15)
BS_pLon4: Real (24.15)
BS_pLat4: Real (24.15)
BS_pEmi4: Real (24.15)
BS_pInc4: Real (24.15)
BS_pPha4: Real (24.15)
SUN2grnd4: Real (24.15)
BS_RA4: Real (24.15)
BS_Dec4: Real (24.15)
BS_twist4: Real (24.15)
TangHght4: Real (24.15)
TH_Lon4: Real (24.15)
TH_Lat4: Real (24.15)
pNearTBFx4: Real (24.15)
pNearTBFy4: Real (24.15)
pNearTBFz4: Real (24.15)
sc2BSdist4: Real (24.15)
FOV_5: Real (11.0)
BS_x_J25: Real (24.15)
BS_y_J25: Real (24.15)
BS_z_J25: Real (24.15)
BS_x_TBF5: Real (24.15)
BS_y_TBF5: Real (24.15)
BS_z_TBF5: Real (24.15)
BS_pLon5: Real (24.15)
BS_pLat5: Real (24.15)
BS_pEmi5: Real (24.15)
BS_pInc5: Real (24.15)
BS_pPha5: Real (24.15)
SUN2grnd5: Real (24.15)
BS_RA5: Real (24.15)
BS_Dec5: Real (24.15)
BS_twist5: Real (24.15)
TangHght5: Real (24.15)
TH_Lon5: Real (24.15)
TH_Lat5: Real (24.15)
pNearTBFx5: Real (24.15)
pNearTBFy5: Real (24.15)
pNearTBFz5: Real (24.15)
sc2BSdist5: Real (24.15)
FOV_6: Real (11.0)
BS_x_J26: Real (24.15)
BS_y_J26: Real (24.15)
BS_z_J26: Real (24.15)
BS_x_TBF6: Real (24.15)
BS_y_TBF6: Real (24.15)
BS_z_TBF6: Real (24.15)
BS_pLon6: Real (24.15)
BS_pLat6: Real (24.15)
BS_pEmi6: Real (24.15)
BS_pInc6: Real (24.15)
BS_pPha6: Real (24.15)
SUN2grnd6: Real (24.15)
BS_RA6: Real (24.15)
BS_Dec6: Real (24.15)
BS_twist6: Real (24.15)
TangHght6: Real (24.15)
TH_Lon6: Real (24.15)
TH_Lat6: Real (24.15)
pNearTBFx6: Real (24.15)
pNearTBFy6: Real (24.15)
pNearTBFz6: Real (24.15)
sc2BSdist6: Real (24.15)
BS2SCv_ang: Real (24.15)
IFOVatrack: Real (24.15)
IFOVxtrack: Real (24.15)
a-smear: Real (24.15)
x-smear: Real (24.15)
a-azimuth: Real (24.15)
BLatStart: Real (24.15)
BLonStart: Real (24.15)
BLatEnd: Real (24.15)
BLonEnd: Real (24.15)
MET: String (15.0)
EDRFILE: String (14.0)
Thanks a lot!
Pierluigi
Il 10/02/2015 18:49, Even Rouault ha scritto:
> Le mardi 10 février 2015 18:20:12, Pierluigi Guasqui a écrit :
>> Even,
>>
>> I set the environment variable CPL_DEBUG=ON and rerun my code. I found
>> the statement you mentioned:
>>
>> SQLITE: OGR style SQLite DB found !
>> SQLITE: Spatialite not available. Implementing a few functions
>> OGR2SQLITE: sqlite3_declare_vtab(CREATE TABLE
>> "xrs_2010jan21_mf2_geometry_polygons"("et" FLOAT,"utc" VARCHAR(25), ...
>>
>> but then it printed the following error:
>>
>> ERROR 1: Cannot create virtual table for layer
>> 'xrs_2010jan21_mf2_geometry_polygons' : CREATE VIRTUAL: invalid SQL
>> statement : CREATE TABLE "xrs_2010jan21_mf2_geometry_polygons"("et"
>> FLOAT,"utc" VARCHAR(25), ...
>> SQLITE: OGR style SQLite DB found !
>> ERROR 1: In ExecuteSQL(): sqlite3_prepare(select * from
>> xrs_2010jan21_mf2_geometry_polygons):
>> no such table: xrs_2010jan21_mf2_geometry_polygons
>> OGR: Unloading VirtualOGR module
> Could you paste the full (untruncated) statement ?
> And the output of "ogrinfo -al -so yourshapefile.shp" also
>
>> Any idea why I am getting this error?
>>
>> Thank you!
>> Pierluigi
>>
>> Il 10/02/2015 13:42, Even Rouault ha scritto:
>>> Le mardi 10 février 2015 12:47:46, Pierluigi Guasqui a écrit :
>>>> Hi All!
>>>>
>>>> I am using the GDAL/OGR functions to query a shapefile. This is a sample
>>>>
>>>> code I have been successfully running so far:
>>>> OGRDataSource *poDS = OGRSFDriverRegistrar::Open(
>>>> "some/path/to/myshapefile.shp" );
>>>> OGRLayer *poLayer = poDS->ExecuteSQL( "select * from myshapefile",
>>>> NULL, NULL );
>>>> // ...
>>>> // fetching result features from "poLayer"
>>>> // ...
>>>> poDS->ReleaseResultSet( poLayer );
>>>> OGRDataSource::DestroyDataSource(poDS);
>>>>
>>>> As you can see, I am currently using the OGR SQL dialect, as I am
>>>> passing NULL as the third parameter of the OGRDataSource::ExecuteSQL
>>>> function.
>>>>
>>>> Now I am trying to extend the SQL syntax to be able to use the OGR
>>>> SQLite dialect. I have successfully recompiled GDAL 1.11.1 with SQLite
>>>> support (version 3.8.5) but when I try to execute the same sample code
>>>> (passing "SQLITE" as the 3rd argument of the OGRDataSource::ExecuteSQL
>>>>
>>>> function) I am getting the following error:
>>>> In ExecuteSQL(): sqlite3_prepare(select * from myshapefile): no
>>>> such table: myshapefile
>>>>
>>>> What is the table name that contains the shapefile features that I can
>>>> use in my SQL queries?
>>> Pierluigi,
>>>
>>> That should work... If you tried to configure GDAL several times, perhaps
>>> you should do a make clean.
>>>
>>> Could you try defining CPL_DEBUG=ON as environment variable and rerun
>>> your code. You should normally see a statement like the following one to
>>> create the SQLite virtual table that matches the shapefile layer :
>>>
>>> OGR2SQLITE: sqlite3_declare_vtab(CREATE TABLE "poly"("AREA"
>>> FLOAT,"EAS_ID" FLOAT,"PRFEDEA" VARCHAR(16),OGR_STYLE VARCHAR
>>> HIDDEN,"GEOMETRY"
>>> BLOB_POLYGON_2D_50000))
>>>
>>> Even
--
Pierluigi Guasqui
Software Engineer
Applied Coherent Technology Corporation (ACT)
www.actgate.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150210/fb34b6f6/attachment-0001.html>
More information about the gdal-dev
mailing list