162 lines
5.1 KiB
TOML
162 lines
5.1 KiB
TOML
tile_buffer = 64
|
|
|
|
[webserver]
|
|
port = ":9090"
|
|
|
|
[cache]
|
|
type="file" # cache type
|
|
basepath="/tmp/tegola" # cache specific config
|
|
|
|
[[providers]]
|
|
name = "nidus"
|
|
type = "mvt_postgis" # the type of data provider. currently only supports postgis
|
|
uri = "postgres://tegola:@localhost:/nidus-sync?host=/var/run/postgresql&sslmode=disable" # PostGIS connection string (required)
|
|
srid = 4326 # The default srid for this provider. If not provided it will be WebMercator (3857)
|
|
|
|
[[providers.layers]]
|
|
name = "address"
|
|
geometry_fieldname = "geometry"
|
|
geometry_type="point"
|
|
id_fieldname = "id"
|
|
sql = "SELECT ST_AsMVTGeom(geom, !BBOX!) AS geometry, id, unit, number_, street, postal_code FROM address WHERE geom && !BBOX!"
|
|
|
|
[[providers.layers]]
|
|
name = "fileupload-pool"
|
|
geometry_fieldname = "geometry"
|
|
geometry_type="point"
|
|
id_fieldname = "id"
|
|
sql = "SELECT ST_AsMVTGeom(geom, !BBOX!) AS geometry, condition, id, is_new, is_in_district FROM fileupload.pool WHERE geom && !BBOX! !PARAM_CSV_FILE!"
|
|
|
|
[[providers.layers]]
|
|
name = "mosquito_source"
|
|
geometry_fieldname = "geometry"
|
|
geometry_type="polygon"
|
|
id_fieldname = "id"
|
|
sql = "SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, cell, count_, resolution FROM h3_aggregation WHERE type_ = 'MosquitoSource' AND geometry && !BBOX! !PARAM_ORGANIZATION_ID!"
|
|
|
|
[[providers.layers]]
|
|
name = "parcel"
|
|
geometry_fieldname = "geometry"
|
|
geometry_type="multipolygon"
|
|
id_fieldname = "id"
|
|
sql = "SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, apn, description, id FROM parcel WHERE geometry && !BBOX!"
|
|
|
|
[[providers.layers]]
|
|
name = "service-area-bounds"
|
|
geometry_fieldname = "geometry"
|
|
geometry_type="polygon"
|
|
id_fieldname = "id"
|
|
sql = "SELECT ST_AsMVTGeom(service_area_geometry, !BBOX!) AS geometry, id FROM organization WHERE service_area_geometry && !BBOX! !PARAM_ID!"
|
|
|
|
[[providers.layers]]
|
|
name = "service_request"
|
|
geometry_fieldname = "geometry"
|
|
geometry_type="polygon"
|
|
id_fieldname = "id"
|
|
sql = "SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, cell, count_, resolution FROM h3_aggregation WHERE type_ = 'ServiceRequest' AND geometry && !BBOX! !PARAM_ORGANIZATION_ID!"
|
|
|
|
[[providers.layers]]
|
|
name = "trap"
|
|
geometry_fieldname = "geometry"
|
|
geometry_type="polygon"
|
|
id_fieldname = "id"
|
|
sql = "SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, cell, count_, resolution FROM h3_aggregation WHERE type_ = 'Trap' AND geometry && !BBOX! !PARAM_ORGANIZATION_ID!"
|
|
|
|
[[providers]]
|
|
name = "rmo"
|
|
type = "mvt_postgis" # the type of data provider. currently only supports postgis
|
|
uri = "postgres://tegola:@localhost:/nidus-sync?host=/var/run/postgresql&sslmode=disable" # PostGIS connection string (required)
|
|
srid = 4326 # The default srid for this provider. If not provided it will be WebMercator (3857)
|
|
|
|
[[providers.layers]]
|
|
name = "report_location"
|
|
geometry_fieldname = "location"
|
|
geometry_type="point"
|
|
id_fieldname = "id"
|
|
sql = "SELECT address, created, id, ST_AsMVTGeom(location::geometry, !BBOX!) AS location, public_id, status, table_name FROM publicreport.report_location WHERE location && !BBOX!"
|
|
|
|
[[providers.layers]]
|
|
name = "nuisance_location"
|
|
geometry_fieldname = "location"
|
|
geometry_type="point"
|
|
id_fieldname = "id"
|
|
sql = "SELECT address, created, id, ST_AsMVTGeom(location::geometry, !BBOX!) AS location, public_id, status FROM publicreport.report_location WHERE table_name = 'nuisance' AND location && !BBOX!"
|
|
|
|
[[providers.layers]]
|
|
name = "pool_location"
|
|
geometry_fieldname = "location"
|
|
geometry_type="point"
|
|
id_fieldname = "id"
|
|
sql = "SELECT address, created, id, ST_AsMVTGeom(location::geometry, !BBOX!) AS location, public_id, status FROM publicreport.report_location WHERE table_name = 'pool' AND location && !BBOX!"
|
|
|
|
[[maps]]
|
|
name = "rmo"
|
|
center = [-119.175, 36.24, 11.0]
|
|
|
|
[[maps.layers]]
|
|
provider_layer = "rmo.nuisance_location"
|
|
#min_zoom = 5
|
|
#max_zoom = 20
|
|
|
|
[[maps.layers]]
|
|
provider_layer = "rmo.pool_location"
|
|
#min_zoom = 5
|
|
#max_zoom = 20
|
|
|
|
[[maps.layers]]
|
|
provider_layer = "rmo.report_location"
|
|
#min_zoom = 5
|
|
#max_zoom = 20
|
|
|
|
[[maps]]
|
|
name = "nidus"
|
|
center = [-119.175, 36.24, 11.0] # set the center of the map so the user is auto navigated to visalia
|
|
|
|
[[maps.layers]]
|
|
provider_layer = "nidus.address"
|
|
|
|
[[maps.layers]]
|
|
provider_layer = "nidus.fileupload-pool"
|
|
|
|
[[maps.layers]]
|
|
provider_layer = "nidus.mosquito_source"
|
|
|
|
[[maps.layers]]
|
|
provider_layer = "nidus.parcel"
|
|
|
|
[[maps.layers]]
|
|
provider_layer = "nidus.service_request"
|
|
|
|
[[maps.layers]]
|
|
provider_layer = "nidus.service-area-bounds"
|
|
|
|
[[maps.layers]]
|
|
provider_layer = "nidus.trap"
|
|
|
|
[[maps.params]]
|
|
name = "csv_file"
|
|
token = "!PARAM_CSV_FILE!"
|
|
type = "int"
|
|
sql = "AND csv_file = ?"
|
|
default_sql = " "
|
|
|
|
[[maps.params]]
|
|
name = "id"
|
|
token = "!PARAM_ID!"
|
|
type = "int"
|
|
sql = "AND id = ?"
|
|
default_sql = " "
|
|
|
|
[[maps.params]]
|
|
name = "organization_id"
|
|
token = "!PARAM_ORGANIZATION_ID!"
|
|
type = "int"
|
|
sql = "AND organization_id = ?"
|
|
default_sql = " "
|
|
|
|
[[maps.params]]
|
|
name = "file_organization_id"
|
|
token = "!PARAM_FILE_ORGANIZATION_ID!"
|
|
type = "int"
|
|
sql = "AND file.organization_id = ?"
|
|
default_sql = " "
|