home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1124237013

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association pull_request body repo type active_lock_reason performed_via_github_app reactions draft state_reason
1124237013 I_kwDOCGYnMM5DAn7V 398 Add SpatiaLite helpers to CLI 25778 closed 0     9 2022-02-04T14:01:28Z 2022-02-16T01:02:29Z 2022-02-16T00:58:07Z CONTRIBUTOR  

Now that #385 is merged, add CLI versions of those methods.

```sh

init spatialite

sqlite-utils init-spatialite database.db

or maybe/also

sqlite-utils create database.db --enable-wal --spatialite

add geometry columns

needs a database, table, geometry column name, type, with optional SRID and not-null

this needs to create a table if it doesn't already exist

sqlite-utils add-geometry-column database.db table-name geometry --srid 4326 --not-null

spatial index an existing table/column

sqlite-utils create-spatial-index database.db table-name geometry ```

Should be mostly straightforward. The one thing worth highlighting in docs is that geometry columns can only be added to existing tables. Trying to add a geometry column to a table that doesn't exist yet might mean you have a schema like {"rowid": int, "geometry": bytes}. Might be worth nudging people to explicitly create a table first, then add geometry columns.

140912432 issue    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/398/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed

Links from other tables

  • 3 rows from issues_id in issues_labels
  • 9 rows from issue in issue_comments
Powered by Datasette · Queries took 0.877ms · About: github-to-sqlite