{"id":17681795,"url":"https://github.com/jgaskins/postgis","last_synced_at":"2025-03-30T19:21:13.282Z","repository":{"id":143300939,"uuid":"361562894","full_name":"jgaskins/postgis","owner":"jgaskins","description":"PostGIS extensions for the Crystal Postgres client","archived":false,"fork":false,"pushed_at":"2023-06-21T10:46:01.000Z","size":5,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T06:51:24.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jgaskins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-04-25T23:36:45.000Z","updated_at":"2023-07-25T14:45:34.000Z","dependencies_parsed_at":"2025-02-07T03:15:43.855Z","dependency_job_id":null,"html_url":"https://github.com/jgaskins/postgis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaskins%2Fpostgis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaskins%2Fpostgis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaskins%2Fpostgis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaskins%2Fpostgis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgaskins","download_url":"https://codeload.github.com/jgaskins/postgis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246366227,"owners_count":20765652,"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":[],"created_at":"2024-10-24T09:12:11.783Z","updated_at":"2025-03-30T19:21:11.834Z","avatar_url":"https://github.com/jgaskins.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postgis\n\nPostGIS data types and encoders/decoders for the Crystal Postgres driver.\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     postgis:\n       github: jgaskins/postgis\n   ```\n\n2. Run `shards install`\n\n## Usage\n\nEnsure that your database has the `postgis` extension enabled:\n\n```sql\nCREATE EXTENSION postgis\n```\n\nLoad PostGIS into your application\n\n```crystal\nrequire \"postgis\"\n```\n\nIf you're writing raw SQL queries, you can specify the type of the result:\n\n```crystal\ndb.query_one \"SELECT 'point(1 2 3)'::geography\", as: PostGIS::Point3D\n```\n\nIf you're using `DB::Serializable`, you can use `PostGIS` types for the models:\n\n```crystal\nstruct Address\n  include DB::Serializable\n\n  # ...\n  getter coordinates : PostGIS::Point2D\nend\n```\n\nCurrently supported GIS types:\n\n| GIS Type | Crystal type |\n|----------|--------------|\n| `POINT`  | `PostGIS::Point2D`, `PostGIS::Point3D` |\n| `POLYGON` | `PostGIS::Polygon2D` |\n\nMore will be added in the future.\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/jgaskins/postgis/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Jamie Gaskins](https://github.com/jgaskins) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgaskins%2Fpostgis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgaskins%2Fpostgis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgaskins%2Fpostgis/lists"}