Arcsi data download error

53 views
Skip to first unread message

Matteo Corvi

unread,
Feb 18, 2019, 11:53:58 AM2/18/19
to RSGISLib Support
Hi all,

I am currently having troubles with the data download utilities. When running arcsisetupsen2db.py and the indexes are downloaded I get:

Create and load data into a sqlite db:
#Error: near ",": syntax error

sqlite package installed is 3.26.
arcsi 3.1.6.

Does anyone know a way around this?


All the best,

Matteo

jrc15...@gmail.com

unread,
Apr 8, 2019, 6:47:57 AM4/8/19
to RSGISLib Support

Hi Matteo, 

 

You need to edit the SQL command of the ‘arcsisetupsen2db.py’. this will be located in your ARCSI file in environment folder. I did the following changes and it worked. 

 

From:

 

sqlcmd = "INSERT INTO sen2 (COUNT, GRANULE_ID, PRODUCT_ID, DATATAKE_IDENTIFIER, MGRS_TILE, SENSING_TIME, TOTAL_SIZE, CLOUD_COVER, GEOMETRIC_QUALITY_FLAG, GENERATION_TIME, NORTH_LAT, SOUTH_LAT, WEST_LON, EAST_LON, BASE_URL) VALUES ("+str(keyCount)+", '"+lineComps[0]+"', '"+lineComps[1]+"', '"+lineComps[2]+"', '"+lineComps[3]+"', '"+lineComps[4]+"', '"+lineComps[5]+"', "+lineComps[6]+", "+lineComps[7]+", '"+lineComps[8]+"', "+lineComps[9]+", "+lineComps[10]+", "+lineComps[11]+", "+lineComps[12]+", '"+lineComps[13]+"')"

#print(sqlcmd)

ggSen2DBConn.execute(sqlcmd)


To:

                       sqlcmd = """INSERT INTO 'sen2' ('COUNT', 'GRANULE_ID', 'PRODUCT_ID', 'DATATAKE_IDENTIFIER', 'MGRS_TILE', 'SENSING_TIME', 'TOTAL_SIZE', 'CLOUD_COVER', 'GEOMETRIC_QUALITY_FLAG', 'GENERATION_TIME', 'NORTH_LAT', 'SOUTH_LAT', 'WEST_LON', 'EAST_LON', 'BASE_URL') VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"""

                       val = (

                                                                                    str(keyCount),

                                                                                    lineComps[0],

                                                                                    lineComps[1],

                                                                                    lineComps[2],

                                                                                    lineComps[3],

                                                                                    lineComps[4],

                                                                                    lineComps[5],

                                                                                    lineComps[6],

                                                                                    lineComps[7],

                                                                                    lineComps[8],

                                                                                    lineComps[9],

                                                                                    lineComps[10],

                                                                                    lineComps[11],

                                                                                    lineComps[12],

                                                                                    lineComps[13]

                                                                          )

                                                                          

                       #print(sqlcmd)

                       ggSen2DBConn.execute(sqlcmd, val)


Best,


Jack

Reply all
Reply to author
Forward
0 new messages