github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/sqlite-utils/issues/134#issuecomment-678474018 | https://api.github.com/repos/simonw/sqlite-utils/issues/134 | 678474018 | MDEyOklzc3VlQ29tbWVudDY3ODQ3NDAxOA== | 9599 | 2020-08-21T20:16:20Z | 2020-08-21T20:16:20Z | OWNER | Trickiest part of this is how to write a test for it. I'll do a `pytest.skipIf` that only executes the test if SpatiaLite is available. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
683804172 | |
https://github.com/simonw/sqlite-utils/issues/134#issuecomment-678474928 | https://api.github.com/repos/simonw/sqlite-utils/issues/134 | 678474928 | MDEyOklzc3VlQ29tbWVudDY3ODQ3NDkyOA== | 9599 | 2020-08-21T20:18:33Z | 2020-08-21T20:18:33Z | OWNER | This should get me SpatiaLite in the GitHub Actions Ubuntu: ``` apt install libsqlite3-mod-spatialite ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
683804172 | |
https://github.com/simonw/sqlite-utils/issues/135#issuecomment-678475578 | https://api.github.com/repos/simonw/sqlite-utils/issues/135 | 678475578 | MDEyOklzc3VlQ29tbWVudDY3ODQ3NTU3OA== | 9599 | 2020-08-21T20:20:05Z | 2020-08-21T20:20:05Z | OWNER | https://github.com/simonw/cryptozoology/blob/2ad69168f3b78ebd90a2cbeea8136c9115e2a9b7/build_cryptids_database.py#L16-L22 ```python try_these = ( "mod_spatialite", "/usr/local/lib/mod_spatialite.dylib", "/usr/lib/x86_64-linux-gnu/mod_spatialite.so", "/usr/lib/x86_64-linux-gnu/libspatialite.so.5", "/usr/lib/x86_64-linux-gnu/libspatialite.so.7", ) ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
683805434 | |
https://github.com/simonw/sqlite-utils/issues/134#issuecomment-678476338 | https://api.github.com/repos/simonw/sqlite-utils/issues/134 | 678476338 | MDEyOklzc3VlQ29tbWVudDY3ODQ3NjMzOA== | 9599 | 2020-08-21T20:22:02Z | 2020-08-21T20:22:02Z | OWNER | I think that adds it as `/usr/lib/x86_64-linux-gnu/mod_spatialite.so`. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
683804172 | |
https://github.com/simonw/sqlite-utils/issues/135#issuecomment-678476842 | https://api.github.com/repos/simonw/sqlite-utils/issues/135 | 678476842 | MDEyOklzc3VlQ29tbWVudDY3ODQ3Njg0Mg== | 9599 | 2020-08-21T20:23:13Z | 2020-08-21T20:23:13Z | OWNER | I'm going to start with just the first two - I'm not convinced I understand the `.so.5` variants. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
683805434 | |
https://github.com/simonw/sqlite-utils/issues/135#issuecomment-678479741 | https://api.github.com/repos/simonw/sqlite-utils/issues/135 | 678479741 | MDEyOklzc3VlQ29tbWVudDY3ODQ3OTc0MQ== | 9599 | 2020-08-21T20:30:37Z | 2020-08-21T20:30:37Z | OWNER | Docs: https://github.com/simonw/sqlite-utils/blob/bf4c6b7c82fab6b2400e48424f8dac1ae2f0a2dc/docs/python-api.rst#finding-spatialite | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
683805434 | |
https://github.com/simonw/sqlite-utils/issues/136#issuecomment-678480969 | https://api.github.com/repos/simonw/sqlite-utils/issues/136 | 678480969 | MDEyOklzc3VlQ29tbWVudDY3ODQ4MDk2OQ== | 9599 | 2020-08-21T20:33:45Z | 2020-08-21T20:33:45Z | OWNER | I think this should initialize SpatiaLite against the current database if it has not been initialized already. Relevant code: https://github.com/simonw/shapefile-to-sqlite/blob/e754d0747ca2facf9a7433e2d5d15a6a37a9cf6e/shapefile_to_sqlite/utils.py#L112-L126 ```python def init_spatialite(db, lib): db.conn.enable_load_extension(True) db.conn.load_extension(lib) # Initialize SpatiaLite if not yet initialized if "spatial_ref_sys" in db.table_names(): return db.conn.execute("select InitSpatialMetadata(1)") def ensure_table_has_geometry(db, table, table_srid): if "geometry" not in db[table].columns_dict: db.conn.execute( "SELECT AddGeometryColumn(?, 'geometry', ?, 'GEOMETRY', 2);", [table, table_srid], ) ``` Not sure if I should add a utility function or CLI command for that `ensure_table_has_geometry` bit. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
683812642 | |
https://github.com/simonw/sqlite-utils/issues/134#issuecomment-678497497 | https://api.github.com/repos/simonw/sqlite-utils/issues/134 | 678497497 | MDEyOklzc3VlQ29tbWVudDY3ODQ5NzQ5Nw== | 9599 | 2020-08-21T21:06:26Z | 2020-08-21T21:06:26Z | OWNER | Ended up needing two skipIfs: https://github.com/simonw/sqlite-utils/blob/7e9aad7e1c09d1cf80d0b4d17d6157212a4b857d/tests/test_cli.py#L888-L893 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
683804172 | |
https://github.com/simonw/sqlite-utils/issues/137#issuecomment-678507502 | https://api.github.com/repos/simonw/sqlite-utils/issues/137 | 678507502 | MDEyOklzc3VlQ29tbWVudDY3ODUwNzUwMg== | 9599 | 2020-08-21T21:13:19Z | 2020-08-21T21:13:19Z | OWNER | Adding `--spatialite` too would be great for usability: #136 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
683830416 | |
https://github.com/simonw/sqlite-utils/issues/136#issuecomment-678508056 | https://api.github.com/repos/simonw/sqlite-utils/issues/136 | 678508056 | MDEyOklzc3VlQ29tbWVudDY3ODUwODA1Ng== | 9599 | 2020-08-21T21:13:41Z | 2020-08-21T21:13:41Z | OWNER | The `--spatialite` option should be available for other useful commands too, refs #137. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
683812642 |