Skip to content

Commit 9e844ed

Browse files
authored
Update LOW ImageryQuality references to use BASE (#49)
* Update solar.ts ImageryQuality LOW to BASE * Update DataLayersSection.svelte
1 parent 2a0e669 commit 9e844ed

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/routes/sections/DataLayersSection.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
let apiResponseDialog: MdDialog;
7878
let layerId: LayerId | 'none' = 'monthlyFlux';
7979
let layer: Layer | undefined;
80-
let imageryQuality: 'HIGH' | 'MEDIUM' | 'LOW';
80+
let imageryQuality: 'HIGH' | 'MEDIUM' | 'BASE';
8181
8282
let playAnimation = true;
8383
let tick = 0;
@@ -250,9 +250,9 @@
250250
{:else if imageryQuality == 'MEDIUM'}
251251
<p><b>AI augmented aerial imagery</b> available.</p>
252252
<p>Imagery and DSM data were processed at <b>25 cm/pixel</b>.</p>
253-
{:else if imageryQuality == 'LOW'}
254-
<p><b>AI augmented aerial or satellite imagery</b> available.</p>
255-
<p>Imagery and DSM data were processed at <b>50 cm/pixel</b>.</p>
253+
{:else if imageryQuality == 'BASE'}
254+
<p><b>AI augmented satellite imagery</b> available.</p>
255+
<p>Imagery and DSM data were processed at <b>25 cm/pixel</b>.</p>
256256
{/if}
257257
</span>
258258

src/routes/solar.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface DataLayersResponse {
2424
annualFluxUrl: string;
2525
monthlyFluxUrl: string;
2626
hourlyShadeUrls: string[];
27-
imageryQuality: 'HIGH' | 'MEDIUM' | 'LOW';
27+
imageryQuality: 'HIGH' | 'MEDIUM' | 'BASE';
2828
}
2929

3030
export interface Bounds {
@@ -46,7 +46,7 @@ export interface BuildingInsightsResponse {
4646
statisticalArea: string;
4747
regionCode: string;
4848
solarPotential: SolarPotential;
49-
imageryQuality: 'HIGH' | 'MEDIUM' | 'LOW';
49+
imageryQuality: 'HIGH' | 'MEDIUM' | 'BASE';
5050
}
5151

5252
export interface SolarPotential {
@@ -146,6 +146,8 @@ export async function findClosestBuilding(
146146
const args = {
147147
'location.latitude': location.lat().toFixed(5),
148148
'location.longitude': location.lng().toFixed(5),
149+
// The Solar API always returns the highest quality imagery available.
150+
required_quality: 'BASE',
149151
};
150152
console.log('GET buildingInsights\n', args);
151153
const params = new URLSearchParams({ ...args, key: apiKey });
@@ -185,10 +187,10 @@ export async function getDataLayerUrls(
185187
radius_meters: radiusMeters.toString(),
186188
// The Solar API always returns the highest quality imagery available.
187189
// By default the API asks for HIGH quality, which means that HIGH quality isn't available,
188-
// but there is an existing MEDIUM or LOW quality, it won't return anything.
189-
// Here we ask for *at least* LOW quality, but if there's a higher quality available,
190+
// but there is an existing MEDIUM or BASE quality, it won't return anything.
191+
// Here we ask for *at least* BASE quality, but if there's a higher quality available,
190192
// the Solar API will return us the highest quality available.
191-
required_quality: 'LOW',
193+
required_quality: 'BASE',
192194
};
193195
console.log('GET dataLayers\n', args);
194196
const params = new URLSearchParams({ ...args, key: apiKey });

0 commit comments

Comments
 (0)