-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support querying the polylines more efficiently #26
Comments
One interesting question here is how the API of such a querying method should look like. To keep the spirit of current singe-point querying method, the polyline querying method should probably accept the array of primitive doubles, which would contain a consecutive pairs of latitude and longitude, like But how the return type should look like is a question, particularly, in the light of need to support of overlapping timezones, as introduced in release 2018g of the source data. Suggestions are welcome. |
I have taken the approach in TimeZoneMap of returning a TimeZone object in response to a location query. This object has a method to query the minimum distance from a location that could be traveled to exit the time zone. By the way, I very much appreciate Timeshape. It heavily influenced the design of TimeZoneMap, and I'd be interested in any feedback you might have. |
Hi @dustin-johnson, thanks for your kind feedback! I appreciate the fact that Timeshape was an inspiration for someone. I've checked out your library. Looks like the main difference from Timeshape is the following (but please correct me if I'm wrong, since I might have missed something):
All in all, I think you did a good job with your library. In fact, I'd appreciate if those efforts could go into the Timeshape instead! :) I'm very much open to changes and improvements in Timeshape, to accommodate needs of its users on any platform, supporting as many use cases as possible without compromising main goal of the library. What do you think about contributing to Timeshape, instead of maintaining the TimeZoneMap? We could merge these two libraries, to have just a single one for Java to provide such features. My main motivation for this suggestion is to unite efforts on a single goal, rather than doing the same work twice in different libs. I think, in Open Source community, it's usually the better way, because the total value for the community will be higher. I mean, it's better to have one great library providing certain feature, rather than two just good ones, isn't it? Of course, with multiple maintainers there will be some challenges, like the need to find compromises on technical decisions, or taking different priorities into considerations, but I think so far the technical differences between our libs are rather minor, and I think there should be no big problem of merging them, if we approach this with open minds. Please give it some thought and let me know if you're interested, at least in general. Of course we'll have to have some more thorough technical discussion before committing to this, but it doesn't make sense to start such a discussion if you prefer to go alone. |
Hi @RomanIakovlev, so sorry for the delayed response. I'm certainly open to the idea of merging the projects. While the code is quite different, the overall structure and concept is very heavily inspired from your work, and so it makes sense to marge this project with its origins. I'm currently tweaking and exploring quite a bit with the design and features, so I wonder if it makes sense to talk more about the logistics of merging them (and if it still makes sense) when I'm closer to completion. I don't expect that to take more than a week or two. In the meantime, I'd be honored if you wanted to start merging the projects. It would give you an opportunity to dig into TimeZoneMap a little deeper and see how compatible they are in their nitty-gritty details. Specifically responding to questions/musings: |
Hi @dustin-johnson, it's great you like the idea of merging the libraries! I'll open a new issue to discuss and track the progress of this. |
Maybe timeshape could be split in three libraries:
In this scheme releases of 2 and 3 must be tighly coupled with 1.
Would be interesting to investigate the tradeoffs by benchmarking protobuf vs flatbuffers vs capnproto as in issue #29. Protobuf is more space/memory efficient due to byte encoding while capnproto and flatbuffers tend to be more processing effective due to zero enconding and random access. Maybe could be created different libraries with same API if the performance/memory tradeoffs turns out to be quite separated and isolated, leaving to the developer decide according the applications needs.
|
Followup to my comment on issue #31:
|
Moving discussion about Timeshape & TimeZoneMap collaboration to #50, closing this as it's about polyline query, which is released. |
The use case to query a single geographical position seems to work rather well, but when it comes to querying multiple positions, there is a room for improvement. Particularly, there is a use case to query the contiguous sequence of points (a polyline, e.g. a GPS trace). In that situation, it might make sense to skip repeated quad tree queries and try to first test the same geometry as the one which contained the previous point in the polyline.
The text was updated successfully, but these errors were encountered: