{"id":27121064,"url":"https://github.com/brycejohnston/geojson2image","last_synced_at":"2025-04-07T10:51:32.596Z","repository":{"id":56873983,"uuid":"79367502","full_name":"brycejohnston/geojson2image","owner":"brycejohnston","description":"Ruby library for generating images from GeoJSON","archived":false,"fork":false,"pushed_at":"2018-09-25T19:37:28.000Z","size":239,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-04T08:40:53.944Z","etag":null,"topics":["chunky-png","geojson","png","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/geojson2image","language":"Ruby","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/brycejohnston.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-18T17:56:40.000Z","updated_at":"2024-06-08T19:13:28.000Z","dependencies_parsed_at":"2022-08-20T22:30:18.906Z","dependency_job_id":null,"html_url":"https://github.com/brycejohnston/geojson2image","commit_stats":null,"previous_names":["beaorn/geojson2image"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brycejohnston%2Fgeojson2image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brycejohnston%2Fgeojson2image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brycejohnston%2Fgeojson2image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brycejohnston%2Fgeojson2image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brycejohnston","download_url":"https://codeload.github.com/brycejohnston/geojson2image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247233049,"owners_count":20905707,"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":["chunky-png","geojson","png","ruby"],"created_at":"2025-04-07T10:51:31.820Z","updated_at":"2025-04-07T10:51:32.561Z","avatar_url":"https://github.com/brycejohnston.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# geojson2image\n\n[![Gem Version](http://img.shields.io/gem/v/geojson2image.svg)][gem]\n\n[gem]: https://rubygems.org/gems/geojson2image\n\nRuby library for generating images from GeoJSON using the [ChunkyPNG library](https://github.com/wvanbergen/chunky_png).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'geojson2image'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install geojson2image\n\n## Usage\n\nInitialize new Geojson2image::Convert object and call to_image\n```ruby\ngjson = '{\"type\":\"Feature\",\"geometry\":{\"type\":\"MultiPolygon\",\"coordinates\":[......'\ng2i = Geojson2image::Convert.new(\n  json: gjson,\n  width: 500,\n  height: 500,\n  padding: 50,\n  background: \"#ffffff\",\n  fill: \"#008000\",\n  stroke: \"#006400\",\n  output: \"output.png\"\n)\ng2i.to_image\n```\n\n**Example Output**\n\n![Example Output](example/example_output.jpg?raw=true \"Example Output\")\n\n### Stroke and Fill Color Options\n\nAccepts hex color format\n\nStroke and fill color options can be globally set when initializing a\nnew Geojson2image::Convert object, or you can override them by adding\nproperties to your GeoJSON that include the desired stroke and fill options per\nfeature. Example:\n\n```json\n\"properties\": {\n  \"fill\": \"#008000\",\n  \"stroke\": \"#006400\"\n},\n```\n**Example Output**\n\n![Example Output](example/fill_options_example.jpg?raw=true \"Fill Options Example Output\")\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/beaorn/geojson2image.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrycejohnston%2Fgeojson2image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrycejohnston%2Fgeojson2image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrycejohnston%2Fgeojson2image/lists"}