Skip to content

Commit

Permalink
add postgres-execute estimation
Browse files Browse the repository at this point in the history
move tutorial to wiki
disable map-rotation
add generalized water layer
  • Loading branch information
henrythasler committed Sep 14, 2019
1 parent 0e0fb4b commit 4549413
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 34 deletions.
2 changes: 2 additions & 0 deletions DEVELOPMENT.md
Expand Up @@ -77,11 +77,13 @@ SELECT ( [${layer1} [|| ${layer2} [|| ...]] ) as data

- ~~Move database to [Serverless Aurora PostgreSQL](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html) to reduce monthly costs.~~ Won't do. Resume after pause is 30s+ and keeping 2 ACUs hot at all times is too expensive.
- ~~Evaluate [Data API for Aurora Serverless](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html).~~ Won't do. See above. According to [this review](https://www.jeremydaly.com/aurora-serverless-data-api-a-first-look/), performance also seems bad compared to API-calls.
- move terraform-state to s3-bucket.
- Security-Review for Lambda-Code (e.g. SQL-Injection, ...)
- Change all scripts to use Postgres environment variables (PGUSER, ...)
- Omit Postgres credentials altogether and use IAM-role instead
- move lambda-function out of VPC to reduce cold-start-time
- Add raster endpoint with node-mapbox-gl-native to serve pre-rendered raster-images.
- Check how blue-green deployments could be realized with API Gateway and Lambda.

## References

Expand Down
8 changes: 2 additions & 6 deletions README.md
Expand Up @@ -4,8 +4,6 @@

Serve mapbox vectortiles via AWS stack.

**THIS README IS WORK-IN-PROGRESS**

## Goals

These are the main project goals:
Expand Down Expand Up @@ -33,6 +31,8 @@ Checked items are already fulfilled.

![](docs/img/CloudFront-tiles-simple.png)

A more detailled description can be found in [DEVELOPMENT.md](DEVELOPMENT.md)

## Screenshots, Live Demo

The Live-Demo is available at: [cyclemap.link](https://cyclemap.link)
Expand Down Expand Up @@ -73,7 +73,3 @@ extend | `number` | tile extent in pixels (see [ST_AsMVTGeom](https://postgis.ne
buffer | `number` | buffer in pixels around each tile (see [ST_AsMVTGeom](https://postgis.net/docs/manual-dev/ST_AsMVTGeom.html)) | `256`
clip_geom | `boolean` | clip geometries that lie outside the current tile incl. buffer (see [ST_AsMVTGeom](https://postgis.net/docs/manual-dev/ST_AsMVTGeom.html)) | `true`


## Software Design, Implementation Details

A more detailled description can be found in [DEVELOPMENT.md](DEVELOPMENT.md)
21 changes: 0 additions & 21 deletions TUTORIAL.md

This file was deleted.

Binary file modified docs/stack.odg
Binary file not shown.
3 changes: 3 additions & 0 deletions html/index.html
Expand Up @@ -152,6 +152,9 @@
})
);

// disable map rotation using touch rotation gesture
map.touchZoomRotate.disableRotation();

// Debug output
map.showTileBoundaries = true;
// map.showCollisionBoxes = true;
Expand Down
22 changes: 19 additions & 3 deletions src/sources.json
Expand Up @@ -5,10 +5,26 @@
"database": "shapes",
"layers": [
{
"minzoom": 7,
"minzoom": 3,
"name": "water",
"table": "public.simplified_water_polygons",
"table": "public.water_gen3",
"variants": [
{
"minzoom": 4,
"table": "public.water_gen4"
},
{
"minzoom": 5,
"table": "public.water_gen5"
},
{
"minzoom": 6,
"table": "public.water_gen6"
},
{
"minzoom": 7,
"table": "public.simplified_water_polygons"
},
{
"minzoom": 8,
"table": "public.water_polygons"
Expand All @@ -26,7 +42,7 @@
"variants": [
{
"minzoom": 4,
"table": "public.bathymetry_gen3"
"table": "public.bathymetry_gen4"
},
{
"minzoom": 5,
Expand Down
18 changes: 15 additions & 3 deletions src/sources.toml
Expand Up @@ -3,9 +3,21 @@
database = "shapes"

[[sources.layers]]
minzoom = 7
minzoom = 3
name = "water"
table = "public.simplified_water_polygons"
table = "public.water_gen3"
[[sources.layers.variants]]
minzoom = 4
table = "public.water_gen4"
[[sources.layers.variants]]
minzoom = 5
table = "public.water_gen5"
[[sources.layers.variants]]
minzoom = 6
table = "public.water_gen6"
[[sources.layers.variants]]
minzoom = 7
table = "public.simplified_water_polygons"
[[sources.layers.variants]]
minzoom = 8
table = "public.water_polygons"
Expand All @@ -18,7 +30,7 @@
postfix = "ORDER BY depth"
[[sources.layers.variants]]
minzoom = 4
table = "public.bathymetry_gen3"
table = "public.bathymetry_gen4"
[[sources.layers.variants]]
minzoom = 5
table = "public.bathymetry"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Expand Up @@ -58,7 +58,7 @@
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
"resolveJsonModule": true,
"resolveJsonModule": true
},
"include": [
"src/**/*.ts"
Expand Down

0 comments on commit 4549413

Please sign in to comment.