الگو:Unit area density/توضیحات

از ویکی‌پدیا، دانشنامهٔ آزاد

This template displays area density measurement units used within various Category:Geobox templates, automatically converting between metric/imperial values. The input must be unformatted numeric values (i.e. without commas, the commas are automatically added to the output).

It can display and convert following units:

  • /m2 to /sq ft (/square metre to /square foot) and vice-versa
  • /ha to /acre (/hectare to /acre) and vice-versa
  • /km2 to /sq mi (/square kilometre to /square mile) and vice-versa

Usage[ویرایش]

The template has 3 unnamed parameters: {{Unit area| unit| value| round}}. Their meaning is as follows:

  1. unit … obligatory, unit (sqm/m, sqft/ft, ha, acre, sqkm/km, sqmi/mi) of the value parameter, it will get displayed first
  2. value … obligatory, numerical value
  3. round … mandatory, number of decimal digits (negative numbers can be used for rounded figures); if not specified 0 is assumed

Examples[ویرایش]

  • {{Unit area density|sqkm|1000}}: ۱٬۰۰۰ / کیلومترمربع (۲٬۵۹۰ / مایل‌مربع)
  • {{Unit area density|sqmi|1000}}: ۱٬۰۰۰ / مایل‌مربع (۳۸۶ / کیلومترمربع)
  • {{Unit area density|sqkm|1000|-2}}: ۱٬۰۰۰ / کیلومترمربع (۲٬۶۰۰ / مایل‌مربع)
  • {{Unit area density|sqft|1000}}: ۱٬۰۰۰ / فوت‌مربع (۱۰٬۷۶۳٫۹۱ / مترمربع)

See also[ویرایش]