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

Example: VoxelKey #1639

Merged
merged 6 commits into from Oct 6, 2016

Conversation

Projects
None yet
3 participants
@fosskers
Contributor

fosskers commented Sep 27, 2016

Example documentation on how to implement a new key type, used in KeyIndexes and many GeoTrellis operations.

fosskers added some commits Sep 26, 2016

(docs) Added `custom-key.md`
- An English explanation of `VoxelKey.scala`
And with a `KeyIndex` written, it will of course need its own `JsonFormat`,
which demands some additional glue to make fully functional. For more
details, see `ShardingKeyIndex.scala`.

This comment has been minimized.

@pomadchin

pomadchin Sep 27, 2016

Member

Think it is important to add a reference or explanations of how to use custom registrator.

This comment has been minimized.

@fosskers

fosskers Sep 27, 2016

Contributor

That's included in custom-keyindex.md.

This comment has been minimized.

@pomadchin

pomadchin Sep 27, 2016

Member

yes, sorry; thx for pointing that

This comment has been minimized.

@pomadchin

pomadchin Sep 27, 2016

Member

mb all refereneces to make links? ShardingKeyIndex.scala can be a link as well.

*Want to jump straight to a code example? See:*
```
doc-examples/src/main/scala/geotrellis/doc/examples/spark/VoxelKey.scala

This comment has been minimized.

@pomadchin

pomadchin Sep 27, 2016

Member

make it a link?

This comment has been minimized.

@lossyrob
```
Where the pattern `[A: Trait1: Trait2: ...]` means that for whichever `A`
you end up using, it must have an implicit instance of `Trait1` and `Trait2`

This comment has been minimized.

@pomadchin

pomadchin Sep 27, 2016

Member

Trait1[K] and Trait2[K] as [A: Trait1: Trait2: ...] expands to [A](ev0: Trait1[A], ev1: Trait2[A])

This comment has been minimized.

@fosskers

fosskers Sep 27, 2016

Contributor

Right, it's just syntactic sugar.

And with a `KeyIndex` written, it will of course need its own `JsonFormat`,
which demands some additional glue to make fully functional. For more
details, see `ShardingKeyIndex.scala`.

This comment has been minimized.

@pomadchin

pomadchin Sep 27, 2016

Member

mb all refereneces to make links? ShardingKeyIndex.scala can be a link as well.

@fosskers

This comment has been minimized.

Contributor

fosskers commented Sep 28, 2016

I might be forgetting to implement a SpatialComponent instance for VoxelKey...

*Want to jump straight to a code example? See:*
```
doc-examples/src/main/scala/geotrellis/doc/examples/spark/VoxelKey.scala

This comment has been minimized.

@lossyrob
}
}
}
}

This comment has been minimized.

@lossyrob

lossyrob Oct 5, 2016

Member

You are missing SpatialComponent

fosskers added some commits Oct 5, 2016

@lossyrob lossyrob merged commit a0e354f into locationtech:master Oct 6, 2016

1 check passed

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

@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