Python wrapper for DGGRID
Project description
PyDGGRID
A wrapper for DGGRID in python
Installation
Simply use pip to install this library
pip install pydggrid
pip install . --install-option="--boost=rabbitmq"
Build From source
On Unix (Linux, OS X)
- clone this repository
pip install ./pydggrid
or you can easily call
python setup.py install
How To Use In order to use this library use following example. (more updates are comming on documentations section)
#import librarry
import pydggrid as m
#Construct a dggs object
m.dgconstruct();
#getting Q2di index for a (lat,long) point
m.geo_to_q2di(50,50)
#[4, 71, 211]
#getting Q2dd index for a (lat,long) point
m.geo_to_q2dd(50,50)
#[4.0, -0.1427860170187444, 0.7514696738643607]
#getting ProjTri index for a (lat,long) point
m.geo_to_projtri(50,50)
#[3.0, 0.5793988192307712, 0.4993911549756102]`
TODO
- Add suport for lastest version of DGGRID
- Supporting All DGGRID functions
- Adding Boost Geometry Support
Building the documentation
Documentation for the project is generated using Sphinx. Sphinx has the ability to automatically inspect the signatures and documentation strings in the extension module to generate beautiful documentation in a variety formats. The following command generates HTML-based reference documentation; for other formats please refer to the Sphinx manual:
cd pydggrid/docs
make html
Run tests
To run all tests for the package call folowing command in package directory
python3 -m unittest discover
License
By using, distributing, or contributing to this project, you agree to the terms and conditions of this license.
Based on Kevin Sahr's DGGRID library (https://discreteglobalgrids.org).
Developed on top of the R package which was developed by Richard Barnes (https://github.com/r-barnes/dggridR/).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for pydggrid-0.0.9-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 420d98d10387f2687427c538585d0cba1f8c1b1f339cea86509c683d3fd60463 |
|
MD5 | 4ab85ef1bfc76a3023aad2729610891d |
|
BLAKE2b-256 | e1a2e4b16d0dce5377b445c5cf017fa063ce70ccce317226dee82de6128cd822 |
Hashes for pydggrid-0.0.9-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67c274e708e6e9e54c7047efea37eca678af08198ca2238723ffc449dfd6a69e |
|
MD5 | e47811052c570567002806f1bdf73385 |
|
BLAKE2b-256 | 028a0674b53b95bcc85ec450e1278b6d6be67d1fce77f24321abf2bfe3229731 |