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

Replace [4]float return value from Extenter.Extent() w/ Extent struct. #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JivanAmara
Copy link
Contributor

No description provided.

@JivanAmara JivanAmara requested review from gdey and ARolek May 22, 2018 01:10
@coveralls
Copy link

coveralls commented May 22, 2018

Pull Request Test Coverage Report for Build 52

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-2.3%) to 77.503%

Files with Coverage Reduction New Missed Lines %
bbox.go 3 94.47%
Totals Coverage Status
Change from base Build 50: -2.3%
Covered Lines: 2353
Relevant Lines: 3036

💛 - Coveralls

@gdey
Copy link
Member

gdey commented May 29, 2018

What is the reasoning behind this change?

@gdey
Copy link
Member

gdey commented May 29, 2018

@ARolek let me know that we discussed it and decided this is the direction we should move. Found the discussion, but you guys did not specify the reasoning:

jivan [4:31 PM]
I think we should standardize the extent parameter type. Any preference for explicit [4]float64 vs geom.Extent?
Or just use the Extenter interface for parameters?

arolek [4:50 PM]
geom.Extent

I'm fine with the direction; the reason I had it as [4]float64 was to make it easier for other to implement the Extender interface. I can see the reasoning for geom.Extent as well though, and since they are aliases it should not be a big deal to go back and forth. So, my reasoning was that if you need the extra methods you could do:

    ext := geom.Extent(obj.Extent())

That would still allow other to implement Extent without knowing about geom.
There is a wart in the above, which is to pass ext as an Extenter you would have to pass &ext as the geom.

@ARolek
Copy link
Member

ARolek commented May 29, 2018

Sorry, @JivanAmara this was a misdirection on my part. We should standardize around [4]float64.

@JivanAmara
Copy link
Contributor Author

@gdey, @ARolek
So Extent() & BufferedExtent() should return [4]float64?
https://github.com/go-spatial/tegola/blob/v0.7.0/provider/provider.go#L16

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.

None yet

4 participants