189 lines
6.3 KiB
TOML
189 lines
6.3 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(location, !BBOX!) AS geometry, id, unit, number_, street, postal_code FROM address WHERE location && !BBOX!"
|
|
|
|
[[providers.layers]]
|
|
name = "feature-pool"
|
|
geometry_fieldname = "location"
|
|
geometry_type="point"
|
|
id_fieldname = "id"
|
|
sql = "SELECT ST_AsMVTGeom(f.location, !BBOX!) AS location, fp.condition AS condition, f.id AS id, 'pool' AS type, a.number_ AS address_number, a.street AS address_street, a.locality AS address_locality, a.region AS address_region, a.country AS address_country, a.postal_code AS address_postal_code FROM feature f INNER JOIN feature_pool fp ON f.id = fp.feature_id INNER JOIN site s ON s.id = f.site_id INNER JOIN address a ON a.id = s.address_id WHERE f.location && !BBOX! !PARAM_FEATURE_ORGANIZATION_ID!"
|
|
|
|
[[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 = "signal-point"
|
|
geometry_fieldname = "location"
|
|
geometry_type="point"
|
|
id_fieldname = "id"
|
|
sql = "SELECT ST_AsMVTGeom(location, !BBOX!) AS location, id, type_, created FROM signal WHERE GeometryType(location) = 'POINT' AND location && !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_raw, created, id, ST_AsMVTGeom(location, !BBOX!) AS location, public_id, report_type AS type, status FROM publicreport.report WHERE location && !BBOX!"
|
|
|
|
[[providers.layers]]
|
|
name = "nuisance_location"
|
|
geometry_fieldname = "location"
|
|
geometry_type="point"
|
|
id_fieldname = "id"
|
|
sql = "SELECT address_raw, created, id, ST_AsMVTGeom(location, !BBOX!) AS location, public_id, status FROM publicreport.report WHERE report_type = 'nuisance' AND location && !BBOX!"
|
|
|
|
[[providers.layers]]
|
|
name = "water_location"
|
|
geometry_fieldname = "location"
|
|
geometry_type="point"
|
|
id_fieldname = "id"
|
|
sql = "SELECT address_raw, created, id, ST_AsMVTGeom(location, !BBOX!) AS location, public_id, status FROM publicreport.report WHERE report_type = 'water' 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.water_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.feature-pool"
|
|
|
|
[[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.signal-point"
|
|
|
|
[[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 = "feature_organization_id"
|
|
token = "!PARAM_FEATURE_ORGANIZATION_ID!"
|
|
type = "int"
|
|
sql = "AND f.organization_id = ?"
|
|
default_sql = " "
|
|
|
|
[[maps.params]]
|
|
name = "file_organization_id"
|
|
token = "!PARAM_FILE_ORGANIZATION_ID!"
|
|
type = "int"
|
|
sql = "AND file.organization_id = ?"
|
|
default_sql = " "
|