HW3Tropical
(Answers to common questions and techniques with...)
Top Level Category
Parent category to all other categories
How to use a background image for your Forecast Graphics ..
The question had come up several times on the support forums, "How do I use a background image for my HWImage created weather graphics?"
In this short knowledge base article we will take each part of the new hwibgzone template apart... These Image template commands are interchangeable between HWimage for Php or Perl.
Please note: HWimage for PHP will not use gif's for background's it must be either png or jpg/jpeg
The first part of the template sets the height and width of the background image ...
%%hwi=hwi_header%%
<!-- Create the image --> NEWIMAGE zone 500 300 BACKGROUND FFFFFF
LOADIMAGE "bg" "%%CFG: Paths:html_side%%/images/cloudy_5day1.png" "png" TRUECOLOR 1 <!-- if we have a ttf font lets set it --> %%IF ('%%hwv_ttf_font%%' && '%%hwvusettf%%' ne '0') THEN TTFTEXTFONT "%%hwv_ttf_font%%" IF%%
You will notice the TRUECOLOR 1 line, that is because we need the full 16.7 million color palette loaded as the background image is in 16.7mil and not 256, if that line is not included your background and weather icons will "bleed" and look faded.
Next section sets the spacing between the day forecast area's.
The first LET line sets the maximum days that HW has found in the Forecast text The second LET sets us for the max of 5 days, the way HW counts the Days 0 is day 1 in the %%hwcounter%% routine's The third LET line sets the spacing from the left edge of the image to the center of the first forecast area the spacing between each area after that will be controlled in the %%REPEAT lines of each item.
Here is the line placing the day names, The converted variables will read like this for the first day TEXTAT {0*89 + 70} well we know 0*89 is 0, so the horizontal pixel from the left edge is 70, the second day will then be 1*89+70 = 159 pixels from the left edge The 88 is the vertical pixel count from the top of the image SPACEWRAPCENTER tell HW that if the day name is longer then 74 pixels to break the name up and form a new line that way the name will not run over to the next area That is set by the TEXTWRAP command We use the bottom of the text as our placement
This should give you an idea how to correctly use an image for your forecast graphics, and how to get the spacing needed to properly space your text.
as always question's should be referred to the HW Support Forums Specifically the HWimage forum
HWwarnings Service
Frequesntly Asked Questions for the HWwarnings Service
How do I eliminate displaying multiple Warnings ?
By default the HWwarnings plug-in has the possibility of displaying the same warning type more then once.
To eliminate this from happening, in your fc_warnings config file look for thewarnings_prefix= line, go across to you see the &clean=1 in the URL. Change the &clean=1 to &clean=3 then delete the files in your cache directory. This will tell the HWwarnings service to return the newest valid warning.
HWwarnings Pre-Sales Questions
Pre-sales questions associated with the HWwarnings Service
Are there any special requirements?
For the HWwarnigns service the only requirement is that you can run a small Image Fetch script or for a full clickable warning map integration there is a HWwarning Service plugin for HAMweather 3.
Can I brand the Warning Maps for use on my site?
Yes! This is what makes the HWwarnings Service stand out! With the HWwarnings service you can brand your images using a simple to use web based interface.
For additional customization there is the optional Color Customizer which allows you to customize the colors of the base map and the actual advisories.
Is there a price difference between registered and non registered HAMweather users?
Currently there is not a price difference for registered HAMweather users vs non registered. Though HWwarnings is offered at a discounted price for subscribers of the HWContours service.
HAMweather 3
Frequently Asked Questions about HAMweather
How can I change data sources for my HW current conditions?
Occasionally the primary data source for current conditions for your HW installation may not be updating due to server issues/upgrades on NOAA's central servers. The result will be 'N/A' in most of your current conditions output even though you may have the expanded HW places database. This is not a bug in HW and can typically be corrected by modifying your currents configuration by performing the following actions:
Backup your 'configs/fc_metar.ini' ('configs/fc_metar.ini.php' for the php version) file and then open the live version for editing (not your backup).
In the URLs section, change the following existing code:
After making the above code changes, make sure that you delete the files in your HW cache directory before verifying the modification.
HAMweather Installation
Questions dealing with HAMweather 3 Installation
Current conditions displaying "N/A"
If you are receiving "N/A" in the current conditions for most US cities, especially smaller ones, then you are most likely using freeware database which came with HAMweather Installation.
The freeware database that is included with the distribution, only include the closest ICAO (used for current conditions) correlation for the top 100 US cities, based on population.
You can manually edit the database to add the closest ICAO correlation to each city. Or if you register HAMweather you gain access to the HWdb Download center for 30 days, to allow you to download the latest complete database. Alternatively you can subscribe to the HWdb Update service for as little as one month to gain access to the latest, complete HAMweather database. Once downloaded, you are allowed to continue using the downloaded database with HAMweather 3 for as long as needed.
If you plan to use HAMweather for a small local area only and only need the closest ICAO for a few locations, feel free to post a request in the support forums, and HAMweather, LLC will gladly provide these ICAOs with directions on adding them to the database.
How do I install the GD.pm module on a Windows server?
If you currently do not have the required GD.pm module installed on your server, which is required for all image generation within HAMweather, you will need to contact your host to request it to be installed. If not on a shared hosting account you can install it by running the following commands at the command line:
How can I change data sources for my HW current conditions?
Occasionally the primary data source for current conditions for your HW installation may not be updating due to server issues/upgrades on NOAA's central servers. The result will be 'N/A' in most of your current conditions output even though you may have the expanded HW places database. This is not a bug in HW and can typically be corrected by modifying your currents configuration by performing the following actions:
Backup your 'configs/fc_metar.ini' ('configs/fc_metar.ini.php' for the php version) file and then open the live version for editing (not your backup).
In the URLs section, change the following existing code:
After making the above code changes, make sure that you delete the files in your HW cache directory before verifying the modification.
HAMweather Licensing Questions
Questions about proper HAMweather licensing
There are no articles in this category.
HAMweather Usage and Customization
Questions about using and customizing HAMweather
Current conditions displaying "N/A"
If you are receiving "N/A" in the current conditions for most US cities, especially smaller ones, then you are most likely using freeware database which came with HAMweather Installation.
The freeware database that is included with the distribution, only include the closest ICAO (used for current conditions) correlation for the top 100 US cities, based on population.
You can manually edit the database to add the closest ICAO correlation to each city. Or if you register HAMweather you gain access to the HWdb Download center for 30 days, to allow you to download the latest complete database. Alternatively you can subscribe to the HWdb Update service for as little as one month to gain access to the latest, complete HAMweather database. Once downloaded, you are allowed to continue using the downloaded database with HAMweather 3 for as long as needed.
If you plan to use HAMweather for a small local area only and only need the closest ICAO for a few locations, feel free to post a request in the support forums, and HAMweather, LLC will gladly provide these ICAOs with directions on adding them to the database.
Template structure for 'forecast=zandh'
Where ever you see %%hwi=xxxx%%, that is a Ham Weather Include. This tells the template parser of HW to include the template from the 'include' directory, named after the equal sign, minus the file extension.
These thumbnails will expand upon clicking on, to give you the breakdown of the template structure of the 'zandh.html' template.from the top of the page down. All templates start by calling the 'include/header.html' template. Each template that makes up the final 'zandh.html' template is color coded in these images.
You should note, the 'zandh.html' template will include the 'include/zonsection.html'.. The 'include/zonsection.html' template will include the 'include/zone_rows.html'.
How can I add HW weather output to my web page?
Depending on your needs, you may find that you want to include various weather data on a page of your website that exists outside of your HW installation. There are several potential methods to approach this using HTML output or generating an image.
HTML output To start with, you will need to create a custom template that will output the weather data and the proper HTML formatting you need. For example, the following custom template will output various current weather data when viewed:
Note: If you only need the data for a single location and have the ability to run crons on your server, it would be more efficient to make a template then run a cron task that sends the output to a file once an hour. Then use an SSI include file or the php INCLUDE command on this file ss it will lower resource usage greatly. But if you need it to be dynamic for a forecast for any location, then you will need to call the script directly.
Image output You can also use a HWimage generated image and simply use the HW url in the image source tag. If you want to use an image instead of HTML output, you would include an HTML image tag similar to:
You can create your own custom image templates using the sample templates (templates/hwicc.hwi3 and templates/hwizone.hwi3) that are packaged with the HW3Image distribution as examples. Also, additional image commands are available by reviewing the HW3Image documentation
How can I add a location to my HW database?
If you are using the freeware database, you can get the latest complete HW database by registering your installation of HW or subscribing to the HWdb update service. To manually add a location to your HW places database, use the following methods based on the database type you are using (flatfile or sql). To add a location, you will need the following information for the location:
name: city name state: 2-letter state abbreviation (i.e. tx, ga, ny) fips: US locations only; federal information processing standard for the location (i.e. 13057, 05049) country: 2-letter country abbreviation (i.e. us, ca, mx, fr) zipcode: US locations only; optional, used only for US locations cwa: US locations only; county warning area code (i.e. lzk, ffc) tz: numerical offset from Greenwich Mean Time (GMT) tzname: 3-letter abbreviation of the timezone (i.e. EST, CST, PST) lat: not required; latitude of location (north latitude values are positive, i.e. 36.45722; south latitude values are negative, i.e. -45.9643) lon: not required; longitude of location (west longitude values are negative, i.e. -91.87306; east longitude values are positive, i.e. 144.7851) elevation: not required; elevation above sea level for the location (optional, i.e. 750) radar_icao: 4-letter ICAO of the local NEXRAD radar to use (i.e. ksgf, klot, kpah) icao: 1 or 2 nearest icaos (weather reporting stations, i.e. KNYC, KLGA) wxzone: weather zone to use for the location (i.e. gaz021, nyz061)
Note: Not all values are required for all locations, especially latitude, longitude and elevation. For values that are only available for US locations (fips, zipcode and cwa), these values should be left blank if adding an international location outside of the US. It is also highly recommended that you backup your current database before making any additions or modifications.
SQL Database Begin by running the following SQL query, replacing the text values in blue with your location-specific data:
INSERT INTO places (name, state, fips, country, cwa, tz, tzname, lat, lon, elevation, radar_icao) VALUES (name, state, fips, country, cwa, tz, tzname, lat, lon, elevation, radar_icao);
The following is an example of the above query for Sturkie, AR: INSERT INTO places (name, state, fips, country, cwa, tz, tzname, lat, lon, elevation, radar_icao)VALUES ('sturkie', 'ar', '05049', 'us', 'lzk', '-6', 'cst', '36.45722', '-91.87306', '750', 'ksgf');
Once you run this query, a unique 'places_id' value will be assigned to the new location. You will need to retrive this ID value for use setting the alternate ICAO and weather zone values for the location. You can query the database again to get this numerical value, where 'name' and 'state' are the values you just used in the above INSERT query:
SELECT places_id FROM places WHERE name='name' AND state='state';
Now you will need to assign which ICAOs (for current conditions) and weather zone (for forecasts and advisories) to use for your new location. Refer to the following two queries to insert these values, replacing place_id with the returned numerical value from the above SELECT query. It is recommended to have two entries for your location in the alt_cc_info table, using the precedence value (1 for primary, 2 for secondary) to set which ICAO to use as the location's primary one and which is used as a backup in case data is not available for the primary ICAO.
The code value ranges from 0-5 and is determined based on the following criteria:
0 - US/Canada; entry is a place name, which is outputted 1 - US/Canada; entry is a place name and the entry value is output (often used for a nearby location) 2 - US; entry is a weather zone number and the place name is outputted 3 - US; entry is a weather zone number and the weather zone is outputted (often used for a nearby location) 4 - International; entry is an ICAO used for a TAF zone forecast and the place name is outputted 5 - International: entry is an ICAO used for a TAF zone forecast and the ICAO Location name is outputted (often used for a nearby location)
The following is an example for Atlanta, GA: INSERT INTO alt_cc_info (places_id, icao, code, precedence) VALUES (5391, 'KPDK', 3, 1); INSERT INTO alt_cc_info (places_id, icao, code, precedence) VALUES (5391, 'KLZU', 3, 2); INSERT INTO alt_zone_info (places_id, wxzone, code, precedence) VALUES (5391, 5391, 'gaz045', 2, 1);
Now you will need to add the zipcode for the location if it does not already exist in the database. The query to insert this information is as follows:
An example entry for adding a zipcode would be similar to: INSERT INTO zipcodes (zipcode, place, state, country) VALUES (3117, '08512', 'cranbury', 'nj', 'us');
Flatfile Database For the flatfile database, you will need to access the files located in your /hwdbs/ directory. To add a new place, find the text file (/hwdbs/us/altplaces for US locations; /hwdbs/ca/altplaces for Canadian locations) corresponding to your location's state/province. For example, to add a new location in Georgia, the file to open will be /hwdbs/us/altplaces/us-ga-altplaces.txt. Within this file at the bottom you will need to add a new row in the following format:
In the above line, ZoneEntry determines what zone data is used and how it is displayed for the zone forecast and is in the format item:code, where item is either a place name, weather zone or ICAO and code defines what the item is for HW and how it should be used. The following is an example of a ZoneEntry value for Woodstock, GA:
GAZ021:2 ('GAZ021' is the weather zone and '2' tells HW that GAZ021 is a weather zone and to output the requested place)
The CurrentConditionEntry is used to determine what current condition data to use and how it should be displayed within HW. The value is also in the format item:code, where item is either a place name, weather zone or ICAO and the code is used to define how the item is applied within HW. The following is an example of the CurrentConditionEntry for Atlanta, GA:
KPDK:3%KLZU:3
In the above example, there are two ICAOs (KPDK and KLZU) assigned to the location, separated by a percent sign (%). The order sets each ICAO's precedence and in this example KPDK is the primary ICAO whereas KLZU is the secondary ICAO and will be used if the primary ICAO fails when requesting data. Typically the order of precedence is related to the ICAO's proximity to the location, the closer ICAOs having higher precedence over farther ones. Not all locations need to have multiple ICAOs. The '3' following the ICAO values tells HW that the item is an ICAO code for a METAR ovservation and to output the ICAO name to the page.
If adding a US location, you will also need to add the location's zipcode to the database if it does not already exist. To do so, open the proper zipcode file from your /hwdbs/us/zipcode directory according to the first two numbers of your zipcode. For example, if adding the zipcode for Woodstock, GA, which is 30188 and 30189, you would open us-30.txt and add the following lines:
30188,woodstock,ga,us 30189,woodstock,ga,us
The lines should follow the format: zipcode,name,state,country. This will allow searching by zipcode for your new location in conjunction with searching by place name.
How can I modify/add a location's ICAO information in the HW database?
The HW places database controls which ICAO is used for a location's current conditions, which is typically the one or two nearest reporting stations. If you would like to modify the existing ICAOs for a location or add a secondary ICAO to a location, you will need to edit your database using the methods below for either the FLATFILE and SQL database. SQL Database First you will need to retrieve the place_id for the location you are updating/modifying. The following SQL query will return the appropriate value, replacing name and stateabbrev with your location's information:
SELECT places_id FROM places WHERE name='name' AND state='stateabbrev';
Once you have this value, you will use it to update the alt_cc_info rows for that places_id using the following SQL query to update an existing entry:
UPDATE alt_cc_info SET icao='loc_icao', code=type_code, precedence=num WHERE places_id='places_id';
...where loc_icao is the ICAO you want to assign for the location, type_code is a number from 0-3 based on the guidelines explained below, and num is the precedence of this ICAO (typically either 1 or 2).
Flatfile Database Open the state's altplace file located within the /hwdbs/us/altplaces/ directory (i.e. for updating Blacksburg, VA, we would need us-va-altplaces.txt). To update an existing location's ICAO information, find the row for your location name. For Blacksburg, the row would look like:
The location's alternate ICAO settings are the third value in the row, which are separated by the pipe (|) character. In the row above for Blacksburg, this value is currently empty. If we wanted to add KCBC as an ICAO for Blacksburg, we would modify the row to now look like:
The format for the entry is loc_icao:code. Review the code guidelines described below to determine which code to use for the entry, which ranges from 0 to 3. KCBC will be the primary ICAO for Blacksburg since it is the only value in the alt_cc position in the row. If we wanted to add a secondary ICAO to use in case data retrieval for the primary ICAO of KCBC failed, we would add the same value separate by a percent sign (%):
Now if the primary ICAO of KCBC fails when fetching the current conditions data, it will try the secondary nearby ICAO of KROA (Roanoke, VA) and use that data if found. ICAO Code Guidelines 0 - US locations only; the loc_icao is a place name in the hourly IWIN hourly file and the place/city name is output to the page. 1 - US locations only; the loc_icao is a place name in the hourly IWIN hourly file and the loc_icao value is output to the page (typically for nearby locations).
The IWIN hourly file for Georgia can be found at http://iwin.nws.noaa.gov/iwin/ga/hourly.html. Change the 'ga' in the URL to your state's two-letter abbreviation for your location's state. When you use this method, note the following:
The place name that you use for the loc_icao value must be the exact spelling that is used in the hourly file for your state.
The IWIN hourly files are not always reliable. At times they can go several hours without updating and/or a location that is normally updated may be missing at other times.
The following is an example of methods 0 or 1: UPDATE alt_cc_info SET icao='roanoke', code=0, precedence=1 WHERE places_id='places_id';
2 - US and International locations; the loc_icao is an ICAO station ID for a METAR observation and the place/city name is output to the page. 3 - US and International locations; the loc_icao is an ICAO station ID for a METAR observation and the ICAO name is output to the page (typically for nearby locations).
METAR observations are normally produced by ICAO reporting stations located at airports, military bases and other various civil locations. These reports are available for locations worldwide that have active ICAO stations and report their METAR reports to the global weather community. As a result, HW can provide current condition information for major cities around the world as well as many US locations.
The following is an example of methods 2 or 3 for Blacksburg, VA using the KBCB ICAO station located at the Virginia Tech Airport : UPDATE alt_cc_info SET icao='KBCB', code=2, precedence=1 WHERE places_id='places_id';
ICAO name is output to the page (typically for nearby locations).METAR observations are normally produced by ICAO reporting stations located at airports, military bases and other various civil locations. These reports are available for locations worldwide that have active ICAO stations and report their METAR reports to the global weather community. As a result, HW can provide current condition information for major cities around the world as well as many US locations.The following is an example of methods 2 or 3 for Blacksburg, VA using the KBCB ICAO station located at the Virginia Tech Airport :UPDATE alt_cc_info SET icao='KBCB', code=2, precedence=1 WHERE places_id='';
HAMweather MKPortal Intergration
First things first, Both HAMweather and MK Portal must be installed and functioning properly HAMweather can reside in its own directory, it is recommended that it is.
Now you must decide how you want to have your HamWeather installation is called via the MK Portal. In this example I will be showing you how to set it up so the URL,
will display the HAMweather generated forecast 'inside' the MK Portal System. ----------------------------------------------------------------------------------------- Step-1. Create an empty directory called 'weather' in your 'mkportal/modules' directory
Step-2. Now copy and paste the following code,
<?php
if (!defined("IN_MKP")) { die ("Sorry !! You cannot access this file directly."); }
//$_SERVER['QUERY_STRING'] if (preg_match('/ind=weather\&(.*)/s', $_SERVER['QUERY_STRING'], $m)) { $data =$m[1];} if (preg_match ('/(.*\&pands=)(.*)\&/s', $data, $m)){ $wxurl = "http://www.yoursite.com/pathto/hw3.cgi?".$m[1].urlencode("$m[2]");}
Short and simple article on how to import the HW MySQL Database using BigDump. This is the recommended procedure to import your HW MySql Database.
Obtain a copy of BigDump at http://www.ozerov.de/bigdump.php Now create a MySql username, password and database name in either your sites control panel, or phpMyAdmin.
Unzip and extract the bigdump.php file to a location on your computer, you will need to edit a few lines of code. Open the bigdump.php file and look for the following lines of code (40-51)
$csv_insert_table = ''; // Destination table for CSV files $ajax = true; // AJAX mode: import will be done without refreshing the website $filename = ''; // Specify the dump filename to suppress the file selection dialog $linespersession = 3000; // Lines to be executed per one import session $delaypersession = 0;
fill in the values for $db_name, $db_username, $db_password, and $filename . $filename will be the name of the HW MySql DB. hw3mysql.sql
That is all you should need to edit, this new version of bigdump will determine your php version and adjust accordingly.
FTP the hw3mysql.sql, and bigdump.php to the same directory. Run the bigdump.php in your browser http://www.yoursite.com/bigdump.php
If you entered all the information correctly, the screen on startup should look like this
If you should have problems with this new version, as it does use AJAX, find the line $ajax = true; and change to $ajax = false; but most if not all php installs will have AJAX enabled.
Questions, problems, please post on the HamWeather Forums.
HWContours Service
Frequesntly Asked Questions for the HWContours Service
There are no articles in this category.
HWContours Pre-Sales Questions
Pre-sales questions associated with the HWContours Service
What is the difference between HWContour Images and HWContour XML?
The HWContour service is offered with several options so you can easily find the option that fits your needs.
HWContours Images is the simplest service to set up and start using. With this service, you will be provided a simple Fetch Image script which you will use to access the pre-generated images. You also gain access to the Image Brander web interface to allow you to easily brand the contour images. You can see a demo of the various images and options available here.
HWContour XML is a more advanced service and required that HAMweather 3 and HW3image be installed. With this servive you gain the ability to create completely custom contour maps, giving you the ability to set your web site apart the others.
Are there any special requirements?
For the HWContours Image service the only requirement is that you can run a small Image Fetch scirpt. The Image fetch script is available in php, perl and asp.
The HWContours XML service requires that you have HAMweather 3 (perl or php) and the HW3image Plugin installed and workign correctly on the server.
Can I brand the Contours for use on my site?
Yes! This is what makes the HWContour Service stand out! With the HWContours Image option you can brand your images using a simple to use web based interface. For HWContour XML users you have full control over the branding, background map, contour colors and more.
What is the HWContours Service?
The HWContour Service is the first high quality web contouring service that offers the capability to display custom branded contour images on your website. With service options from using branded pre made images to creating comepletely custom contour imagery using HWContour XML and HAMweather.
Is there a price difference between registered and non registered HAMweather users?
Currently there is not a price difference for registered HAMweather users vs non registered.
HAMweather has chosen to offer the combination of high amounts of customization and branding oppurtunities with the ability to obtain just the data you need at a low price.
I own several domains, can I use the contours on all of my domains?
The HWContours service is licensed per single domain. A single domain is defined as either a single Top Level Domain (TLD) or any single 3rd level subdomain of a TLD. For example. www.mydomain.com, www.mydomain.net, mysite.mydomain.com and yoursite.mydomain.com are examples of four single domains, each requiring a separate suibscription.
If you have multiple domains that you would like to display the HWContours on, you would need to obtain a subscription for each domain. If you would like to add the contours to 3 or more domains contact HAMweather for volume pricing.
HWContours Usage and Customization
Frequesntly Asked Questions on the usage and customization of the HWContours Service
There are no articles in this category.
HWContour Image Questions
There are no articles in this category.
HWContours XML Questions
What is the HWContours Service?
The HWContour Service is the first high quality web contouring service that offers the capability to display custom branded contour images on your website. With service options from using branded pre made images to creating comepletely custom contour imagery using HWContour XML and HAMweather.
HW3 Plugins
There are no articles in this category.
HW3 Plugin API
Questions concerning the plugin API
How can I force my maps to be generated using the command line and not through a web browser?
If you would like to disallow image generation via a web browser, which prevents users from creating maps using URL query strings, then you would need to turn on your no_web_access setting in your main fc_contour.ini (fc_contour.ini.php for PHP) by uncommenting the line:
#no_web_access=1
Note that by making this change, you will need to have a cron task setup to generate the images for you via your server's command line as you will not be able to generate them from your browser. To disable this security feature, set the value to 0 or comment out the line again.
HW3Image
How do I setup a map metadata file for my custom map?
When using a custom map to use within HW you will need to create a metadata text file defining the map's image and projection properties for HW to use.
HAMweather supports the following projection types: Grid, Mercator, Albers, Lambert and Orthographic. More detailed information regarding the difference between map projections can be found at http://en.wikipedia.org/wiki/Map_projection
GRID/MERCATOR
Technically, grid and mercator maps are not projected as they do not incorporate the curvature of the Earth into the conversion of latitude and longitude to the x/y coordinate system of an image. The following is an example of the required metadata file for a GRID and/or MERCATOR map:
projection=GRID
lon1=-178.692924
lat1=71.706227
lon2=-129.84672
lat2=50.50321
width=494
height=215
END PROJECTION
projection: GRID or MERCATOR
lat1/lon1: latitude/longitude for the top left of the image
lat2/lon2: latitude/longitude for the bottom right of the image
width/height: width & height of the image in pixels
ALBERS
The Albers equal-area conic projection is the one most widely used for representing the United States due to minimal distortion. There is little distortion along the central parallel and none on the standard ones. The standard parallels may lie on different hemispheres, but if equidistant from the Equator, the projection degenerates into an equal-area cylindrical. The following is an example of the required metadata file for an ALBERS map:
a: radius of the earth (constant)
tm: meters from the rlat/cm to the top of the image
bm: meters from the rlat/cm to the bottom of the image
lm: meters from the rlat/cm to the left side of the image
rm: meters from the rlat/cm to the right side of the image
cm: central meridian
rlat: reference latitude
sp1: standard parallel 1
sp2: standard parallel 2
width/height: width & height of the image in pixels
Note: HW3 supports either "projection=ALBERS" or "projection=ALBERS2" in the metadata file. ALBERS2 was a rewrite of the projection code that sped up and fixed some bugs in the original ALBERS. The new name was given because of potential issues with older maps based on the original ALBERS code.
LAMBERT
Like in all conformal projections, scale distortion is greatly exaggerated in the borders of a worldwide map, although less than in Mercator. Meridians converge at the pole nearest the standard parallels; the opposite pole lies at infinity and can not be shown. Scale distortion is constant along each parallel. The following is an example of the required metadata file for an LAMBERT map:
a: radius of the earth (constant)
tm: meters from the rlat/cm to the top of the image
bm: meters from the rlat/cm to the bottom of the image
lm: meters from the rlat/cm to the left side of the image
rm: meters from the rlat/cm to the right side of the image
cm: central meridian
rlat: reference latitude
sp1: standard parallel 1
sp2: standard parallel 2
width/height: width & height of the image in pixels
ORTHOGRAPHIC
The orthographic projection is mainly used for (sometimes dramatic) illustration purposes since it clearly shows the Earth as seen from space infinitely far away, thus closely matching ones's view of a globe. Severe shape and area distortion near the map borders prevents its general use for world maps. The following is an example of the required metadata file for an ORTHOGRAPHIC map:
a: radius of the earth (constant)
tm: meters from the rlat/cm to the top of the image
bm: meters from the rlat/cm to the bottom of the image
lm: meters from the rlat/cm to the left side of the image
rm: meters from the rlat/cm to the right side of the image
rlat: reference latitude
rlon: reference longitude
width/height: width & height of the image in pixels
Note: Support for the orthographic projection is limited in that it cannot handle points that exist on the opposite side of the world from the projected view. If this does or may occur, the plugin that uses the projection will have to properly handle this or other strange errors that may occur. As long as all the points that are plotted onto the map using orthographic projection exist within the map's view/defined boundaries, there will not be an issue.
Overall usage note: Because HW is run via a web server as a script, the Albers, Lambert & Orthographic projections use formulas that decrease the amount of server resources used. As a result, this method may not be as accurate in plotting as professional mapping applications, such as ESRI's ArcView, but for the general usage within HW they should be more than sufficient.
How do I install the GD.pm module on a Windows server?
If you currently do not have the required GD.pm module installed on your server, which is required for all image generation within HAMweather, you will need to contact your host to request it to be installed. If not on a shared hosting account you can install it by running the following commands at the command line:
How to use a background image for your Forecast Graphics ..
The question had come up several times on the support forums, "How do I use a background image for my HWImage created weather graphics?"
In this short knowledge base article we will take each part of the new hwibgzone template apart... These Image template commands are interchangeable between HWimage for Php or Perl.
Please note: HWimage for PHP will not use gif's for background's it must be either png or jpg/jpeg
The first part of the template sets the height and width of the background image ...
%%hwi=hwi_header%%
<!-- Create the image --> NEWIMAGE zone 500 300 BACKGROUND FFFFFF
LOADIMAGE "bg" "%%CFG: Paths:html_side%%/images/cloudy_5day1.png" "png" TRUECOLOR 1 <!-- if we have a ttf font lets set it --> %%IF ('%%hwv_ttf_font%%' && '%%hwvusettf%%' ne '0') THEN TTFTEXTFONT "%%hwv_ttf_font%%" IF%%
You will notice the TRUECOLOR 1 line, that is because we need the full 16.7 million color palette loaded as the background image is in 16.7mil and not 256, if that line is not included your background and weather icons will "bleed" and look faded.
Next section sets the spacing between the day forecast area's.
The first LET line sets the maximum days that HW has found in the Forecast text The second LET sets us for the max of 5 days, the way HW counts the Days 0 is day 1 in the %%hwcounter%% routine's The third LET line sets the spacing from the left edge of the image to the center of the first forecast area the spacing between each area after that will be controlled in the %%REPEAT lines of each item.
Here is the line placing the day names, The converted variables will read like this for the first day TEXTAT {0*89 + 70} well we know 0*89 is 0, so the horizontal pixel from the left edge is 70, the second day will then be 1*89+70 = 159 pixels from the left edge The 88 is the vertical pixel count from the top of the image SPACEWRAPCENTER tell HW that if the day name is longer then 74 pixels to break the name up and form a new line that way the name will not run over to the next area That is set by the TEXTWRAP command We use the bottom of the text as our placement
This should give you an idea how to correctly use an image for your forecast graphics, and how to get the spacing needed to properly space your text.
as always question's should be referred to the HW Support Forums Specifically the HWimage forum
HW3Tropical
Answers to common questions and techniques with using the HW3Tropical Plugin.