diff --git a/src/planscape/martin/sql/martin_dynamic_project_area.sql b/src/planscape/martin/sql/martin_project_area_aggregate.sql similarity index 86% rename from src/planscape/martin/sql/martin_dynamic_project_area.sql rename to src/planscape/martin/sql/martin_project_area_aggregate.sql index acd40501e..f4034c7ee 100644 --- a/src/planscape/martin/sql/martin_dynamic_project_area.sql +++ b/src/planscape/martin/sql/martin_project_area_aggregate.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE FUNCTION martin_dynamic_project_area(z integer, x integer, y integer, query_params json) +CREATE OR REPLACE FUNCTION martin_project_area_aggregate(z integer, x integer, y integer, query_params json) RETURNS bytea AS $$ DECLARE p_mvt bytea; @@ -32,7 +32,7 @@ BEGIN ss.size = p_stand_size ); - SELECT INTO p_mvt ST_AsMVT(tile, 'project_area', 4096, 'geom') FROM ( + SELECT INTO p_mvt ST_AsMVT(tile, 'project_area_aggregate', 4096, 'geom') FROM ( SELECT (query_params->>'project_area_id')::int as "id", ST_AsMVTGeom( diff --git a/src/planscape/martin/sql/martin_dynamic_project_areas.sql b/src/planscape/martin/sql/martin_project_areas_by_scenario.sql similarity index 78% rename from src/planscape/martin/sql/martin_dynamic_project_areas.sql rename to src/planscape/martin/sql/martin_project_areas_by_scenario.sql index c54f40dd9..84189e430 100644 --- a/src/planscape/martin/sql/martin_dynamic_project_areas.sql +++ b/src/planscape/martin/sql/martin_project_areas_by_scenario.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE FUNCTION martin_dynamic_project_areas(z integer, x integer, y integer, query_params json) +CREATE OR REPLACE FUNCTION martin_project_areas_by_scenario(z integer, x integer, y integer, query_params json) RETURNS bytea AS $$ DECLARE p_mvt bytea; @@ -6,7 +6,7 @@ DECLARE p_stand_size varchar; BEGIN - SELECT INTO p_mvt ST_AsMVT(tile, 'dynamic_project_areas', 4096, 'geom') FROM ( + SELECT INTO p_mvt ST_AsMVT(tile, 'project_areas_by_scenario', 4096, 'geom') FROM ( SELECT pa.id as "id", diff --git a/src/planscape/martin/sql/martin_dynamic_stands.sql b/src/planscape/martin/sql/martin_stands_by_tx_plan.sql similarity index 90% rename from src/planscape/martin/sql/martin_dynamic_stands.sql rename to src/planscape/martin/sql/martin_stands_by_tx_plan.sql index 04dc92fac..f38d21fcc 100644 --- a/src/planscape/martin/sql/martin_dynamic_stands.sql +++ b/src/planscape/martin/sql/martin_stands_by_tx_plan.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE FUNCTION martin_dynamic_stands(z integer, x integer, y integer, query_params json) +CREATE OR REPLACE FUNCTION martin_stands_by_tx_plan(z integer, x integer, y integer, query_params json) RETURNS bytea AS $$ DECLARE p_mvt bytea; @@ -34,7 +34,7 @@ BEGIN WHERE tp.id = (query_params->>'treatment_plan_id')::int ); - SELECT INTO p_mvt ST_AsMVT(tile, 'dynamic_stands', 4096, 'geom') FROM ( + SELECT INTO p_mvt ST_AsMVT(tile, 'stands_by_tx_plan', 4096, 'geom') FROM ( SELECT ss.id as "id",