i want to know if there is any online api for getting pressure and temperature of a location, if not, then i have height above sealevel (in meters and feet), how can i calculate that to get pressure and temperature of a location?
- Don't know if there is a free (as in beer) public API but there are many weather services that provides this data for a fee.
- Temperature and atmospheric pressure depends on the weather system, not on height, so you cannot calculate it with only "height above sealevel".
Edit:
Apparently Yahoo has a public API that includes both Temperature and Pressure.
You can check out this StackOverflow question about Best Weather API for your first question.
The current air pressure for a point is not a simple relationship between temperature and elevation. For a better understanding of air pressure see NOAA's brief tutorial on Air Pressure.
Do you want current atmospheric pressure for a weather station (surface level)? Do you want local altimeter (or pressure altitude) settings for various airports and locations?
I'm assuming you are asking for current (present) conditions, not forecast data.
Your question is vague, so without knowing how you wish to use the data I cannot infer more. I hope this helps point you in the right direction, or at least helps you better understand what you really want. Good luck.
for a model of atmosphere see "International Standard Atmosphere" or "ICAO Standard Atmosphere"
http://en.wikipedia.org/wiki/International_Standard_Atmosphere