{"id":19944983,"url":"https://github.com/geocrystal/geojson_area","last_synced_at":"2025-06-17T04:36:43.179Z","repository":{"id":152333951,"uuid":"251048961","full_name":"geocrystal/geojson_area","owner":"geocrystal","description":"Calculate the area inside of any GeoJSON geometry","archived":false,"fork":false,"pushed_at":"2024-04-30T07:55:01.000Z","size":19,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T18:25:15.475Z","etag":null,"topics":["crystal","geojson"],"latest_commit_sha":null,"homepage":"","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/geocrystal.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":"2020-03-29T14:15:11.000Z","updated_at":"2024-05-17T16:50:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"b267346f-4889-45cf-92a1-c08c77dc4b1d","html_url":"https://github.com/geocrystal/geojson_area","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocrystal%2Fgeojson_area","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocrystal%2Fgeojson_area/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocrystal%2Fgeojson_area/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocrystal%2Fgeojson_area/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geocrystal","download_url":"https://codeload.github.com/geocrystal/geojson_area/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252216092,"owners_count":21713098,"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":["crystal","geojson"],"created_at":"2024-11-13T00:23:42.029Z","updated_at":"2025-05-03T16:31:54.119Z","avatar_url":"https://github.com/geocrystal.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GeoJSON::Area\n\n![Crystal CI](https://github.com/geocrystal/geojson_area/workflows/Crystal%20CI/badge.svg)\n[![License](https://img.shields.io/github/license/geocrystal/geojson_area.svg)](https://github.com/geocrystal/geojson_area/blob/master/LICENSE)\n\nCalculate the area inside of any [GeoJSON](https://github.com/geocrystal/geojson) geometry.\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     geojson_area:\n       github: geocrystal/geojson_area\n   ```\n\n2. Run `shards install`\n\n## Usage\n\n```crystal\nrequire \"geojson_area\"\n```\n\nThis adds `area` method for all `GeoJSON` objects:\n\n```crystal\npolygon = GeoJSON::Polygon.new([\n  [[-10.0, -10.0], [10.0, -10.0], [10.0, 10.0], [-10.0,-10.0]],\n  [[-1.0, -2.0], [3.0, -2.0], [3.0, 2.0], [-1.0,-2.0]]\n])\n\npolygon.area\n# =\u003e 2366726096087.807\n```\n\nAlso you can use `GeoJSON::Area.area()` directly.\nThis method accept any `GeoJSON` object, and returns contained area as square meters.\n\n```crystal\npolygon = GeoJSON::Polygon.new([\n  [[-10.0, -10.0], [10.0, -10.0], [10.0, 10.0], [-10.0,-10.0]],\n  [[-1.0, -2.0], [3.0, -2.0], [3.0, 2.0], [-1.0,-2.0]]\n])\n\nGeoJSON::Area.area(polygon)\n# =\u003e 2366726096087.807\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/geocrystal/geojson_area/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- [Anton Maminov](https://github.com/mamantoha) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeocrystal%2Fgeojson_area","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeocrystal%2Fgeojson_area","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeocrystal%2Fgeojson_area/lists"}