{"id":18739594,"url":"https://github.com/springmeyer/mapnik-mongo","last_synced_at":"2025-04-12T20:02:09.964Z","repository":{"id":66365755,"uuid":"2091783","full_name":"springmeyer/mapnik-mongo","owner":"springmeyer","description":"mapnik datasource plugin for reading geodata from mongodb","archived":false,"fork":false,"pushed_at":"2013-09-22T21:31:11.000Z","size":1628,"stargazers_count":20,"open_issues_count":4,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-26T14:12:17.181Z","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":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/springmeyer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-07-23T02:44:58.000Z","updated_at":"2020-04-19T00:44:25.000Z","dependencies_parsed_at":"2023-02-20T03:00:21.152Z","dependency_job_id":null,"html_url":"https://github.com/springmeyer/mapnik-mongo","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/springmeyer%2Fmapnik-mongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springmeyer%2Fmapnik-mongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springmeyer%2Fmapnik-mongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springmeyer%2Fmapnik-mongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/springmeyer","download_url":"https://codeload.github.com/springmeyer/mapnik-mongo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625494,"owners_count":21135513,"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-07T15:36:26.460Z","updated_at":"2025-04-12T20:02:09.923Z","avatar_url":"https://github.com/springmeyer.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MongoDB input plugin for Mapnik\n\nThis is a connector to MongoDB data in the form of a Mapnik C++ plugin.\nMongoDB supports spatial indexig on a sphere for a Points, a LineStrings and a Polygons since version 2.4.\n\n# Usage\n\nInput plugin accepts the following parameters:\n * host -- (optional) hostname to connect MongoDB [default: \"localhost\"]\n * port -- (optional) port to connect [default: 27017]\n * dbname -- (optional) database name to use [default: \"gis\"]\n * collection -- (required) collection to use\n\nExample in XML:\n\n    \u003cDatasource\u003e\n        \u003cParameter name=\"type\"\u003emongodb\u003c/Parameter\u003e\n        \u003cParameter name=\"collection\"\u003epolygons\u003c/Parameter\u003e\n    \u003c/Datasource\u003e\n    \nRecords in the database should have a \"geometry\" property with GeoJSON geometry (only Point, LineString and Polygon are supported), and a \"properties\" property, which contains an information about feature.\n\nExample:\n\n    {\n        geometry: {\n            type: \"LineString\",\n            coordinates: [ [ lng1, lat1 ], [ lng2, lat2 ], ... ]\n        },\n        properties: {\n            name: \"Long Hard Road\",\n            id: 32167,\n            ...\n        }\n    }\n    \nCAUTION: notice the Longitude, Latitude order.\n\n# Demo\n\nRender result for [test/test.js](https://github.com/hamer/mapnik-mongo/blob/master/test/test.js), source shape files in QGis [screenshot](https://raw.github.com/hamer/mapnik-mongo/master/test/qgis_shp_screenshot.png):\n\n![west](https://raw.github.com/hamer/mapnik-mongo/master/test/1.png)\n![east](https://raw.github.com/hamer/mapnik-mongo/master/test/2.png)\n\n# Setup\n\n1) Install MongoDB with C++ driver (libmongoclient)\n\nRecommended to install from https://github.com/mongodb/mongo.git\n\n    git clone https://github.com/mongodb/mongo.git\n    cd mongo\n    git checkout r2.4.6\n    scons --full install\n\n2) Start MongoDB\n\nIn another terminal:\n\n    mkdir db\n    cd db\n    mongod --dbpath .\n\n3) Prepare test environment (optional)\n\nThe tests are written in Node.js v0.10.x for Mapnik v2.2.x.\n\n    cd test/\n    npm install mongodb mapnik\n\n4) Import a shapefiles to the database\n\nIn another terminal:\n\n    node import.js\n\n5) Run test.js\n\n    node test.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringmeyer%2Fmapnik-mongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspringmeyer%2Fmapnik-mongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringmeyer%2Fmapnik-mongo/lists"}