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

Support other projections #1

Open
chelm opened this issue Mar 20, 2015 · 4 comments
Open

Support other projections #1

chelm opened this issue Mar 20, 2015 · 4 comments

Comments

@chelm
Copy link

chelm commented Mar 20, 2015

It would be nice to be able to pass in projection/EPSG code instead of assuming 4326. I can make a PR to add but the question would be on what pattern would you want to follow

bbox2extent(bbox, projCode, callback)

or

bbox2extent(bbox, options, callback)

The 2nd would support potential future optional values

@ungoldman
Copy link
Contributor

3rd option:

bbox2extent(bbox || options, callback)

First param could be bbox array or options object w/ bbox key/value inside, e.g.

bbox2extent({
  bbox: [0, 0, 0, 0],
  crs: {} // crs object http://geojson.org/geojson-spec.html#coordinate-reference-system-objects
}, callback)

...but yeah that's just down to how we would want to implement it. I agree it would be nice to support more projections.

@ungoldman
Copy link
Contributor

http://proj4js.org/ would probably do the trick

@chelm
Copy link
Author

chelm commented Mar 21, 2015

yes proj4 would be the thing for sure to use. At the very least we could add the ability to specify an srid code {srid: 102100}. This would assume the data being passed in would be in some other known proj though. Not a big deal right now.

@chelm chelm closed this as completed Mar 21, 2015
@chelm chelm reopened this Mar 21, 2015
@ungoldman
Copy link
Contributor

@chelm do you know much about the difference between specifying CRS and SRID? I don't fully understand the differences and implications.

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

No branches or pull requests

2 participants