Helper functions to convert geo coords to pixel coords and back.
Project description
echo1-geopix
Installation
pip install echo1-geopix
Getting Started
from loguru import logger
from echo1_geopix.echo1_geopix import (
geo_point_2_pix_point,
geo_box_2_pixel_box,
pixel_point_2_geo_point,
pixel_box_2_geo_box,
)
x_min = 0.35596034
y_min = 0.94408214
x_max = 0.4102673
y_max = 0.9986186
top = 19.013473367825767
bottom = 19.003535899073533
left = -98.27081680297852
right = -98.26036944570143
##
# pixel_point_2_geo_point
##
tmp_geo_coords = pixel_point_2_geo_point(left, right, top, bottom, x_min, y_min)
logger.debug("pixel_point_2_geo_point: {}".format(tmp_geo_coords))
##
# geo_point_2_pix_point
##
tmp_pixel_coords = geo_point_2_pix_point(
left, right, top, bottom, tmp_geo_coords["lon"], tmp_geo_coords["lat"]
)
logger.debug("geo_point_2_pix_point: {}".format(tmp_pixel_coords))
##
# pixel_box_2_geo_box
##
tmp_geo_box = pixel_box_2_geo_box(
x_min, y_min, x_max, y_max, left, right, top, bottom
)
##
# geo_box_2_pixel_box
##
temp_pixel_box = geo_box_2_pixel_box(
tmp_geo_box["lon_min"],
tmp_geo_box["lat_min"],
tmp_geo_box["lon_max"],
tmp_geo_box["lat_max"],
left,
right,
top,
bottom,
)
logger.debug("geo_box_2_pixel_box: {}".format(temp_pixel_box))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
echo1-geopix-0.1.1.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for echo1_geopix-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8136aa7f5141d6b5b438b31064917eca12f68a16849f50e13f2555aa03e3b73f |
|
MD5 | b7bbeae1454f429d7eefcb79a7f92bd9 |
|
BLAKE2b-256 | 0ec7160a27f63982118fff8eab2a67257f01ad042b895cc5304d792a37e0b78c |