{"html_url": "https://github.com/simonw/sqlite-utils/issues/399#issuecomment-1548913065", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/399", "id": 1548913065, "node_id": "IC_kwDOCGYnMM5cUomp", "user": {"value": 433780, "label": "chrislkeller"}, "created_at": "2023-05-16T03:11:03Z", "updated_at": "2023-05-16T03:11:52Z", "author_association": "NONE", "body": "Using this thread and some [other resources](https://sqlite-utils.datasette.io/en/stable/cli.html#spatialite-helpers) I managed to cobble together a couple of sqlite-utils lines to add a geometry column for a table that already has a lat/lng column.\r\n\r\n```\r\n# add a geometry column\r\nsqlite-utils add-geometry-column [db name] [table name] geometry --type POINT --srid 4326\r\n\r\n# add a point for each row to geometry column\r\nsqlite-utils --load-extension=spatialite [db name] 'update [table name] SET Geometry=MakePoint(longitude, latitude, 4326);'\r\n```", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1124731464, "label": "Make it easier to insert geometries, with documentation and maybe code"}, "performed_via_github_app": null}