Skip to content

Commit

Permalink
rename distance in example
Browse files Browse the repository at this point in the history
  • Loading branch information
chrieke committed Dec 3, 2022
1 parent ccc77bc commit f11a541
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ from prettymapp.osm import get_osm_geometries
from prettymapp.plotting import Plot
from prettymapp.settings import STYLES

aoi = get_aoi(address="Brandenburger Tor, Berlin", distance=500, rectangular=True)
aoi = get_aoi(address="Praça Ferreira do Amaral, Macau", radius=1100, rectangular=False)
df = get_osm_geometries(aoi=aoi)

fig = Plot(
Expand Down
6 changes: 3 additions & 3 deletions prettymapp/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def validate_coordinates(lat: float, lon: float) -> None:
def get_aoi(
address: Optional[str] = None,
coordinates: Optional[Tuple[float, float]] = None,
distance: int = 1000,
radius: int = 1000,
rectangular: bool = False,
) -> Polygon:
"""
Expand All @@ -31,7 +31,7 @@ def get_aoi(
Args:
address: Address string
coordinates: lat, lon
distance: Radius in meter
radius: Radius in meter
rectangular: Optionally return aoi as rectangular polygon, default False.
Returns:
Expand All @@ -56,7 +56,7 @@ def get_aoi(
)
utm_crs = df.estimate_utm_crs()
df = df.to_crs(utm_crs)
df.geometry = df.geometry.buffer(distance)
df.geometry = df.geometry.buffer(radius)
df = df.to_crs(crs=4326)
poly = df.iloc[0].geometry

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

setup(
name="prettymapp",
version="0.0.1",
version="0.0.3",
author="Christoph Rieke",
author_email="[email protected]",
description="",
long_description=parent_dir.joinpath("README.md").read_text(encoding="utf-8"),
long_description_content_type="text/markdown",
url="https://github.com/chrieke/prettymapp",
license="MIT",
packages=find_packages(exclude=("tests", "streamlit-prettymapp")),
packages=find_packages(exclude=("prettymapp/tests", "streamlit-prettymapp", "cache")),
package_data={"": ["fonts/PermanentMarker-Regular.ttf"]},
data_files=[
("", ["requirements.txt"]),
Expand Down
2 changes: 1 addition & 1 deletion streamlit-prettymapp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
with st.spinner("Creating map... (may take up to a minute)"):
rectangular = shape != "circle"
try:
aoi = get_aoi(address=address, distance=radius, rectangular=rectangular)
aoi = get_aoi(address=address, radius=radius, rectangular=rectangular)
except GeoCodingError as e:
st.error(f"ERROR: {str(e)}")
st.stop()
Expand Down

0 comments on commit f11a541

Please sign in to comment.