{"id":17694952,"url":"https://github.com/asg017/sqlite-tg","last_synced_at":"2025-04-07T15:06:14.481Z","repository":{"id":196226129,"uuid":"695422985","full_name":"asg017/sqlite-tg","owner":"asg017","description":"SQLite extension around tg, a geometric library for limited GIS operations","archived":false,"fork":false,"pushed_at":"2025-03-01T22:48:10.000Z","size":2864,"stargazers_count":43,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T13:08:59.573Z","etag":null,"topics":["sqlite","sqlite-extension"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asg017.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-23T06:11:32.000Z","updated_at":"2025-03-09T17:28:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"e8a9f1c7-dced-409c-86fc-461439fa7167","html_url":"https://github.com/asg017/sqlite-tg","commit_stats":{"total_commits":83,"total_committers":2,"mean_commits":41.5,"dds":0.02409638554216864,"last_synced_commit":"410a40943411715c86b794dc4210c7d3831b6d92"},"previous_names":["asg017/sqlite-tg"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-tg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-tg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-tg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-tg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asg017","download_url":"https://codeload.github.com/asg017/sqlite-tg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675596,"owners_count":20977376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sqlite","sqlite-extension"],"created_at":"2024-10-24T13:50:37.009Z","updated_at":"2025-04-07T15:06:14.455Z","avatar_url":"https://github.com/asg017.png","language":"C","readme":"# sqlite-tg\n\nWork-in-progress geospatial SQLite extension around [tg](https://github.com/tidwall/tg). Not ready yet, but feel free to play with it!\n\nOnce stabilized, will be a part of [sqlite-ecosystem](https://github.com/asg017/sqlite-ecosystem).\n\n## Usage\n\n```sql\n.load ./tg0\n\nselect tg_point_wkt(1, 2);\n-- 'POINT(1 2)'\n```\n\ntg and therefore `sqlite-tg` support WKT, WKB, and GeoJSON. Most functions will accept any of these formats, and you can convert between them with [`tg_to_geojson()`](./docs.md#tg_to_geojson), [`tg_to_wkb()`](./docs.md#tg_to_wkb), and [`tg_to_wkt()`](./docs.md#tg_to_wkt).\n\n```sql\nselect tg_to_geojson('POINT(1 2)');\n-- '{\"type\":\"Point\",\"coordinates\":[1,2]}'\n\nselect tg_to_wkb('POINT(1 2)');\n-- X'0101000000000000000000f03f0000000000000040'\n\nselect tg_to_wkt('{\"type\":\"Point\",\"coordinates\":[1,2]}');\n-- 'POINT(1 2)'\n```\n\n## Documentation\n\nSee [`docs.md`](./docs.md) for a full API reference.\n\n## Installing\n\n| Language       | Install                                                  |                                                                                                                                                                                                     |\n| -------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Python         | `pip install sqlite-tg`                                  | [![PyPI](https://img.shields.io/pypi/v/sqlite-tg.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-tg/)                                                                  |\n| Datasette      | `datasette install datasette-sqlite-tg`                  | [![Datasette](https://img.shields.io/pypi/v/datasette-sqlite-tg.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://datasette.io/plugins/datasette-sqlite-tg)             |\n| sqlite-utils   | `sqlite-utils install sqlite-utils-sqlite-tg`            | [![sqlite-utils](https://img.shields.io/pypi/v/sqlite-utils-sqlite-tg.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://datasette.io/plugins/sqlite-utils-sqlite-tg) |\n| Node.js        | `npm install sqlite-tg`                                  | [![npm](https://img.shields.io/npm/v/sqlite-tg.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-tg)                                                            |\n| Deno           | [`deno.land/x/sqlite_tg`](https://deno.land/x/sqlite_tg) | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-tg?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_tg)                    |\n| Ruby           | `gem install sqlite-tg`                                  | [![Gem](https://img.shields.io/gem/v/sqlite-tg?color=red\u0026logo=rubygems\u0026logoColor=white)](https://rubygems.org/gems/sqlite-tg)                                                                       |\n| Github Release |                                                          | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-tg?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)                                |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasg017%2Fsqlite-tg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasg017%2Fsqlite-tg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasg017%2Fsqlite-tg/lists"}