ariesteam / aries

http://www.ariesonline.org
GNU General Public License v3.0
6 stars 1 forks source link

Enable "ac" as a legal unit in thinklab #40

Closed kbagstad closed 12 years ago

kbagstad commented 12 years ago

I have a layer that's a count in units per acre, but according to ucheck and some errors being thrown, this is not a kosher unit in thinklab. Can you add?

kbagstad commented 12 years ago

@fvilla

kbagstad commented 12 years ago

Also I thought we've talked for awhile about adding $ as a unit of measure in thinklab. Not sure what problems that brings about in terms of currency conversion and adjustments for inflation, but there you go.

fvilla commented 12 years ago

man, I haven't written all that stuff - If I had written unit support and everything myself, I'd start thinking about ARIES in about 2020. The unit library (JSR275) is fairly serious stuff, and you can't easily add units; I don't know why it doesn't have acres given that it has yards etc, and adding it may be possible, but it requires me to go in and study thousands of lines of someone else's code just to see if it can be done - ideal for the Chinese student I don't have.

The $ thing is obviously not a measurement or a unit, given that the value isn't stable, so it can't be done by "adding units". Thinklab had a whole currency plugin for years, that would enable another model verb like (value Concept "USD@2002" ...) and automatic CPI mediation of values across currencies and years,,, but the data for that conversion are doubtful and partial, so it's far from trivial. You can try 'pload currency' then something like ' cconvert 10 USD 2002 EUR 2005". The problem is that this stuff is very approximated, prone to error and enabling it probably creates more problems than it solves. But if you think we need to have that kind of stuff as opposed to a value ranking that happens to be in dollars, I can give it another thought.

fvilla commented 12 years ago

if you need a quick fix for the layer in order to use it, you can just add a conversion in the XML that divides the value by 4046.85642 and set the unit to /m^2....

kbagstad commented 12 years ago

OK, good to know - for some reason I thought I'd heard somewhere along the way that this kind of thing was an easy process, like adding in new projections. Anyhow, I'll do the conversion in the .xml into either square meters or hectares as you suggest, and the currency thing isn't in the least bit urgent - it's just something we've had flagged for awhile.

Ken

On Wed, Feb 15, 2012 at 12:32 PM, Ferdinando Villa reply@reply.github.com wrote:

if you need a quick fix for the layer in order to use it, you can just add a conversion in the XML that divides the value by 4046.85642 and set the unit to /m^2....


Reply to this email directly or view it on GitHub: https://github.com/ariesteam/aries/issues/40#issuecomment-3987215