Could you please add units for area? Here's a list of units that would be useful to us, and conversion factors:

Metric:
square metre (sq m): 10.76391042 sq ft
are (plural: ares, equal to 1 sq decametre): 100 sq m
hectare: 10,000 sq m
square kilometre (sq km): 1,000,000 sq m

Standard / Imperial:
square feet (sq ft): 0.09290304 sq m
square yards (sq yd): 9 sq ft
Aankadam (Indian measure): 72 sq ft
perch (1 square rod): 272.25 sq ft
cent (1/100th of an acre): 435.6 sq ft
Chatak: 450 sq ft
Kottah (Indian measure, also spelled Katha or Cottah): 720 sq ft
Guntha (Indian measure equal to 1/40th of an acre or 4 square rods): 1,089 sq ft
Ground (Indian measure): 2,400 sq ft
Marla (Indian / Pakistani measure): 5,400 sq ft
rood (1/4 of an acre = 40 perch): 10,890 sq ft
Bigha I (Indian measure: 0.4 acres): 17,424 sq ft
Bigha II (Indian measure: 0.625 acres): 27,225 sq ft
acre: 43,560 sq ft
Kanal (Indian / Pakistani measure equal to 20 Marlas): 108,000 sq ft
Biswa I (Indian measure: 8 acres or 20 Bigha I): 348,480 sq ft
Biswa II (Indian measure: 12.5 acres or 20 Bigha II): 544,500 sq ft
square mile (640 acres): 27,878,400 sq ft

CommentFileSizeAuthor
#3 measures of area.xls24.5 KBailgm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ailgm’s picture

Version: 6.x-1.0-alpha1 » 6.x-1.x-dev

I've just seen (after installing the dev release) that some of these units are already included (acre, hectare, square foot, square inch - I hadn't gone small than feet, square yard, square mile ) -- they weren't shown in the notes for the dev release.

So, my request is now just to add the remaining measures. Thanks.

raspberryman’s picture

Status: Active » Postponed (maintainer needs more info)

Heya ailgm,

I added ares, m2, and km2.

For the rest, I'll need some crowdsourcing :P Here is the info I need for each:

  1. Unit name (singular)
  2. Unit name (plural)
  3. Unit symbol
  4. Conversion factor based on square meters. All area conversions need to have factors to square meters. It's this common factor that makes conversions easy in the code. If we use all sorts of various conversion factors, I'd have to code exceptions, which I like to avoid at all cost.
  5. An URL to a credible source that shows the conversion factor. Wikipedia would be fine.
  6. An example test, such as "55 rood to acre = x acres".

Alternatively, you can add your own units to the module by using the hook_unitsapi_alter() function. More documentation on this is available on the main page for this module.

ailgm’s picture

Status: Postponed (maintainer needs more info) » Active
FileSize
24.5 KB

I've attached the information requested. I do not have any unit symbols for the remaining measures, as I haven't seen any in use, so perhaps the unit's plural name is the best to use (I'll leave that decision to you).

The conversion rates I've provided generally have 10 digits of precision, so should be pretty accurate.

Nevertheless, since all of these are defined in the standard system of measurement, a conversion between any two of them that uses those approximations to go to and from sq metres will introduce a small level of inaccuracy. Someday, you might consider doing this a slightly different way, with each unit of measure identified as to which system of measurement it is in (i.e. metric or standard/imperial) and having a conversion rate to that system's base unit (i.e. metres or inches) plus a single conversion rate between those base units (for cross-system conversions), so that conversions between units in the same system of measurement remain exact rather than using two approximations to the metric base unit.

Thank you for your work on this module, and prompt reply to this feature request.

ailgm’s picture

Raspberryman,

Do you think you'll be able to get to adding these units sometime soon?

raspberryman’s picture

I'll try to get them in this weekend. Sorry for taking so darn long!

raspberryman’s picture

Assigned: Unassigned » raspberryman
Status: Active » Fixed

Commit to HEAD: http://drupal.org/cvs?commit=489000

Thanks, ailgm!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.