forked from stamen/the-ultimate-tile-stitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
How to load tiles into Atlas
Paweł edited this page Nov 26, 2018
·
4 revisions
- Scrape tiles (example) Run each command for different zoom
python3.6 scraper.py --poly polygon.json --zoom 20 --url "https://public-tiles.dronedeploy.com/000001_CAMPFIREMERGED_ortho_combined/{z}/{x}/{y}.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wdWJsaWMtdGlsZXMuZHJvbmVkZXBsb3kuY29tLzAwMDAwMV9DQU1QRklSRU1FUkdFRF9vcnRob19jb21iaW5lZC8qIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoyMTQ1OTE0OTU4fX19XX0_&Signature=fU7e86EFcMvXB13wV9u7HkBWleGnXG05T6jjMdzMaBXUIFhTAKmKubhSkZp9X8XrHEGC5WQR5XjN6fQEj7NAZweJmZCknyD7gb4IdwG3OZSP854Kp6l~XnS6NVjlIkm9c6XYvaGX80eOlOAQGGpsq3qrw5NT92emLQhs05aswW18kPxjW7N~V-Hx0c4bjsrtZ6I7z8Vo7EaHb4qa68vqKjdx31Xk2u96hf2rch6Qbsm4bAsc1HqjBP2os7c3r-W~7KbShzrcSY27MACqfMrbK0~fjPBl1qJOsLixOXK27JfWWUKazxhKcOtZDG74--j-sHoR33H~6VXT2pvzl9mJpg__&Key-Pair-Id=APKAJXGC45PGQXCMCXSA" --out-dir tiles --max-connections 4 --retries 10
- Use
pyramidize.sh tiles
to create pyramid of tiles for the tiles scraped by scraper.py. - Upload tiles to S3 folder e.g.
aws s3 sync tiles s3://pylot/gis/cal/jon/code/odm_orthophoto/tiles/
- Create UTM coords file.
- get one point coordinate from polygon geojson used to scrape the tiles
- Go to https://www.latlong.net/lat-long-utm.html and convert the coordinates to UTM format
- create
coords.txt
that contains:
WGS84 UTM 10N
620372.17 4404507.85
where
10N - zone
10N - If it's northern hemisphere - leave N
620372.17 - easting
4404507.85 - northing
-
Upload UTM coords
aws s3 cp coords.txt s3://pylot/gis/cal/jon/code/odm_georeferencing/coords.txt
-
Create UTM bounds file.
- get polygon bounds (they are printed using https://github.com/unleashlive/xy2latlng) example:
[West, South, East, North]
-121.59431, 39.78201, -121.58808, 39.786
convert to [topleft, bottomright]
[-121.59431, 39.786]
[-121.58808, 39.78201]
- Go to https://www.latlong.net/lat-long-utm.html and convert the coordinates to UTM
- best is to use
0 0 0 0
- Upload UTM coords
aws s3 cp jon/code/odm_orthophoto/odm_orthophoto_corners.txt s3://pylot/gis/cal/jon/code/odm_orthophoto/odm_orthophoto_corners.txt
- Add atlas asset:
- key - relevant path to
pylot
bucket -
code/odm_orthophoto
will be appended
{
"createdAt": 1540412217899,
"id": "57185542-1ba2-4d67-b799-e9748d15b126",
"key": "gis/cal/jon/",
"name": "Cal fire - JON",
"owner": "ap-southeast-2:b9be243f-1c1e-4d92-8a72-2cf5fe1dc5a5",
"type": "ortho",
"updatedAt": 1540412217899
}
Optional 8. Upload additional layers such as geojson