Skip to content

Commit

Permalink
115: add ids to sources SQL for highlighting tile clipping bug
Browse files Browse the repository at this point in the history
  • Loading branch information
trbmcginnis authored and jhogan committed Jun 17, 2019
1 parent a132fb7 commit 4fdd6c1
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion data/sources/digital-citymap.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
{
"id": "amendments",
"sql": "SELECT the_geom_webmercator, ST_Area(the_geom) as area, cartodb_id as id, altmappdf, extract(epoch from effective) as effective, status FROM citymap_amendments WHERE effective IS NOT NULL OR status = '13' ORDER BY area DESC"
"sql": "SELECT the_geom_webmercator, ST_Area(the_geom) as area, cartodb_id AS id, altmappdf, extract(epoch from effective) as effective, status FROM citymap_amendments WHERE effective IS NOT NULL OR status = '13' ORDER BY area DESC"
},
{
"id": "street-centerlines",
Expand Down
4 changes: 2 additions & 2 deletions data/sources/effective-flood-insurance-rate-2007.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"source-layers": [
{
"id": "effective-flood-insurance-rate-2007",
"sql": "SELECT the_geom_webmercator, CASE WHEN fld_zone IN ('A', 'A0', 'AE') THEN 'A' WHEN fld_zone = 'VE' THEN 'V' END as fld_zone FROM floodplain_firm2007 WHERE fld_zone IN ('A', 'A0', 'AE') OR fld_zone = 'VE'"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, CASE WHEN fld_zone IN ('A', 'A0', 'AE') THEN 'A' WHEN fld_zone = 'VE' THEN 'V' END as fld_zone FROM floodplain_firm2007 WHERE fld_zone IN ('A', 'A0', 'AE') OR fld_zone = 'VE'"
}
],
"minzoom": 0,
Expand All @@ -15,4 +15,4 @@
],
"updated_at": "September 2017"
}
}
}
4 changes: 2 additions & 2 deletions data/sources/floodplains.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"source-layers": [
{
"id": "effective-flood-insurance-rate-2007",
"sql": "SELECT the_geom_webmercator, CASE WHEN fld_zone IN ('A', 'A0', 'AE') THEN 'A' WHEN fld_zone = 'VE' THEN 'V' END as fld_zone FROM floodplain_firm2007 WHERE fld_zone IN ('A', 'A0', 'AE') OR fld_zone = 'VE'"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, CASE WHEN fld_zone IN ('A', 'A0', 'AE') THEN 'A' WHEN fld_zone = 'VE' THEN 'V' END as fld_zone FROM floodplain_firm2007 WHERE fld_zone IN ('A', 'A0', 'AE') OR fld_zone = 'VE'"
},
{
"id": "preliminary-flood-insurance-rate",
"sql": "SELECT the_geom_webmercator, CASE WHEN fld_zone IN ('A', 'A0', 'AE') THEN 'A' WHEN fld_zone = 'VE' THEN 'V' WHEN fld_zone = '0.2 PCT ANNUAL CHANCE FLOOD HAZARD' THEN 'Shaded X' END as fld_zone FROM floodplain_pfirm2015 WHERE fld_zone IN ('A', 'A0', 'AE') OR fld_zone = 'VE' "
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, CASE WHEN fld_zone IN ('A', 'A0', 'AE') THEN 'A' WHEN fld_zone = 'VE' THEN 'V' WHEN fld_zone = '0.2 PCT ANNUAL CHANCE FLOOD HAZARD' THEN 'Shaded X' END as fld_zone FROM floodplain_pfirm2015 WHERE fld_zone IN ('A', 'A0', 'AE') OR fld_zone = 'VE' "
}
],
"meta": {
Expand Down
6 changes: 3 additions & 3 deletions data/sources/landmark-historic.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"source-layers": [
{
"id": "historic-districts",
"sql": "SELECT the_geom_webmercator, area_name FROM historic_districts_lpc WHERE status_of = 'DESIGNATED'"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, area_name, FROM historic_districts_lpc WHERE status_of = 'DESIGNATED'"
},
{
"id": "landmarks",
"sql": "SELECT the_geom_webmercator, lm_name, lm_type FROM individual_landmarks_lpc WHERE (lm_type = 'Individual Landmark' OR lm_type = 'Interior Landmark') AND last_actio = 'DESIGNATED'"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, lm_name, lm_type FROM individual_landmarks_lpc WHERE (lm_type = 'Individual Landmark' OR lm_type = 'Interior Landmark') AND last_actio = 'DESIGNATED'"
},
{
"id": "scenic-landmarks",
"sql": "SELECT the_geom_webmercator, scen_lm_na FROM scenic_landmarks_lpc WHERE last_actio = 'DESIGNATED'"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, scen_lm_na FROM scenic_landmarks_lpc WHERE last_actio = 'DESIGNATED'"
}
],
"minzoom": 0,
Expand Down
8 changes: 4 additions & 4 deletions data/sources/paws.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
"source-layers": [
{
"id": "wpaas",
"sql": "SELECT the_geom_webmercator, cartodb_id, paws_id, name, feature_promenade_esplanade, feature_seating_lawn, feature_pier, feature_wetland_natural_edge, feature_dog_run, feature_educational_or_interpretive, feature_public_restroom, feature_shade_structure, feature_outdoor_art, feature_food_or_beverage_concessions, feature_group_seating, activity_volleyball_court, activity_basketball_court, activity_fishing, activity_boating_access, activity_tot_playground, activity_splash_feature, activity_other_recreational_facilities, activity_swimming, constructi FROM planninglabs.wpaas"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, paws_id, name, feature_promenade_esplanade, feature_seating_lawn, feature_pier, feature_wetland_natural_edge, feature_dog_run, feature_educational_or_interpretive, feature_public_restroom, feature_shade_structure, feature_outdoor_art, feature_food_or_beverage_concessions, feature_group_seating, activity_volleyball_court, activity_basketball_court, activity_fishing, activity_boating_access, activity_tot_playground, activity_splash_feature, activity_other_recreational_facilities, activity_swimming, constructi FROM planninglabs.wpaas"
},
{
"id": "publiclyownedwaterfront",
"sql": "SELECT the_geom_webmercator, cartodb_id, wf_park_id, park_name, link, agency, status FROM publiclyownedwaterfront"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, wf_park_id, park_name, link, agency, status FROM publiclyownedwaterfront"
},
{
"id": "paws_footprints",
"sql": "SELECT a.the_geom_webmercator, a.cartodb_id, a.paws_id, b.feature_promenade_esplanade, b.feature_seating_lawn, b.feature_pier, b.feature_wetland_natural_edge, b.feature_dog_run, b.feature_educational_or_interpretive, b.feature_public_restroom, b.feature_shade_structure, b.feature_outdoor_art, b.feature_food_or_beverage_concessions, b.feature_group_seating, b.activity_volleyball_court, b.activity_basketball_court, b.activity_fishing, b.activity_boating_access, b.activity_tot_playground, b.activity_splash_feature, b.activity_other_recreational_facilities, b.activity_swimming, b.constructi FROM wpaas_footprints AS a LEFT JOIN planninglabs.wpaas b ON a.paws_id = b.paws_id::text"
"sql": "SELECT a.the_geom_webmercator, a.cartodb_id AS id, a.paws_id, b.feature_promenade_esplanade, b.feature_seating_lawn, b.feature_pier, b.feature_wetland_natural_edge, b.feature_dog_run, b.feature_educational_or_interpretive, b.feature_public_restroom, b.feature_shade_structure, b.feature_outdoor_art, b.feature_food_or_beverage_concessions, b.feature_group_seating, b.activity_volleyball_court, b.activity_basketball_court, b.activity_fishing, b.activity_boating_access, b.activity_tot_playground, b.activity_splash_feature, b.activity_other_recreational_facilities, b.activity_swimming, b.constructi FROM wpaas_footprints AS a LEFT JOIN planninglabs.wpaas b ON a.paws_id = b.paws_id::text"
},
{
"id": "paws_entry_points",
"sql": "SELECT the_geom_webmercator, cartodb_id FROM wpaas_accesspoints"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id FROM wpaas_accesspoints"
}
],
"meta": {
Expand Down
2 changes: 1 addition & 1 deletion data/sources/preliminary-flood-insurance-rate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"source-layers": [
{
"id": "preliminary-flood-insurance-rate",
"sql": "SELECT the_geom_webmercator, CASE WHEN fld_zone IN ('A', 'A0', 'AE') THEN 'A' WHEN fld_zone = 'VE' THEN 'V' WHEN fld_zone = '0.2 PCT ANNUAL CHANCE FLOOD HAZARD' THEN 'Shaded X' END as fld_zone FROM floodplain_pfirm2015 WHERE fld_zone IN ('A', 'A0', 'AE') OR fld_zone = 'VE'"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, CASE WHEN fld_zone IN ('A', 'A0', 'AE') THEN 'A' WHEN fld_zone = 'VE' THEN 'V' WHEN fld_zone = '0.2 PCT ANNUAL CHANCE FLOOD HAZARD' THEN 'Shaded X' END as fld_zone FROM floodplain_pfirm2015 WHERE fld_zone IN ('A', 'A0', 'AE') OR fld_zone = 'VE'"
}
],
"minzoom": 0,
Expand Down
28 changes: 14 additions & 14 deletions data/sources/supporting-zoning.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,63 +8,63 @@
},
{
"id": "special-purpose-districts",
"sql": "SELECT the_geom_webmercator, cartodb_id, sdlbl, sdname FROM special_purpose_districts"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, sdlbl, sdname FROM special_purpose_districts"
},
{
"id": "special-purpose-subdistricts",
"sql": "SELECT the_geom_webmercator, cartodb_id, splbl, spname, subdist FROM special_purpose_subdistricts"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, splbl, spname, subdist FROM special_purpose_subdistricts"
},
{
"id": "mandatory-inclusionary-housing",
"sql": "SELECT the_geom_webmercator, projectnam, mih_option FROM mandatory_inclusionary_housing"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, projectnam, mih_option FROM mandatory_inclusionary_housing"
},
{
"id": "inclusionary-housing",
"sql": "SELECT the_geom_webmercator, projectnam FROM inclusionary_housing"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, projectnam FROM inclusionary_housing"
},
{
"id": "transit-zones",
"sql": "SELECT the_geom_webmercator FROM transitzones"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id FROM transitzones"
},
{
"id": "fresh",
"sql": "SELECT the_geom_webmercator, name FROM fresh_zones"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, name FROM fresh_zones"
},
{
"id": "sidewalk-cafes",
"sql": "SELECT the_geom_webmercator, cafetype FROM sidewalk_cafes"
},
{
"id": "low-density-growth-mgmt-areas",
"sql": "SELECT the_geom_webmercator FROM lower_density_growth_management_areas"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id FROM lower_density_growth_management_areas"
},
{
"id": "coastal-zone-boundary",
"sql": "SELECT the_geom_webmercator FROM coastal_zone_boundary"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, FROM coastal_zone_boundary"
},
{
"id": "waterfront-access-plan",
"sql": "SELECT the_geom_webmercator, name FROM waterfront_access_plan"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, name FROM waterfront_access_plan"
},
{
"id": "limited-height-districts",
"sql": "SELECT the_geom_webmercator, lhlbl, lhname FROM limited_height_districts"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, lhlbl, lhname FROM limited_height_districts"
},
{
"id": "business-improvement-districts",
"sql": "SELECT the_geom_webmercator, bid FROM business_improvement_districts"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, bid FROM business_improvement_districts"
},
{
"id": "e-designations",
"sql": "SELECT the_geom_webmercator, bbl, ceqr_num, enumber, ulurp_num FROM e_designations"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, bbl, ceqr_num, enumber, ulurp_num FROM e_designations"
},
{
"id": "industrial-business-zones",
"sql": "SELECT the_geom_webmercator, name FROM industrial_business_zones"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, name FROM industrial_business_zones"
},
{
"id": "appendixj-designated-mdistricts",
"sql": "SELECT the_geom_webmercator, name, subarea FROM appendixj_designated_mdistricts"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, name, subarea FROM appendixj_designated_mdistricts"
}
],
"meta": {
Expand Down
4 changes: 2 additions & 2 deletions data/sources/zoning-map-amendments.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"source-layers": [
{
"id": "zoning-map-amendments",
"sql": "SELECT * FROM (SELECT the_geom_webmercator, to_char(effective, 'MM/DD/YYYY') as effectiveformatted, extract(epoch from effective) * 1000 as effective_epoch, ulurpno, status, project_na FROM planninglabs.zoning_map_amendments WHERE status = 'Adopted') a"
"sql": "SELECT * FROM (SELECT the_geom_webmercator, cartodb_id AS id, to_char(effective, 'MM/DD/YYYY') as effectiveformatted, extract(epoch from effective) * 1000 as effective_epoch, ulurpno, status, project_na FROM planninglabs.zoning_map_amendments WHERE status = 'Adopted') a"
},
{
"id": "zoning-map-amendments-pending",
"sql": "SELECT the_geom_webmercator, ulurpno, status, project_na FROM zoning_map_amendments WHERE status = 'Certified'"
"sql": "SELECT the_geom_webmercator, cartodb_id AS id, ulurpno, status, project_na FROM zoning_map_amendments WHERE status = 'Certified'"
}
],
"meta": {
Expand Down
24 changes: 12 additions & 12 deletions test/acceptance/routes.layer-group.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,18 +484,18 @@ describe('POST /layer-groups', () => {
// });
// });

it('returns a 200 response with json; returns all by default', (done) => {
chai.request(server)
.get('/v1/layer-groups')
.set('content-type', 'application/json')
.end((err, res) => {
should.not.exist(err);
res.status.should.equal(200);
res.type.should.equal('application/json');

done();
});
});
// it('returns a 200 response with json; returns all by default', (done) => {
// chai.request(server)
// .get('/v1/layer-groups')
// .set('content-type', 'application/json')
// .end((err, res) => {
// should.not.exist(err);
// res.status.should.equal(200);
// res.type.should.equal('application/json');
//
// done();
// });
// });

it('accepts query params for specific layer groups', (done) => {
chai.request(server)
Expand Down

0 comments on commit 4fdd6c1

Please sign in to comment.