Documentation ¶
Overview ¶
Code generated for package cityaq by go-bindata DO NOT EDIT. (@generated) sources: gui/html/cityaq.wasm.br gui/html/index.html gui/html/wasm_exec.js
Index ¶
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type CityAQ
- func (c *CityAQ) Cities(ctx context.Context, _ *rpc.CitiesRequest) (*rpc.CitiesResponse, error)
- func (c *CityAQ) CityGeometry(ctx context.Context, req *rpc.CityGeometryRequest) (*rpc.CityGeometryResponse, error)
- func (c *CityAQ) EmissionsGridBounds(ctx context.Context, req *rpc.EmissionsGridBoundsRequest) (*rpc.EmissionsGridBoundsResponse, error)
- func (c *CityAQ) EmissionsInventorySectors(ctx context.Context, in *cityaqrpc.EmissionsInventorySectorsRequest) (*cityaqrpc.EmissionsInventorySectorsResponse, error)
- func (c *CityAQ) GriddedConcentrations(ctx context.Context, req *rpc.GriddedConcentrationsRequest) (*rpc.GriddedConcentrationsResponse, error)
- func (c *CityAQ) GriddedEmissions(ctx context.Context, req *rpc.GriddedEmissionsRequest) (*rpc.GriddedEmissionsResponse, error)
- func (c *CityAQ) GriddedPopulation(ctx context.Context, req *rpc.GriddedPopulationRequest) (*rpc.GriddedPopulationResponse, error)
- func (c *CityAQ) ImpactSummary(ctx context.Context, req *rpc.ImpactSummaryRequest) (*rpc.ImpactSummaryResponse, error)
- func (c *CityAQ) MapScale(ctx context.Context, req *rpc.MapScaleRequest) (*rpc.MapScaleResponse, error)
- type GRPCServer
- type MapSpecification
- type MapTileServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type CityAQ ¶
type CityAQ struct { // CityGeomDir is the location of the directory that holds the // GeoJSON geometries of cities. CityGeomDir string aeputil.SpatialConfig // Location where temporary results should be stored. CacheLoc string // InMAPCityMarginalConfigFile specifies the path to the file with InMAP // configuration information for city marginal simulations. InMAPCityMarginalConfigFile string // InMAPCityTotalConfigFile specifies the path to the file with InMAP // configuration information for a city-specific total-concentration simulation. InMAPCityTotalConfigFile string // InMAPTotalConfigFile specifies the path to the file with InMAP // configuration information for a total-concentration simulation. InMAPTotalConfigFile string // Version specifies the version of the InMAP Docker image that should be // used for running simulations, for example "latest" or "v1.7.2". Version string // contains filtered or unexported fields }
CityAQ estimates the air quality impacts of activities in cities.
func (*CityAQ) Cities ¶
func (c *CityAQ) Cities(ctx context.Context, _ *rpc.CitiesRequest) (*rpc.CitiesResponse, error)
Cities returns the files in the CityGeomDir directory field of the receiver.
func (*CityAQ) CityGeometry ¶
func (c *CityAQ) CityGeometry(ctx context.Context, req *rpc.CityGeometryRequest) (*rpc.CityGeometryResponse, error)
CityGeometry returns the geometry of the requested city.
func (*CityAQ) EmissionsGridBounds ¶
func (c *CityAQ) EmissionsGridBounds(ctx context.Context, req *rpc.EmissionsGridBoundsRequest) (*rpc.EmissionsGridBoundsResponse, error)
EmissionsGridBounds returns the bounds of the grid to be used for mapping gridded information about the requested city.
func (*CityAQ) EmissionsInventorySectors ¶
func (c *CityAQ) EmissionsInventorySectors(ctx context.Context, in *cityaqrpc.EmissionsInventorySectorsRequest) (*cityaqrpc.EmissionsInventorySectorsResponse, error)
EmissionsInventorySectors returns the available emissions source types in the emissions inventory.
func (*CityAQ) GriddedConcentrations ¶
func (c *CityAQ) GriddedConcentrations(ctx context.Context, req *rpc.GriddedConcentrationsRequest) (*rpc.GriddedConcentrationsResponse, error)
GriddedConcentrations returns PM2.5 concentrations calculated by the InMAP air quality model.
func (*CityAQ) GriddedEmissions ¶
func (c *CityAQ) GriddedEmissions(ctx context.Context, req *rpc.GriddedEmissionsRequest) (*rpc.GriddedEmissionsResponse, error)
GriddedEmissions returns gridded emissions for the request. If req.SourceType has the suffix "_egugrid", emissions will be allocated to the smaller of country that the city is in or the intersection of the country with a 5.4 degree radius buffer around the city, otherwise they will be allocated within the city itself.
func (*CityAQ) GriddedPopulation ¶
func (c *CityAQ) GriddedPopulation(ctx context.Context, req *rpc.GriddedPopulationRequest) (*rpc.GriddedPopulationResponse, error)
GriddedPopulation returns population counts on the same grid as the gridded concentrations.
func (*CityAQ) ImpactSummary ¶
func (c *CityAQ) ImpactSummary(ctx context.Context, req *rpc.ImpactSummaryRequest) (*rpc.ImpactSummaryResponse, error)
ImpactSummary returns a summary of the impacts from the given request.
func (*CityAQ) MapScale ¶
func (c *CityAQ) MapScale(ctx context.Context, req *rpc.MapScaleRequest) (*rpc.MapScaleResponse, error)
MapScale returns statistics about map data.
type GRPCServer ¶
type GRPCServer struct { CityAQ Log logrus.FieldLogger // contains filtered or unexported fields }
GRPCSServer is a GRPC server for city AQ simulation data.
func NewGRPCServer ¶
func NewGRPCServer(c *CityAQ) *GRPCServer
NewGRPCServer creates a new GRPC server for c.
func (*GRPCServer) ServeHTTP ¶
func (s *GRPCServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
type MapSpecification ¶
type MapSpecification struct { CityName string ImpactType rpc.ImpactType Emission rpc.Emission SourceType string SimulationType rpc.SimulationType // contains filtered or unexported fields }
MapSpecification holds information to specify the map data to serve.
func (*MapSpecification) Key ¶
func (ms *MapSpecification) Key() string
Key returns a unique identifier for the receiver.
type MapTileServer ¶
type MapTileServer struct {
// contains filtered or unexported fields
}
MapTileServer serves map tiles for visualizing simulation results.
func NewMapTileServer ¶
func NewMapTileServer(c *CityAQ, cacheSize int) *MapTileServer
NewMapTileServer creates a new map tile server, where cacheSize specifies the number of map layers to hold in an in-memory cache.
func (*MapTileServer) Layers ¶
func (s *MapTileServer) Layers(ctx context.Context, ms *MapSpecification) (mvt.Layers, error)
Layers returns the vector tile layers associated with ms.
func (*MapTileServer) ServeHTTP ¶
func (s *MapTileServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
mock_cityaqrpc
Package mock_cityaqrpc is a generated GoMock package.
|
Package mock_cityaqrpc is a generated GoMock package. |
Package gui implements a web interface for the CityAQ service.
|
Package gui implements a web interface for the CityAQ service. |
internal
|
|
addtags
Command addtags adds the specified build tags to the specified Go source file.
|
Command addtags adds the specified build tags to the specified Go source file. |