{"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-1074479768", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 1074479768, "node_id": "IC_kwDOBm6k_c5AC0KY", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-21T22:22:20Z", "updated_at": "2022-03-21T22:22:20Z", "author_association": "OWNER", "body": "I'm closing this issue because this is now solved by a number of neat plugins:\r\n\r\n- https://datasette.io/plugins/datasette-geojson-map shows the geometry from SpatiaLite columns on a map\r\n- https://datasette.io/plugins/datasette-leaflet-geojson can be used to display inline maps next to each column", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-393014943", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 393014943, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MzAxNDk0Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-30T02:59:53Z", "updated_at": "2018-05-30T02:59:53Z", "author_association": "OWNER", "body": "I just realised a problem with GeoJSON is that it assumes that the underlying geometry is WGS 84 latitude/longitude points - but it's very possible for a SpatiaLite geometry to contain geometric data that's nothing to do with geospatial projections.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-392969173", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 392969173, "node_id": "MDEyOklzc3VlQ29tbWVudDM5Mjk2OTE3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-29T22:32:08Z", "updated_at": "2018-05-29T22:32:08Z", "author_association": "OWNER", "body": "The more time I spend with SpatiaLite the more convinced I am that this should be default behavior. There's nothing useful about the binary Geometry representation - it's not even valid WKB. I'm on board with WKT as the default display in HTML and GeoJSON as the default for `.json`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-392815673", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 392815673, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MjgxNTY3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-29T15:17:04Z", "updated_at": "2018-05-29T15:17:04Z", "author_association": "OWNER", "body": "I'm coming round to the idea that this should be baked into Datasette core - see above referenced issues for some of the explorations I've been doing around this area.\r\n\r\nDatasette should absolutely work without SpatiaLite, but it's such a huge bonus part of the SQLite ecosystem that I'm happy to ship features that take advantage of it without being relegated to plugins.\r\n\r\nI'm also becoming aware that there aren't really that many other interesting loadable extensions for SQLite. If SpatiaLite was one of dozens I'd feel that a rule that \"anything dependent on an extension lives in a plugin\" would make sense, but as it stands I think 99% of the time the only loadable extensions people will be using will be SpatiaLite and json1 (and json1 is available in the amalgamation anyway).\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-392316306", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 392316306, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MjMxNjMwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-27T09:00:46Z", "updated_at": "2018-05-27T09:00:46Z", "author_association": "OWNER", "body": "Relevant to this ticket: I've been playing with a plugin that automatically renders any GeoJSON cells as leaflet maps: https://github.com/simonw/datasette-leaflet-geojson", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-392316250", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 392316250, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MjMxNjI1MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-27T08:59:46Z", "updated_at": "2018-05-27T08:59:46Z", "author_association": "OWNER", "body": "It looks like we can use the `geometry_columns` table to introspect which columns are SpatiaLite geometries. It includes a `geometry_type` integer which is documented here: https://www.gaia-gis.it/fossil/libspatialite/wiki?name=switching-to-4.0", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-392279644", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 392279644, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MjI3OTY0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-26T18:34:21Z", "updated_at": "2018-05-26T18:34:21Z", "author_association": "OWNER", "body": "I've been thinking a bit about modifying the SQL select statement used for the table view recently. I've run into a few examples of SQLite database that slow to a crawl when viewed with datasette because the rows are too big, so there's definitely scope for supporting custom select clauses (avoiding some columns, showing length(colname) for others).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-392279508", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 392279508, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MjI3OTUwOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-26T18:32:07Z", "updated_at": "2018-05-26T18:32:07Z", "author_association": "OWNER", "body": "Related: I started the documentation for using SpatiaLite with Datasette here: https://datasette.readthedocs.io/en/latest/spatialite.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-391504757", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 391504757, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MTUwNDc1Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-23T21:37:07Z", "updated_at": "2018-05-23T21:37:18Z", "author_association": "OWNER", "body": "That said, it looks like we may be able to use a library like https://github.com/geomet/geomet to run the conversion from WKB entirely in Python space.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-391504199", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 391504199, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MTUwNDE5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-23T21:35:17Z", "updated_at": "2018-05-23T21:35:17Z", "author_association": "OWNER", "body": "I'm not keen on anything that modifies the SQLite file itself on startup - part of the datasette contract is that it should work with any SQLite file you throw at it without having any side-effects.\r\n\r\nA neat thing about SQLite is that because everything happens in the same process there's very little additional overhead involved in executing extra SQL queries - even if we ran a query-per-row to transform data in one specific column it shouldn't add more than a few ms to the total page load time (whereas with MySQL all of the extra query overhead would kill us).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-391025841", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 391025841, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MTAyNTg0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-22T15:06:36Z", "updated_at": "2018-05-22T15:06:36Z", "author_association": "OWNER", "body": "The other reason I mention plugins is that I have an idea to outlaw JavaScript entirely from Datasette core and instead encourage ALL JavaScript functionality to move into plugins.right now that just means CodeMirror. I may set up some of those plugins (like CodeMirror) as default dependencies so you get them from \"pip install datasette\".\r\n\r\nI like the neatness of saying that core Datasette is a very simple JSON + HTML application, then encouraging people to go completely wild with JavaScript in the plugins.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-391000659", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 391000659, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MTAwMDY1OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-22T13:59:27Z", "updated_at": "2018-05-22T13:59:27Z", "author_association": "OWNER", "body": "Right now the plugin stuff is early enough that I'd like to get as many potential plugin hooks as possible crafted out A much easier to judge if they should be added as actual hooks if we have a working branch prototype of them.\r\n\r\nSome kind of mechanism for custom column display is already needed - eg there are columns where I want to say \"render this as markdown\" or \"URLify any links in this text\" - or even \"use this date format\" or \"add commas to this integer\".\r\n\r\nYou can do it with a custom template but a lower-level mechanism would be nicer. ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/276#issuecomment-390707760", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/276", "id": 390707760, "node_id": "MDEyOklzc3VlQ29tbWVudDM5MDcwNzc2MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-21T16:30:35Z", "updated_at": "2018-05-21T16:30:35Z", "author_association": "OWNER", "body": "This probably needs to be in a plugin simply because getting Spatialite compiled and installed is a bit of a pain.\r\n\r\nIt's a great opportunity to expand the plugin hooks in useful ways though.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324835838, "label": "Handle spatialite geometry columns better"}, "performed_via_github_app": null}