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

get_point_values result incorrect for SPACETIME layer #619

Closed
jdries opened this issue Jan 18, 2018 · 5 comments · Fixed by #620
Closed

get_point_values result incorrect for SPACETIME layer #619

jdries opened this issue Jan 18, 2018 · 5 comments · Fixed by #620

Comments

@jdries
Copy link

jdries commented Jan 18, 2018

I use the get_point_values method on a TiledRasterLayer of type SPACETIME. The layer has tiles at multiple time instants, so I'm in this case:

If ``points`` is a ``list`` and the ``layer_type`` is ``SPACETIME``: [(shapely.geometry.Point, datetime.datetime, [float])]

In my result, I never get tuples for only one date. I think the error is in:
geopyspark.geotrellis.TemporalTiledRasterLayer._getPointValues
as there a toMap method is used to return a Map[Long, (Long, Array[Double])] .

I also had a look at the unit test, and it only seems to test cases where there is only one time instant in the source data.

@jbouffard
Copy link
Collaborator

@jdries Thank you for bringing this to our attention! You're correct, the toMap is the source of the error and I'm in the process of fixing it now.

jbouffard pushed a commit to jbouffard/geopyspark that referenced this issue Jan 19, 2018
…values be returned from spacetime layers

Cleaned up code slightly by passing the times back as strings

Updated the documentation to reflect the changes in return type for get_point_values
@jbouffard
Copy link
Collaborator

@jdries There's now a PR up that fixes this issue: #620 It will most likely be merged sometime early next week.

jbouffard pushed a commit to jbouffard/geopyspark that referenced this issue Jan 19, 2018
…values be returned from spacetime layers

Cleaned up code slightly by passing the times back as strings

Updated the documentation to reflect the changes in return type for get_point_values

Put datetime back in layer.py for now
jbouffard pushed a commit to jbouffard/geopyspark that referenced this issue Jan 19, 2018
…values be returned from spacetime layers

Cleaned up code slightly by passing the times back as strings

Updated the documentation to reflect the changes in return type for get_point_values

Put datetime back in layer.py for now

Fixed import order
@jdries
Copy link
Author

jdries commented Jan 20, 2018 via email

@rossbernet
Copy link
Contributor

@jdries This looks like a really exciting project. Great you are using GeoPySpark. We are definitely happy to help.

There will be three people that work on GeoTrellis / GeoPySpark in Bonn in March for the OS Code Sprint. Will you or anyone from your team be attending? It could be a great opportunity to discuss in person.

@jbouffard
Copy link
Collaborator

@jdries You're welcome! That's a cool project! Please let us know if you have any questions/need help with GPS on our gitter channel.

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