Skip to content

Commit

Permalink
For intersecting layers component, infers intersection from static pr…
Browse files Browse the repository at this point in the history
…operty on lot model rather than on-the-fly spatial intersection
  • Loading branch information
allthesignals committed Oct 27, 2021
1 parent a8665c3 commit 33c320c
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 44 deletions.
3 changes: 3 additions & 0 deletions app/adapters/lot.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const LotColumnsSQL = [
'condono',
'council',
'firecomp',
'firm07_fla',
'edesignum',
'pfirm15_fl',
'histdist',
'landmark',
'landuse',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ export default class IntersectingLayersViews extends Component {
'waterfront_access_plan',
'coastal_zone_boundary',
'lower_density_growth_management_areas',
'floodplain_firm2007',
'floodplain_pfirm2015',
'mandatory_inclusionary_housing',
'e_designations',
'upland_waterfront_areas',
'appendixj_designated_mdistricts',
];
Expand Down
6 changes: 6 additions & 0 deletions app/models/map-features/lot.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,14 @@ export default class LotFragment extends MF.Fragment {

@attr('string') council;

@attr('string') edesignum;

@attr('string') firecomp;

@attr('string') firm07_fla;

@attr('string') pfirm15_fl;

@attr('string') histdist;

@attr('string') landmark;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,48 @@
</li>
{{/if}}

{{#if this.model.firm07_fla}}
<li>
<a
target="_blank"
href="http://www1.nyc.gov/site/planning/zoning/districts-tools/flood-text.page"
>
{{fa-icon "external-link-alt" transform="shrink-3 up-1"}}
Flood Zone
</a>
<small class="dark-gray">
Effective Flood Insurance Rate Maps 2007
</small>
</li>
{{/if}}

{{#if this.model.pfirm15_fl}}
<li>
<a
target="_blank"
href="http://www1.nyc.gov/site/planning/zoning/districts-tools/flood-text.page"
>
{{fa-icon "external-link-alt" transform="shrink-3 up-1"}}
Flood Zone
</a>
<small class="dark-gray">
Preliminary Flood Insurance Rate Maps 2015
</small>
</li>
{{/if}}

{{#if this.model.edesignum}}
<li>
<a
target="_blank"
href="http://www.nyc.gov/html/oer/html/e-designation/e-designation.shtml"
>
{{fa-icon "external-link-alt" transform="shrink-3 up-1"}}
Environmental Designation
</a>
</li>
{{/if}}

<IntersectingLayers
@tables={{this.tables}}
@bbl={{this.model.bbl}} as |layers numberIntersecting|
Expand Down Expand Up @@ -94,34 +136,6 @@
</a>
</li>
{{/if}}
{{#if layers.floodplain_firm2007}}
<li>
<a
target="_blank"
href="http://www1.nyc.gov/site/planning/zoning/districts-tools/flood-text.page"
>
{{fa-icon "external-link-alt" transform="shrink-3 up-1"}}
Flood Zone
</a>
<small class="dark-gray">
Effective Flood Insurance Rate Maps 2007
</small>
</li>
{{/if}}
{{#if layers.floodplain_pfirm2015}}
<li>
<a
target="_blank"
href="http://www1.nyc.gov/site/planning/zoning/districts-tools/flood-text.page"
>
{{fa-icon "external-link-alt" transform="shrink-3 up-1"}}
Flood Zone
</a>
<small class="dark-gray">
Preliminary Flood Insurance Rate Maps 2015
</small>
</li>
{{/if}}
{{#if layers.mandatory_inclusionary_housing}}
<li>
<a
Expand All @@ -133,17 +147,6 @@
</a>
</li>
{{/if}}
{{#if layers.e_designations}}
<li>
<a
target="_blank"
href="http://www.nyc.gov/html/oer/html/e-designation/e-designation.shtml"
>
{{fa-icon "external-link-alt" transform="shrink-3 up-1"}}
Environmental Designation
</a>
</li>
{{/if}}
{{#if layers.appendixj_designated_mdistricts}}
<li>
<a
Expand All @@ -155,7 +158,7 @@
</a>
</li>
{{/if}}
{{#unless (or numberIntersecting this.model.histdist)}}
{{#unless (or numberIntersecting this.model.histdist this.model.firm07_fla this.model.pfirm15_fl this.model.edesignum)}}
None found
{{/unless}}
</IntersectingLayers>
</IntersectingLayers>

0 comments on commit 33c320c

Please sign in to comment.