Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add non us specific 'meter' spelling support for buffer unit. #21

Merged
merged 1 commit into from
Apr 2, 2015

Conversation

mdwragg
Copy link

@mdwragg mdwragg commented Mar 27, 2015

Added ability to specify buffer units in US and non-US spelling of 'meter' (i.e. 'metre').

@morganherlocker
Copy link
Member

Is this common in other packages? The spelling is clearly stated in the docs. I'm not totally opposed, but I'm wary that this may be a slippery slope for supporting multiple dialects all over the place.

@mdwragg
Copy link
Author

mdwragg commented Apr 2, 2015

I couldn't say for sure if it is common or not in other packages. Though, the SI unit states the spelling is 'metre'. And the only country on this fair planet that uses the spelling 'meter' is the United States.

When I worked for Smallworld (GIS) we would certainly accept both forms, though that software was predominantly written in the UK.

http://grammarist.com/spelling/meter-metre/

"The metre or meter (American spelling), (SI unit symbol: m), is the fundamental unit of length (SI dimension symbol: L) in the International System of Units (SI), which is maintained by the BIPM."

Your call I guess - it certainly caused me to slip up (I'm British, living in the US, so used to knocking into words spelt differently...). Depends on how kind/slick you want the developer experience to be.

Others seem to get around such issues by taking just the unit symbol 'm' (OpenLayers, for instance).

morganherlocker pushed a commit that referenced this pull request Apr 2, 2015
add non us specific 'meter' spelling support for buffer unit.
@morganherlocker morganherlocker merged commit 903332e into Turfjs:master Apr 2, 2015
@morganherlocker
Copy link
Member

ok, i'm sold :)

@tcql
Copy link
Member

tcql commented Apr 2, 2015

@morganherlocker we would also want to update grids and the like to accept kilometres, no?

@morganherlocker
Copy link
Member

Ideally, we would have a units enum in the turf typedefs https://github.com/Turfjs/turf-www/blob/master/typedefs/geojson.js that would provide a set of available options. I believe the grids all derive their units from turf-distance and turf-destination, so only those two would need to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants