{"id":20072239,"url":"https://github.com/mapnik/ruby-mapnik","last_synced_at":"2025-08-21T15:31:11.276Z","repository":{"id":1573820,"uuid":"2015595","full_name":"mapnik/Ruby-Mapnik","owner":"mapnik","description":"Ruby Bindings for Mapnik","archived":false,"fork":false,"pushed_at":"2015-09-10T05:46:31.000Z","size":3455,"stargazers_count":66,"open_issues_count":10,"forks_count":13,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-12-13T21:58:57.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","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/mapnik.png","metadata":{"files":{"readme":"README.rdoc","changelog":"History.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-07-08T01:29:14.000Z","updated_at":"2023-11-27T21:44:24.000Z","dependencies_parsed_at":"2022-07-12T19:50:40.346Z","dependency_job_id":null,"html_url":"https://github.com/mapnik/Ruby-Mapnik","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapnik%2FRuby-Mapnik","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapnik%2FRuby-Mapnik/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapnik%2FRuby-Mapnik/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapnik%2FRuby-Mapnik/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mapnik","download_url":"https://codeload.github.com/mapnik/Ruby-Mapnik/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230520390,"owners_count":18238948,"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-11-13T14:39:10.491Z","updated_at":"2024-12-20T01:14:09.681Z","avatar_url":"https://github.com/mapnik.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Ruby Mapnik\n\nhttps://github.com/mapnik/Ruby-Mapnik\n\n{\u003cimg src=\"https://travis-ci.org/mapnik/Ruby-Mapnik.svg?branch=master\" alt=\"Build Status\"\u003e}[https://travis-ci.org/mapnik/Ruby-Mapnik]\n\n== Requirements\n\n* Rake (and extentiontask)\n* Rice \u003e= 1.4.2 (build depends on autoconf)\n* rcairo (https://github.com/rcairo/rcairo) (Optional)\n* Mapnik 2.3.x or 2.2.x (Currently available at https://github.com/mapnik/mapnik)\n\nOn OS X install ruby deps like:\n\n    export ARCHFLAGS=\"-arch x86_64\"\n    gem install rake-compiler rake hoe rice chunky_png cairo\n\n== Description\n\nA set of bindings between Ruby and Mapnik. Supports many of the common uses for \nMapnik, and one day, might support all of them. Rendering is available using\nthe standard AGG library, or additionally via Cairo, if the rcairo gem is \ninstalled and Mapnik has been compiled with Cairo support.\n\n== Installation\n\nIf you have checked out this local repository code build like:\n\n    rake\n\nThe above command will compile the bindings and run the tests.\n\nFile issues at https://github.com/mapnik/Ruby-Mapnik/issues if you hit any compile errors.\n\nTo create a gem from your local repository and install it run:\n\n  rake gem\n  gem install pkg/mapnik-0.x.y.gem\n\nAlternatively, if you wish to install Ruby-Mapnik from the latest tagged release you can do:\n\n  gem install mapnik\n\nNote: on osx the default rake compile will try to build universal, and your\nmapnik install is unlikely built universal. Check the architecture of libmapnik.dylib like:\n\n    file /usr/local/lib/libmapnik.dylib\n\nOn a system where your compiler defaults to 64bit you'll see: 'Mach-O 64-bit dynamically linked shared library x86_64'\n\nSo to avoid a linking warning like:\n\n    ld: warning: ignoring file /usr/local/lib/libmapnik.dylib, file was built for unsupported file format which is not the architecture being linked (i386)\n\nYou can pass this before rake compile:\n\n    export ARCHFLAGS=\"-arch x86_64\"\n\n== Synopsis\n  \n  require 'mapnik'\n\n  map = Mapnik::Map.new do |m|\n    \n    # A grey background\n    m.background = Mapnik::Color.new('#777')\n    \n    # Use the Google mercator projection\n    m.srs =  Mapnik::Tile::DEFAULT_OUTPUT_PROJECTION\n    \n    # Add a layer to the map\n    m.layer 'countries' do |l|\n      \n      # Add a style to the layer\n      l.style do |s|\n\n        # Add a rule to the style (this one is a default rule)\n        s.rule do |default|\n          \n          #fill the shapes with polygon symbolizers\n          default.fill = Mapnik::Color.new('#880000')\n        end\n      end\n\n      # set the srs of the layer\n      l.srs = \"+proj=latlong +datum=WGS84\"\n\n      #specify the datasource for the layer\n      l.datasource = Mapnik::Datasource.create :type =\u003e 'shape', :file =\u003e \"#{PATH}/../data/TM_WORLD_BORDERS_SIMPL_0.3_MOD\"\n    end\n\n  end\n\n  map.zoom_to_box(map.layers.first.envelope) \n  map.render_to_file('my_map.png')\n\n== Examples\n\nSee demo/rundemo.rb for the classic mapnik rundemo. Also see demo/sinatra/demo.rb \nfor a simple tile server (requires the sinatra gem).\n\n== Thanks\n\nThanks to the Mapnik team and especially to Dane Springmeyer!\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapnik%2Fruby-mapnik","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapnik%2Fruby-mapnik","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapnik%2Fruby-mapnik/lists"}