Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/routes/sections/DataLayersSection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
let apiResponseDialog: MdDialog;
let layerId: LayerId | 'none' = 'monthlyFlux';
let layer: Layer | undefined;
let imageryQuality: 'HIGH' | 'MEDIUM' | 'LOW';
let imageryQuality: 'HIGH' | 'MEDIUM' | 'BASE';

let playAnimation = true;
let tick = 0;
Expand Down Expand Up @@ -250,9 +250,9 @@
{:else if imageryQuality == 'MEDIUM'}
<p><b>AI augmented aerial imagery</b> available.</p>
<p>Imagery and DSM data were processed at <b>25 cm/pixel</b>.</p>
{:else if imageryQuality == 'LOW'}
<p><b>AI augmented aerial or satellite imagery</b> available.</p>
<p>Imagery and DSM data were processed at <b>50 cm/pixel</b>.</p>
{:else if imageryQuality == 'BASE'}
<p><b>AI augmented satellite imagery</b> available.</p>
<p>Imagery and DSM data were processed at <b>25 cm/pixel</b>.</p>
{/if}
</span>

Expand Down
12 changes: 7 additions & 5 deletions src/routes/solar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface DataLayersResponse {
annualFluxUrl: string;
monthlyFluxUrl: string;
hourlyShadeUrls: string[];
imageryQuality: 'HIGH' | 'MEDIUM' | 'LOW';
imageryQuality: 'HIGH' | 'MEDIUM' | 'BASE';
}

export interface Bounds {
Expand All @@ -46,7 +46,7 @@ export interface BuildingInsightsResponse {
statisticalArea: string;
regionCode: string;
solarPotential: SolarPotential;
imageryQuality: 'HIGH' | 'MEDIUM' | 'LOW';
imageryQuality: 'HIGH' | 'MEDIUM' | 'BASE';
}

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