Show
Ignore:
Timestamp:
06/11/10 11:50:38 (2 years ago)
Author:
pracine
Message:

We are always creating only one table, even when loading many rasters and apparently even when using the -l option, so there is no reason to add two CREATE INDEX and VACUUM lines in the SQL output. Adding two CREATE INDEX was making the loading process to abort.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • spike/wktraster/scripts/gdal2wktraster.py

    r5690 r5692  
    359359    logit("MSG: Create GiST spatial index on %s\n" % gist_table) 
    360360 
    361     sql = "CREATE INDEX \"%s_%s_gist\" ON %s USING GIST (st_convexhull(%s));\n" % \ 
     361    sql = "CREATE INDEX \"%s_%s_gist_idx\" ON %s USING GIST (st_convexhull(%s));\n" % \ 
    362362          (gist_table, column, target_table, column) 
    363363    logit("SQL: %s" % sql) 
     
    979979    # INDEX 
    980980    if opts.index and SUMMARY is not None: 
    981         for s in SUMMARY: 
    982             sql = make_sql_create_gist(s[0], opts.column) 
    983             opts.output.write(sql) 
     981        sql = make_sql_create_gist(SUMMARY[0][0], opts.column) 
     982        opts.output.write(sql) 
    984983     
    985984    # COMMIT 
     
    988987    # VACUUM 
    989988    if opts.vacuum and SUMMARY is not None: 
    990         for s in SUMMARY: 
    991             sql = make_sql_vacuum(s[0]) 
    992             opts.output.write(sql) 
     989        sql = make_sql_vacuum(SUMMARY[0][0]) 
     990        opts.output.write(sql) 
    993991 
    994992    # Cleanup