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

Allow some search in resettable streams #69

Open
xivk opened this issue Nov 19, 2018 · 0 comments
Open

Allow some search in resettable streams #69

xivk opened this issue Nov 19, 2018 · 0 comments
Assignees
Milestone

Comments

@xivk
Copy link
Contributor

xivk commented Nov 19, 2018

Implement the option to mark a location in a source stream and the option to return to that location if the stream can be reset. An example of a possible API could be:

  • OsmStreamSource.NewHook() : Returns an object containing the information needed for the source to reset to the current location.
  • OsmStreamSource.MoveToHook(Hook h) : Seeks the stream to hook create in the call above.
  • OsmStreamSource.CanSeek : Returns true when the stream is seekable.

This allows OsmSharp to move to specific objects in source streams or to move to the first Node, Way or Relation in a stream without going over the entire stream again. Optionally, in sorted streams we can automatically create default hooks for the start of ways and relations, automatically exposing this functionality to any sorted stream.

These calls should throw exceptions when used on a non-seekable stream.

@xivk xivk self-assigned this Nov 19, 2018
@xivk xivk added this to the Version 6.2 milestone Nov 19, 2018
@xivk xivk added the planned label Nov 19, 2018
xivk added a commit that referenced this issue Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant