sudo su
install apache2
apt install apache2
ensure to have PHP installed and all required extensions:
import mercantile, mapbox_vector_tile, requests, json | |
from vt2geojson.tools import vt_bytes_to_geojson | |
# define an empty geojson as output | |
output= { "type": "FeatureCollection", "features": [] } | |
# vector tile endpoints -- change this in the API request to reference the correct endpoint | |
tile_coverage = 'mly1_public' | |
# tile layer depends which vector tile endpoints: |
https://stackoverflow.com/questions/4069595/flask-with-geoalchemy-sample-code
Using SQLAlchemy 0.8, Flask-SQLAlchemy and Geoalchemy 2:
from app import db
from geoalchemy2.types import Geometry
import logging | |
import sys | |
from logging.handlers import TimedRotatingFileHandler | |
FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") | |
LOG_FILE = "my_app.log" | |
def get_console_handler(): | |
console_handler = logging.StreamHandler(sys.stdout) | |
console_handler.setFormatter(FORMATTER) |