An open API service indexing awesome lists of open source software.

https://github.com/frodrigo/mapillary_takeout_web

Web frontend to download your "unprocessed original" images back from Mapillary.
https://github.com/frodrigo/mapillary_takeout_web

Last synced: about 2 months ago
JSON representation

Web frontend to download your "unprocessed original" images back from Mapillary.

Awesome Lists containing this project

README

        

# Mapillary Takeout Web

Web frontend to [mapillary_takeout](https://github.com/gitouche-sur-osm/mapillary_takeout)

Download your "unprocessed original" images back from Mapillary.

## Install

```
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
```

```
mkdir -p logs mapillary_user photo
```

```
git clone https://github.com/tyndare/blur-persons.git
git clone https://github.com/gitouche-sur-osm/mapillary_takeout.git
```

## Tools

Install npm, tippecanoe.

Then:
``
npm install
``

Add mapillary_takeout:
```
wget https://raw.githubusercontent.com/gitouche-sur-osm/mapillary_takeout/master/mapillary_takeout.py
```

## Dev

Run

```
export FLASK_APP=web.py
export FLASK_ENV=development
python -m flask run
```

## Production

### Web

Use WSGI. Apache configuration provied.

### Background download

```
python fetch.py
```

### Vector Tiles

```
`npm bin`/tileserver-gl-light -c map/config.json --public_url https://mapillary-takeout-web.openstreetmap.fr
```

## Backend task

Merge sequences from users:
```
for user in photo/*/; do
`npm bin`/geojson-merge $user/*.geojson > "${user::-1}.geojson"
done

`npm bin`/geojson-merge photo/*.geojson > photo.geojson
```

## Frontend task

Collect photo.json from backends.

Add remote backend URL:
```
jq '.features[].properties.remote = "https://mapillary-takeout-web.openstreetmap.fr/photo"' < photo.geojson > map/photo-takeout.geojson
```

Merge:
```
`npm bin`/geojson-merge map/photo-*.geojson > map/photo.geojson
```

Convert to MBTiles, from photo directory:
```
tippecanoe -o images.mbtiles -l images -r1 --cluster-distance=1 photo.geojson
```

Prepare data from TMS, with GDAL >= 3.0.3
```
ogr2ogr -oo DATE_AS_STRING=YES photo.shp photo.geojson
shp2pgsql -d photo.shp > photo.sql
psql < photo.sql
```