Skip to content

Time Series #2288

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

Merged
merged 11 commits into from
Jul 27, 2017
Merged

Time Series #2288

merged 11 commits into from
Jul 27, 2017

Conversation

jamesmcclain
Copy link
Member

@jamesmcclain jamesmcclain commented Jul 19, 2017

screenshot from 2017-07-20 17 09 38

  • Unit Tests

Fixes #2287

@jamesmcclain jamesmcclain force-pushed the feature/timeseries branch 2 times, most recently from d04357d to f0368f7 Compare July 19, 2017 22:57
@jamesmcclain
Copy link
Member Author

@CloudNiner and @fungjj92 asked to be tagged on this pull request. See also locationtech-labs/geopyspark#377.

@jamesmcclain jamesmcclain force-pushed the feature/timeseries branch 3 times, most recently from a820c88 to 9036015 Compare July 20, 2017 20:13
@jamesmcclain jamesmcclain changed the title [WIP] Time Series Time Series Jul 21, 2017
sumSeries(List(polygon), Options.DEFAULT)

def sumSeries(
polygons: Traversable[Geometry],
Copy link
Member

Choose a reason for hiding this comment

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

Having this be Geometries makes the code less typesafe. If we pass in other geometries, we get a match error that is potentially not very descriptive. We should change this to only accept a Polygon or MultiPolygon, both versions (the user can create the MultiPolygon themselves if needed).

@jamesmcclain
Copy link
Member Author

Okay, I have modified it.

meanSeries(polygon, Options.DEFAULT)

def meanSeries(
polygons: Traversable[MultiPolygon]
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I should have been more clear. The overloads that should exist are Polygon and MultiPolygon, not MultiPolygon and Traversable[MultiPolygon].

If a user has a single polygon, which seems like a pretty regular case, then they can call the method with just the polygon.

If a user has a multipolygon, same thing.

If the user has a sequence of polygons or sequence of multipolygons, then they can wrap/union them into a multipolygon before calling this method.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, there are only methods for Polygon and MultiPolygon.

@echeipesh
Copy link
Contributor

My only question here is about the interface, should this be returning Map or RDD, .collect.toMap could be the client calls and returning an RDD[ZonedDateTime, V] would be the first case of its usage. Hard to say right now, this does what it needs to do at the moment.

I think the method extensions need to be @Experimental so we have the freedom to change them as we use them more but otherwise it looks good.

@echeipesh echeipesh merged commit 8220302 into locationtech:master Jul 27, 2017
@jamesmcclain jamesmcclain deleted the feature/timeseries branch July 27, 2017 20:10
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