3

Just wondering how to write a non spatial (aspatial) table to geopackage using python. I have attempted using Fiona,

geopackage = 'some_geo.gpkg'    
layer = 'test_layer'
schema = {'geometry': {'type': 'aspatial'}, 'properties': [('filename', 'str')]}

with fiona.open(geopackage, 'w', layer=layer, driver='GPKG', schema=schema) as db:
    record = {'geometry': {'type': 'aspatial'},
              'properties': {'filename': filename[:-4]}}
    db.write(record)

This comes up with a Attribute Error because its trying to strip a dict, but I dont think thats the real issue here.

0

Regular SQLITE3 you can use the .dump command to copy data from one database to another.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.