Class: Google::Apis::SolarV1::DataLayers
- Inherits:
-
Object
- Object
- Google::Apis::SolarV1::DataLayers
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/solar_v1/classes.rb,
lib/google/apis/solar_v1/representations.rb,
lib/google/apis/solar_v1/representations.rb
Overview
Information about the solar potential of a region. The actual data are
contained in a number of GeoTIFF files covering the requested region, for
which this message contains URLs: Each string in the DataLayers
message
contains a URL from which the corresponding GeoTIFF can be fetched. These URLs
are valid for a few hours after they've been generated. Most of the GeoTIFF
files are at a resolution of 0.1m/pixel, but the monthly flux file is at 0.5m/
pixel, and the hourly shade files are at 1m/pixel. If a pixel_size_meters
value was specified in the GetDataLayersRequest
, then the minimum resolution
in the GeoTIFF files will be that value.
Instance Attribute Summary collapse
-
#annual_flux_url ⇒ String
The URL for the annual flux map (annual sunlight on roofs) of the region.
-
#dsm_url ⇒ String
The URL for an image of the DSM (Digital Surface Model) of the region.
-
#hourly_shade_urls ⇒ Array<String>
Twelve URLs for hourly shade, corresponding to January...December, in order.
-
#imagery_date ⇒ Google::Apis::SolarV1::Date
Represents a whole or partial calendar date, such as a birthday.
-
#imagery_processed_date ⇒ Google::Apis::SolarV1::Date
Represents a whole or partial calendar date, such as a birthday.
-
#imagery_quality ⇒ String
The quality of the result's imagery.
-
#mask_url ⇒ String
The URL for the building mask image: one bit per pixel saying whether that pixel is considered to be part of a rooftop or not.
-
#monthly_flux_url ⇒ String
The URL for the monthly flux map (sunlight on roofs, broken down by month) of the region.
-
#rgb_url ⇒ String
The URL for an image of RGB data (aerial photo) of the region.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DataLayers
constructor
A new instance of DataLayers.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DataLayers
Returns a new instance of DataLayers.
271 272 273 |
# File 'lib/google/apis/solar_v1/classes.rb', line 271 def initialize(**args) update!(**args) end |
Instance Attribute Details
#annual_flux_url ⇒ String
The URL for the annual flux map (annual sunlight on roofs) of the region.
Values are kWh/kW/year. This is unmasked flux: flux is computed for every
location, not just building rooftops. Invalid locations are stored as -9999:
locations outside our coverage area will be invalid, and a few locations
inside the coverage area, where we were unable to calculate flux, will also be
invalid.
Corresponds to the JSON property annualFluxUrl
191 192 193 |
# File 'lib/google/apis/solar_v1/classes.rb', line 191 def annual_flux_url @annual_flux_url end |
#dsm_url ⇒ String
The URL for an image of the DSM (Digital Surface Model) of the region. Values
are in meters above EGM96 geoid (i.e., sea level). Invalid locations (where we
don't have data) are stored as -9999.
Corresponds to the JSON property dsmUrl
198 199 200 |
# File 'lib/google/apis/solar_v1/classes.rb', line 198 def dsm_url @dsm_url end |
#hourly_shade_urls ⇒ Array<String>
Twelve URLs for hourly shade, corresponding to January...December, in order.
Each GeoTIFF will contain 24 bands, corresponding to the 24 hours of the day.
Each pixel is a 32 bit integer, corresponding to the (up to) 31 days of that
month; a 1 bit means that the corresponding location is able to see the sun at
that day, of that hour, of that month. Invalid locations are stored as -9999 (
since this is negative, it has bit 31 set, and no valid value could have bit
31 set as that would correspond to the 32nd day of the month). An example may
be useful. If you want to know whether a point (at pixel location (x, y)) saw
sun at 4pm on the 22nd of June you would: 1. fetch the sixth URL in this list (
corresponding to June). 1. look up the 17th channel (corresponding to 4pm). 1.
read the 32-bit value at (x, y). 1. read bit 21 of the value (corresponding to
the 22nd of the month). 1. if that bit is a 1, then that spot saw the sun at
4pm 22 June. More formally: Given month
(1-12), day
(1...month max;
February has 28 days) and hour
(0-23), the shade/sun for that month/day/hour
at a position (x, y)
is the bit (hourly_shade[month - 1])(x, y)[hour] & (
1 << (day - 1))
where (x, y)
is spatial indexing, [month - 1]
refers
to fetching the month - 1
st URL (indexing from zero), [hour]
is indexing
into the channels, and a final non-zero result means "sunny". There are no
leap days, and DST doesn't exist (all days are 24 hours long; noon is always "
standard time" noon).
Corresponds to the JSON property hourlyShadeUrls
222 223 224 |
# File 'lib/google/apis/solar_v1/classes.rb', line 222 def hourly_shade_urls @hourly_shade_urls end |
#imagery_date ⇒ Google::Apis::SolarV1::Date
Represents a whole or partial calendar date, such as a birthday. The time of
day and time zone are either specified elsewhere or are insignificant. The
date is relative to the Gregorian Calendar. This can represent one of the
following: * A full date, with non-zero year, month, and day values. * A month
and day, with a zero year (for example, an anniversary). * A year on its own,
with a zero month and a zero day. * A year and month, with a zero day (for
example, a credit card expiration date). Related types: * google.type.
TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
Corresponds to the JSON property imageryDate
234 235 236 |
# File 'lib/google/apis/solar_v1/classes.rb', line 234 def imagery_date @imagery_date end |
#imagery_processed_date ⇒ Google::Apis::SolarV1::Date
Represents a whole or partial calendar date, such as a birthday. The time of
day and time zone are either specified elsewhere or are insignificant. The
date is relative to the Gregorian Calendar. This can represent one of the
following: * A full date, with non-zero year, month, and day values. * A month
and day, with a zero year (for example, an anniversary). * A year on its own,
with a zero month and a zero day. * A year and month, with a zero day (for
example, a credit card expiration date). Related types: * google.type.
TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
Corresponds to the JSON property imageryProcessedDate
246 247 248 |
# File 'lib/google/apis/solar_v1/classes.rb', line 246 def imagery_processed_date @imagery_processed_date end |
#imagery_quality ⇒ String
The quality of the result's imagery.
Corresponds to the JSON property imageryQuality
251 252 253 |
# File 'lib/google/apis/solar_v1/classes.rb', line 251 def imagery_quality @imagery_quality end |
#mask_url ⇒ String
The URL for the building mask image: one bit per pixel saying whether that
pixel is considered to be part of a rooftop or not.
Corresponds to the JSON property maskUrl
257 258 259 |
# File 'lib/google/apis/solar_v1/classes.rb', line 257 def mask_url @mask_url end |
#monthly_flux_url ⇒ String
The URL for the monthly flux map (sunlight on roofs, broken down by month) of
the region. Values are kWh/kW/year. The GeoTIFF pointed to by this URL will
contain twelve bands, corresponding to January...December, in order.
Corresponds to the JSON property monthlyFluxUrl
264 265 266 |
# File 'lib/google/apis/solar_v1/classes.rb', line 264 def monthly_flux_url @monthly_flux_url end |
#rgb_url ⇒ String
The URL for an image of RGB data (aerial photo) of the region.
Corresponds to the JSON property rgbUrl
269 270 271 |
# File 'lib/google/apis/solar_v1/classes.rb', line 269 def rgb_url @rgb_url end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/google/apis/solar_v1/classes.rb', line 276 def update!(**args) @annual_flux_url = args[:annual_flux_url] if args.key?(:annual_flux_url) @dsm_url = args[:dsm_url] if args.key?(:dsm_url) @hourly_shade_urls = args[:hourly_shade_urls] if args.key?(:hourly_shade_urls) @imagery_date = args[:imagery_date] if args.key?(:imagery_date) @imagery_processed_date = args[:imagery_processed_date] if args.key?(:imagery_processed_date) @imagery_quality = args[:imagery_quality] if args.key?(:imagery_quality) @mask_url = args[:mask_url] if args.key?(:mask_url) @monthly_flux_url = args[:monthly_flux_url] if args.key?(:monthly_flux_url) @rgb_url = args[:rgb_url] if args.key?(:rgb_url) end |