{ "info": { "author": "Tyler Garner", "author_email": "garnertb@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "GeoPDF\n======\n\n[![Build Status](https://travis-ci.org/garnertb/geopdf.svg?branch=master)](https://travis-ci.org/garnertb/geopdf)\n\nGeoPDF is a simple wrapper around [ReportLab](http://www.reportlab.com/) that allows developers to create basic GeoPDFs by\nfollowing the [GeoPDF Encoding Best Practices](http://portal.opengeospatial.org/files/?artifact_id=33332)\npublished by the Open Geospatial Consortium. In its current state, this project only exposes the bare minimum needed for\ndevelopers to create a GeoPDF in reportlab.\n\nInstallation\n============\n\nInstall this project from PyPI by running the command below:\n\n```$ pip install geopdf```\n\nor alternatively from source (github mater):\n\n```$ pip install git+https://github.com/garnertb/geopdf.git#egg=geopdf```\n\n\nCreating a GeoPDF\n=================\nIf you have worked with reportlab before, GeoPDF should feel familiar. GeoPDF subclasses the reportlab Canvas so you get all\nof the API methods you are used to along with some additional geospatial methods!\n\nExample\n-------\nIn this example, we create a 200 x 200 empty rectangle with the bounds of the earth in WGS 1984 (-180, -90, 180, 90). The main\ninterface you need to be familiar with is the `canvas.addGeo` method which adds the GeoPDF dictionary (called `LGIDict`)\nto the PDF. GeoPDF uses a geographic projection by default so in a minimal example you only have set the\nregistration points (which tie PDF pixel locations to map locations) and you're done. The `addGeo` method updates the LGIDict with any\nkeyword arguments that you pass it so refer to the [GeoPDF Encoding Best Practices](http://portal.opengeospatial.org/files/?artifact_id=33332)\ndocument to learn about all of the things that the GeoPDF supports.\n\n```\nfrom geopdf import GeoCanvas\nfrom reportlab.pdfbase.pdfdoc import PDFString, PDFArray\n\ncanvas = GeoCanvas('example1.pdf')\ncanvas.rect(200, 400, 200, 200, stroke=1)\n\n# A series of registration point pairs (pixel x, pixel y, x, y)\nregistration = PDFArray([\n PDFArray(map(PDFString, ['200', '400', '-180', '-90'])),\n PDFArray(map(PDFString, ['200', '600', '-180', '90'])),\n PDFArray(map(PDFString, ['400', '600', '180', '90'])),\n PDFArray(map(PDFString, ['400', '400', '180', '-90']))\n])\n\ncanvas.addGeo(Registration=registration)\ncanvas.save()\n```\n\nIssues\n======\nPlease report any bugs or requests that you have using the GitHub issue tracker!\n\n\nNotes\n=====\n- http://portal.opengeospatial.org/files/?artifact_id=33332\n\n\nContributing\n============\n\n- Fork the repository on GitHub\n- Create a named feature branch (like `add_component_x`)\n- Write your change\n- Write tests for your change (if applicable)\n- Run the tests, ensuring they all pass\n- Submit a Pull Request using GitHub", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://garnertb.io/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "geopdf", "package_url": "https://pypi.org/project/geopdf/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/geopdf/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://garnertb.io/" }, "release_url": "https://pypi.org/project/geopdf/0.1/", "requires_dist": null, "requires_python": null, "summary": "Adds GeoPDF functionality to ReportLab.", "version": "0.1" }, "last_serial": 1390059, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e79a380c50758b7884cb02591d2d0a3e", "sha256": "8ffeed41029eb97f36b254ef6c7f315d4be2aa377045148f52f29ff805d43f59" }, "downloads": -1, "filename": "geopdf-0.1.tar.gz", "has_sig": false, "md5_digest": "e79a380c50758b7884cb02591d2d0a3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15723, "upload_time": "2015-01-21T01:43:02", "url": "https://files.pythonhosted.org/packages/ff/6a/8b829238aafa71e2a7f94eba0f5abf5cfe101ac652596fa5c6973d0e45da/geopdf-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e79a380c50758b7884cb02591d2d0a3e", "sha256": "8ffeed41029eb97f36b254ef6c7f315d4be2aa377045148f52f29ff805d43f59" }, "downloads": -1, "filename": "geopdf-0.1.tar.gz", "has_sig": false, "md5_digest": "e79a380c50758b7884cb02591d2d0a3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15723, "upload_time": "2015-01-21T01:43:02", "url": "https://files.pythonhosted.org/packages/ff/6a/8b829238aafa71e2a7f94eba0f5abf5cfe101ac652596fa5c6973d0e45da/geopdf-0.1.tar.gz" } ] }