3D city Map Barcelona
von Ryleymcc
5
Downloads
20
Likes
0
Makes
Used custom mapbox script and blender to make this.
All SVG files are included as well as the blender project file.
Here is the python script used to generate high resolution png images of the roads and land. paste in your own mapbox api token (free).
```
import asyncio
import aiohttp
from PIL import Image
from io import BytesIO
from IPython.display import display
# Mapbox API details
USERNAME = "ryleymcc"
STYLE_LAND_WATER = "clnj1nkob081q01p91o6rbziw"
STYLE_ROADS = "clnj20v7q07vz01p78d6dc69m"
ACCESS_TOKEN = " "
ZOOM_LEVEL = 14 # Adjust as needed
def latlon_to_tile(lat, lon, zoom):
"""Convert latitude and longitude to tile coordinates"""
import math
lat_rad = math.radians(lat)
n = 2.0 ** zoom
xtile = int((lon + 180.0) / 360.0 * n)
ytile = int((1.0 - math.asinh(math.tan(lat_rad)) / math.pi) / 2.0 * n)
return xtile, ytile
# Input bounding box coordinates
min_lat = 41.338928
min_lon = 2.139630
max_lat = 41.400877
max_l
All SVG files are included as well as the blender project file.
Here is the python script used to generate high resolution png images of the roads and land. paste in your own mapbox api token (free).
```
import asyncio
import aiohttp
from PIL import Image
from io import BytesIO
from IPython.display import display
# Mapbox API details
USERNAME = "ryleymcc"
STYLE_LAND_WATER = "clnj1nkob081q01p91o6rbziw"
STYLE_ROADS = "clnj20v7q07vz01p78d6dc69m"
ACCESS_TOKEN = " "
ZOOM_LEVEL = 14 # Adjust as needed
def latlon_to_tile(lat, lon, zoom):
"""Convert latitude and longitude to tile coordinates"""
import math
lat_rad = math.radians(lat)
n = 2.0 ** zoom
xtile = int((lon + 180.0) / 360.0 * n)
ytile = int((1.0 - math.asinh(math.tan(lat_rad)) / math.pi) / 2.0 * n)
return xtile, ytile
# Input bounding box coordinates
min_lat = 41.338928
min_lon = 2.139630
max_lat = 41.400877
max_l
Hast du dieses Modell gedruckt? Einloggen und dein Make teilen!
Melde dich an, um einen Kommentar zu hinterlassen
AnmeldenNoch keine Kommentare – sei der Erste!