topography 🌎
Contains different approaches to modeling terrain and topographic-style maps in python
Requirements
numpymatplotlib
see the requirements.txt
Features
Inverse Distance Weighting (IDW)
A given point P(x, y) is determined by the values of its neighbors, inversely to the distance of each neighbor.
P is more heavily influenced by nearer points via a weighting function w(x, y).
Steps
The value of P(x, y) is determined only by the closest raw data point.
This approach works best to get a "feel" for larger datasets. With few input points, the resulting map has little detail.
In the case of multiple equidistant points being closest, point values are stored, and averaged.
Nearest Neighbor (NN) [in progress 👷 🛠️]
Install
pip install topography
Example
from topography.Map import Map
from topography.utils.io import getPointValuesFromCsv
# take in csv/xlsx
rawData = getPointValuesFromCsv("tests/data/20x20.csv")
# make map from rawData
M = Map(rawData)
# Display the inputted raw data values
M.showRawPointValues()
# interpolate using inverse distance weighting
M.idw(showWhenDone=True)
# Display the interpolated data values
M.showFilledPointValues()
# Save the data to a .csv file
M.writeLastToCsv("idw_20x20", writeAsMatrix=True)
Development with twine
python setup.py sdist bdist_wheel
twine upload -r pypi dist/* -u <username> -p <password>
Metadata
Release files for topography 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| topography-1.0.0.tar.gz | 10.8 kB | Without provenance | Details for topography-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| topography-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for topography-1.0.0-py3-none-any.whl |
Total release size: 23.4 kB
Release files / topography-1.0.0.tar.gz
| Download URL | topography-1.0.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be748b100c7957cbd60666e7d637a86d1ff21865d614d7f2a3b2e89aa9663181
|
|
BLAKE2b-256 checksum How to use checksums |
983d02784b558cc0a224afe08727e30a1bfcdafe83b14c41cc3d62e67720f0f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5
|
Release files / topography-1.0.0-py3-none-any.whl
| Download URL | topography-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
baea7f5495bf0f25e412ee741c6f67393893e271cbbd503baca9249e860aacf2
|
|
BLAKE2b-256 checksum How to use checksums |
44a9fc1d9856225bb50910273cf2df076846eb8409f4a602f8674368c3e9e4e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5
|
Security for topography 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.