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

Add TileFeature Type #1429

Merged
merged 8 commits into from May 19, 2016

Conversation

@jamesmcclain
Copy link
Member

commented Mar 28, 2016

In this pull request the TileFeature[T, D] type is added.

Points to Examine

  • The TileFeature[T <: CellGrid,D: ? => BundleMethods[D]] type takes two type parameters, but the merge methods (in both raster and spark assume that T <: Tile. There are no assumptions on D other than it being a member of the bundle type class.
  • There is a question of range and precision of the data D. Right now they are treated as integer entities. Double versions are possible as well, but since one of the supported types of D is Seq[Tile], there is a question of how (best) to handle the situation when the data are mixed integers and floats.
  • I found that I had to add these secondary conversions from subclasses of BundleMethods[D] to BundleMethods[D] in order to get the constraints on TileFeatureMergeMethods to be satisfied. The issue seems to be that the Scala compiler does not look more than one layer deep when trying to satisfy these constraints. If there is a better way to handle this, I am open to it.

Still Need To

  • Provide Bundle Methods for Seq[Tile]
  • Provide Appropriate I/O support for TileFeatures
  • Provide Merge Methods for RDDs of TileFeatures
  • Move bundle methods to their own directory
  • Write ScalaDocs
  • Integrate Tests into PersistenceSpec

@jamesmcclain jamesmcclain force-pushed the jamesmcclain:feature/ordered-tile branch from 42b1f43 to 2b3c42c Mar 29, 2016

@jamesmcclain jamesmcclain changed the title [WIP] Add Ordered*Tile Types [WIP] Mar 30, 2016

@jamesmcclain jamesmcclain force-pushed the jamesmcclain:feature/ordered-tile branch from 2b3c42c to a084067 Apr 2, 2016

@jamesmcclain jamesmcclain changed the title [WIP] [WIP] Add TileFeature Type Apr 2, 2016

@jamesmcclain jamesmcclain force-pushed the jamesmcclain:feature/ordered-tile branch 3 times, most recently from c09f39c to 00c325f Apr 4, 2016

@jamesmcclain jamesmcclain changed the title [WIP] Add TileFeature Type Add TileFeature Type Apr 5, 2016

@jamesmcclain jamesmcclain force-pushed the jamesmcclain:feature/ordered-tile branch 3 times, most recently from 0ec6d21 to 0c4c522 Apr 5, 2016

@jamesmcclain jamesmcclain force-pushed the jamesmcclain:feature/ordered-tile branch from 0c4c522 to cfc2edf Apr 14, 2016

@jamesmcclain jamesmcclain force-pushed the jamesmcclain:feature/ordered-tile branch 3 times, most recently from dd0c48b to dc7c7ee Apr 16, 2016

@jamesmcclain jamesmcclain force-pushed the jamesmcclain:feature/ordered-tile branch from 60aaec9 to c18d68c May 3, 2016

import org.apache.spark.rdd._
import org.joda.time.DateTime

trait LayerUpdateSpaceTimeTileFeatureTests

This comment has been minimized.

Copy link
@lossyrob

lossyrob May 3, 2016

Member

FunSpec, should be named Spec instead of Tests. Tests represents FunSuite tests.

This comment has been minimized.

Copy link
@jamesmcclain

jamesmcclain May 3, 2016

Author Member

I named this one after the file .../spark/io/LayerUpdateSpaceTimeTests.scala from which it was copied (same is true for .../spark/io/CoordinateSpaceTimeTileFeatureTests.scala and .../spark/io/AllOnesTestTileFeatureTests.scala). I can change the names of one or both of these sets of tests, if desired.

with SpaceTimeKeyIndexMethods
with TestEnvironment
with TestTileFeatureFiles
// with CoordinateSpaceTimeTests

This comment has been minimized.

Copy link
@lossyrob

lossyrob May 3, 2016

Member

Why commented out?

This comment has been minimized.

Copy link
@jamesmcclain

jamesmcclain May 3, 2016

Author Member

This has been un-commented. I went ahead and did the same in FileSpaceTimeSpec, as well.

val backin = reader.read[SpatialKey, Tile, TileLayerMetadata[SpatialKey]](layerId)
}

it("should fail gracefully with colon in name") {

This comment has been minimized.

Copy link
@lossyrob

lossyrob May 3, 2016

Member

Was this a fix/test that your shoehorning in? Or is this coming from another commit? Bit confused about this one.

This comment has been minimized.

Copy link
@lossyrob

lossyrob May 3, 2016

Member

Oh I see, this was copied from the non-feature tile reader. I don't think we have to test this twice, but not a huge deal.

@lossyrob

This comment has been minimized.

Copy link
Member

commented May 3, 2016

+1 after comments addressed

jamesmcclain added a commit to jamesmcclain/geotrellis that referenced this pull request May 3, 2016
@jamesmcclain

This comment has been minimized.

Copy link
Member Author

commented May 4, 2016

All comments have been addressed with the exception of the LayerUpdateSpaceTimeTileFeatureTests.scala naming issue which is discussed above.

@jamesmcclain

This comment has been minimized.

Copy link
Member Author

commented May 9, 2016

All comments have been addressed with the exception of the LayerUpdateSpaceTimeTileFeatureTests.scala naming issue which is discussed above.

Just to amplify, I am curious to know whether I should just change the names of the files that I added, or also change the name sof the files that they are based on.

@lossyrob

This comment has been minimized.

Copy link
Member

commented May 9, 2016

The latter choice, change all the incorrect ones. Thanks.

@jamesmcclain

This comment has been minimized.

Copy link
Member Author

commented May 10, 2016

Okay, will-do.

@jamesmcclain jamesmcclain force-pushed the jamesmcclain:feature/ordered-tile branch from fe2182a to b6fbc65 May 10, 2016

@jamesmcclain

This comment has been minimized.

Copy link
Member Author

commented May 10, 2016

All comments prior to this one have been addressed.

@echeipesh echeipesh merged commit 36bfa97 into locationtech:master May 19, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jamesmcclain jamesmcclain deleted the jamesmcclain:feature/ordered-tile branch May 19, 2016

@lossyrob lossyrob added this to the 1.0 milestone Oct 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.