public static ORSX_PlanetaryResourcePixel getResourceAvailability(int body, string resourcename, double lat, double lng) { if (body != current_body) { loadPlanetaryResourceData(body); } if (body_resource_maps.ContainsKey(resourcename)) { ORSX_PlanetaryResourceInfo resource_info = body_resource_maps[resourcename]; double resource_val = resource_info.getLatLongAbundanceValue(lat, lng); var resource_pixel = new ORSX_PlanetaryResourcePixel(resource_info.getName(), resource_val, resource_info.getBody()); resource_pixel.setResourceName(resource_info.getResourceName()); return(resource_pixel); } else { var resource_pixel = new ORSX_PlanetaryResourcePixel(resourcename, 0, body); return(resource_pixel); } }
public static double getPixelAbundanceValue(int body, string resourcename, double lat, double lng) { if (body != current_body) { loadPlanetaryResourceData(body); } if (body_resource_maps.ContainsKey(resourcename)) { ORSX_PlanetaryResourceInfo resource_info = body_resource_maps[resourcename]; return(resource_info.getLatLongAbundanceValue(lat, lng)); } else { return(0); } }