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

[WIP] Implementing Geography types #58

Closed
wants to merge 19 commits into from
Closed

[WIP] Implementing Geography types #58

wants to merge 19 commits into from

Conversation

thekaveman
Copy link
Contributor

@thekaveman thekaveman commented Jul 25, 2016

PR to track work in progress

This will close #38

double arrayIndexOne = (double)arrayValues[0];
double arrayIndexTwo = (double)arrayValues[1];

positions.PositionsArray = new double[] { arrayIndexOne, arrayIndexTwo };
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should prefer to use the Positions constructors whenever possible (rather than assign directly to PositionsArray), since we may be implementing logic to e.g. restrict the number of input elements in the array, etc.

In fact we may just want to make PositionsArray { get; private set; } to enforce that.

{
return new Positions(arrayValues);
}
throw new Exception("Value should be 2 or 3");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to make this decision (with the array length, throwing exceptions, etc.) inside the Positions class, to keep the logic all in one place - since we'll want to make the same decision whether we are reading JSON or just using the Positions class directly.

@thekaveman
Copy link
Contributor Author

Closing this old PR, not being worked on.

@thekaveman thekaveman closed this Sep 27, 2023
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.

Support for new SODA geographic data types
2 participants