Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Aliquot Mogrifier

Project Description
Aliquoter
=========

Aliquot mogrifier utilizing the BLM PLSS method of quartering/halving sections.

Purpose
-------

Given a quad of point pairs (long, lat) return a quad of point pairs for a
specific aliquot string.

This code should work on any quad in any orientation as long as north, south,
east, west can be defined appropriately.

This code uses specific points rather than a bounding box set to 0 degrees.

Example
-------

Aliquot string: **E2SW4SW4**

Aliquot meaning: **The East half of the South West quarter of the South West quarter**

This would mean that the quad would be split up into a South West square (SW4)
and then another South West square (SW4) and then the East half of that square
would be returned.

<pre>
4,0 4,4
+-----------------------+-----------------------+
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| S-W | |
| \ / | |
+-----------+-----------+-----------------------+
| | | |
| | | |
| | | |
| S-W | | |
| \ / | | |
+-----*******-----------+-----------------------+
| * * | |
| * * | |
| * E * | |
| * * | |
| * * | |
+-----*******-----------+-----------------------+
0,0 0,4
</pre>

Usage
-----

Check out 'test.py'. It represents the above example and outputs the following.

Code:

```python
from aliquoter import aliquot, Quad, Point

print aliquot(
Quad(
nw=Point(lat=4, long=0),
sw=Point(lat=0, long=0),
ne=Point(lat=4, long=4),
se=Point(lat=0, long=4),
),
['SW', 'SW', 'E']
)
```

In the above code the list of aliquot quarters/halves is reversed to make
processing more straight forward.

Result:

```
Quad(
nw=Point(lat=1.0, long=0.5),
sw=Point(lat=0.0, long=0.5),
ne=Point(lat=1.0, long=1.0),
se=Point(lat=0.0, long=1.0)
)
```
Release History

Release History

This version
History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
aliquoter-0.0.1.linux-x86_64.exe (66.9 kB) Copy SHA256 Checksum SHA256 any Windows Installer Jan 7, 2013
aliquoter-0.0.1.tar.gz (2.5 kB) Copy SHA256 Checksum SHA256 Source Jan 7, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting