Skip to content

Example: VoxelKey - #1639

Merged
lossyrob merged 6 commits into
locationtech:masterfrom
fosskers:doc/cgw/voxel-key
Oct 6, 2016
Merged

lossyrob merged 6 commits into
locationtech:masterfrom
fosskers:doc/cgw/voxel-key

Conversation

@fosskers

Copy link
Copy Markdown
Contributor

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

Comment thread docs/spark/custom-key.md Outdated

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`.

@pomadchin pomadchin Sep 27, 2016 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's included in custom-keyindex.md.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yes, sorry; thx for pointing that

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Comment thread docs/spark/custom-key.md Outdated

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

make it a link?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

Comment thread docs/spark/custom-key.md
```

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`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right, it's just syntactic sugar.

Comment thread docs/spark/custom-key.md Outdated

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`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@fosskers

Copy link
Copy Markdown
Contributor Author

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

Comment thread docs/spark/custom-key.md Outdated

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

}
}
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You are missing SpatialComponent

@lossyrob
lossyrob merged commit a0e354f into locationtech:master Oct 6, 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants