google / s2-geometry-library-java

Automatically exported from code.google.com/p/s2-geometry-library-java
Apache License 2.0
538 stars 230 forks source link

Any updates to this library? #3

Closed jpaulynice closed 3 years ago

jpaulynice commented 8 years ago

Hi,

I was looking around and I'm interested in using this library, but I noticed that the last commits were 4-5 years ago. Has there been any updates/bug fixes/etc since? The library is also using ant. I converted my fork to gradle and moved the packages appropriately to src/main/java and src/test/java, but wouldn't open a pr for that...also is there any official documentation?

Cheers!

Jay

eengle commented 8 years ago

We're working on an update to this library, and the associated documentation. It has been actively maintained internally, and we will get an update out to you as soon as possible.

Best regards,

On Mon, Mar 28, 2016 at 8:26 PM, Jay Paulynice notifications@github.com wrote:

Hi,

I was looking around and I'm interested in using this library, but I noticed that the last commits were 4-5 years ago. Has there been any updates/bug fixes/etc since? The library is also using ant. I converted my fork https://github.com/julesbond007/s2-geometry-library-java to gradle and moved the packages appropriately to src/main/java and src/test/java, but wouldn't open a pr for that...also is there any official documentation?

Cheers!

Jay

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/google/s2-geometry-library-java/issues/3

TomBlock commented 8 years ago

Eric, that is much appreciated! This library is unique and extremely useful.

Thanks,

Tom

jpaulynice commented 8 years ago

Great thanks!

lokkju commented 8 years ago

That would be amazing! there is a lot of inefficiency in object creation when doing region covering and polygon contains operations; do you know if this has been addressed at all?

eengle commented 8 years ago

Somewhat. I'll be able to say more when the library update is released.

Best regards,

Eric

On Tue, May 3, 2016 at 12:18 AM, Loki Coyote notifications@github.com wrote:

That would be amazing! there is a lot of inefficiency in object creation when doing region covering and polygon contains operations; do you know if this has been addressed at all?

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/google/s2-geometry-library-java/issues/3#issuecomment-216456480

lokkju commented 8 years ago

Is there any estimate of when the next update will be released?

prusswan commented 8 years ago

Just a side question, is this library self-sufficient and can be ported directly to a different language?

eengle commented 8 years ago

It already exists in C++, and while it can be ported to another language, doing so while retaining both efficiency and correctness is not a minor challenge.

Particular areas to pay attention to are numerical robustness (Java's strictfp functionality would be needed, among other considerations.)

What language did you want to use S2 in?

On Wed, Jul 27, 2016 at 1:28 PM, prusswan notifications@github.com wrote:

Just a side question, is this library self-sufficient and can be ported directly to a different language?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/google/s2-geometry-library-java/issues/3#issuecomment-235710374, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgwAWCeBtmdPd4aaV4za_kWWlzRHFrOks5qZ794gaJpZM4H6YK_ .

prusswan commented 8 years ago

@eengle ruby, thanks for your explanation

GibsonHu commented 8 years ago

Im having a issue with the cellId initialization. it seems to only support longs which max value is

  1. however i have a cell id that is 9260949374668636160 i want to convert. How can i do this??
eengle commented 8 years ago

How is it that you have a cell ID that is larger than Long.MAX_VALUE? If you've built it yourself, I may be able to recommend a way around manual manipulation of the long bits.

If you're parsing it from a string, I suggest Guava's UnsignedLongs helper class, or if you're on Java 8, you can use the new Long.parseUnsignedLong method.

On Wed, Jul 27, 2016 at 9:27 PM, Gibson notifications@github.com wrote:

Im having a issue with the cellId initialization. it seems to only support longs which max value is

  1. however i have a cell id that is 9260949374668636160 i want to convert. How can i do this??

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/s2-geometry-library-java/issues/3#issuecomment-235797903, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgwAU9uaZVxZjmhVuw-Fygk206i3av6ks5qaC-rgaJpZM4H6YK_ .

Lacero commented 8 years ago

@GibsonHu I had this problem too. Longs in Java are signed so they only use 63 bits for the magnitude whereas S2 cell ids are 64 bits. Here is what I did:

    BigInteger i = new BigInteger("9260949374668636160");
    String hexValue = Long.toHexString(i.longValue());
    S2CellId cell = S2CellId.fromToken(hexValue);
    String degreesLatLng = cell.toLatLng().toStringDegrees();

    System.out.println(cell.level());
    System.out.println(cell.toToken());
    System.out.println(hexValue);
    System.out.println(degreesLatLng);

/*
15
80858063c
80858063c0000000
(37.79204238192416, -122.39717095751772)
*/

or use Long.parseUnsignedLong("9260949374668636160"); as as @eengle points out if using Java 8

ryantheleach commented 7 years ago

Still looking forward to this library update.

espeed commented 7 years ago

@eengle is the library update still in the works?

hntd187 commented 7 years ago

I am also very interested in a library update for this.

eengle commented 7 years ago

James and others, yes, the library update is still in the works.

On Mon, Apr 17, 2017 at 1:40 PM, Stephen Carman notifications@github.com wrote:

I am also very interested in a library update for this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/s2-geometry-library-java/issues/3#issuecomment-294586280, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgwAWl0yA5yZ3ar1ygx1WngtnxyQ35eks5rw845gaJpZM4H6YK_ .

Chevy7 commented 7 years ago

interested in a library update for this lib. more doc and demo

SamDeBlock commented 7 years ago

@Chevy7 You could use the following links to get an idea what this library is about. You'll also notice that it is quite feature complete.

https://medium.com/sidewalk-talk/s2-cells-and-space-filling-curves-keys-to-building-better-digital-map-tools-for-cities-a312aa5e2f59 http://blog.christianperone.com/2015/08/googles-s2-geometry-on-the-sphere-cells-and-hilbert-curve/ https://s2.sidewalklabs.com/regioncoverer/

rossica commented 6 years ago

I see the C++ reference library has been getting updates, is there any hope of this Java port getting some attention? Or should I bite the bullet and use JNI to interface with the C++ library?

deatherving commented 6 years ago

Still waiting for the update.

eengle commented 6 years ago

The java version has not been abandoned. It has been a long time since we've updated it, but it is being worked on actively with the goal of upgrading all of the APIs to be comparable with the C++ version.

Kind regards,

Eric

On Thu, Sep 6, 2018 at 3:45 PM AI_ROBOT notifications@github.com wrote:

Still waiting for the update.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/s2-geometry-library-java/issues/3#issuecomment-419265534, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgwASqrg9ygJLzi_DGnn8alBAnCuoqAks5uYaWKgaJpZM4H6YK_ .

ryantheleach commented 6 years ago

@eengle Is there a reason why it's not being done transparently? People bumping this post would largely cease if the development was in the open, even if it was only on snapshot dev commits and never in a release.

prusswan commented 6 years ago

Might be related to their proprietary work..which can make it difficult to get clearance for an update

samgurtman-zz commented 5 years ago

I’m beginning to have doubts this will ever be updated. Could we instead get the equivalent SWIG definitions instead similar to the python version?

eengle commented 5 years ago

We've recently made some important progress toward being able to do a more modern release, so hang in there, we are by no means stopping work here.

That said, swig bindings are a cool idea also. They offer some advantages over the Java port, some operations are inherently faster, but you must tolerate the fairly large amount of process ram not handled by the jvm. This can be a crippling trade-off in a server environment.

On Thu, Dec 13, 2018, 1:07 AM samgurtman <notifications@github.com wrote:

I’m beginning to have doubts this will ever be updated. Could we instead get the equivalent SWIG definitions instead similar to the python version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/s2-geometry-library-java/issues/3#issuecomment-446853312, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgwASXHjYsT_zY7n2D2GO74W8BRJaLCks5u4e6agaJpZM4H6YK_ .

samgurtman-zz commented 5 years ago

@eengle Eric, do you have a ballpark estimate of when we'll see an update?

feinstein commented 5 years ago

I would love to see an estimate for the release of this library, I have a project that needs it ASAP

silicontrip commented 5 years ago

I'll also put my hand up for wanting an updated version of the library. I've found bugs in the Boolean Polygon operations and would like them resolved so I can complete a project I'm working on. Eric, I believe that we've been speaking on the google groups forum regarding the specific case that fails.

sunnypatel165 commented 5 years ago

I would like to add to this too! Even we need this library and it will be great to update it with at least basic functions like intersects in PolyLine!

martyphee commented 5 years ago

@eengle Sorry for nagging but it's been about 7 months since your last post. Should we assume there won't be any updates to the Java implementation?

ryantheleach commented 5 years ago

@eengle Even if you don't have a ballpark time, a little transparency on what's blocking it can't hurt?

eengle commented 5 years ago

No worries about asking questions here. I can't promise updates on a particular timeline, but I'm happy to provide some insight.

There are two major difficulties. There are a number of math fundamentals and data structures used by new library features that work poorly when naively translated into Java, and our opensource releasing framework is migrating. Neither process is done, but at this point the latter set of internal tools is the more problematic.

I appreciate your patience. In the meantime, and in case we have to make drastic changes to our current release plans in the name of expediency, it would also be useful to know 1) which features already in Java you value the most, and 2) which features new to C++ you would most value in Java.

Thanks, Eric

On Thu, Aug 8, 2019 at 5:14 AM Ryan Leach notifications@github.com wrote:

@eengle https://github.com/eengle Even if you don't have a ballpark time, a little transparency on what's blocking it can't hurt?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/s2-geometry-library-java/issues/3?email_source=notifications&email_token=AA4DAAMOC7QILMMX3DMJRMLQDQE2BA5CNFSM4B7JQK72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD33NJ7A#issuecomment-519492860, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4DAAO43INUGIDGWBHINRTQDQE2BANCNFSM4B7JQK7Q .

feinstein commented 5 years ago

I have no experience at all with Java interop, but for the sake of brainstorming, couldn't this library just map Java methods to C++ interop? At least as a stopgap solution for now?

I don't know if the overhead of interop will be worse then the math translation, but I felt it was worth sharing it.

eengle commented 5 years ago

If you mean JNI, that's certainly an option that sorta works. But it's too slow, and of course entirely breaks the portability of the Java version for e.g. Android.

On Thu, Aug 8, 2019, 10:06 AM Michel Feinstein notifications@github.com wrote:

I have no experience at all with Java interop, but for the sake of brainstorming, couldn't this library just map Java methods to C++ interop? At least as a stopgap solution for now?

I don't know if the overhead of interop will be worse then the math translation, but I felt it was worth sharing it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/s2-geometry-library-java/issues/3?email_source=notifications&email_token=AA4DAAL2Z3ZVXWFSWDDV5OLQDRHATA5CNFSM4B7JQK72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD34I33Q#issuecomment-519605742, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4DAAPSYJWJQBQYUN6LQ5TQDRHATANCNFSM4B7JQK7Q .

feinstein commented 5 years ago

I was thinking about a C# problem I had once and I solved using C# interop, so I kinda used the same wording without realizing it was specific to C#.

eengle commented 5 years ago

The interfacing language has a different name, but it's the same thing with a similar set of consequences: All the wonderful JIT things that C# can do are disabled when making interop calls, just like calls to native libraries via JNI.

Thanks for the suggestions, but if there was a reasonable shortcut, I'd certainly have taken it ;-]

On Thu, Aug 8, 2019 at 11:25 AM Michel Feinstein notifications@github.com wrote:

I was thinking about a C# problem I had once and I solved using C# interop, so I kinda used the same wording without realizing it was specific to C#.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/s2-geometry-library-java/issues/3?email_source=notifications&email_token=AA4DAAOU53M2AEV54VGVZB3QDRQK7A5CNFSM4B7JQK72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD34P5UI#issuecomment-519634641, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4DAANFL7SEFZTPGG6PEPLQDRQK7ANCNFSM4B7JQK7Q .

feinstein commented 5 years ago

Nowadays there has been lots of discussion about the real benefits of JIT, Android itself moved to AOT, so I guess it depends more on the platform that will be executing the library (Android/Serverless vs. Dedicated Server). But anyways, my "suggestion" was more about learning than actually expecting it to be acceptable, thanks @eengle.

TomBlock commented 5 years ago

Dear list, dear Eric,

just a short note on this discussion:

We as company are using the lib extensively in satellite data processing on large clusters as well as for web-based applications. From my experience it is (or at least has been during the last years) a stability concern when using calls from Java to native code. If something goes wrong  in the native code - the VM dies without any chance to intercept or log a message. If this happens in a web-server .... the server is gone.

In our problem area, we always have the possibility to tackle "suboptimal" performance with more hardware. If experimenting with calls to the C-lib using JNI (or other means), I'd suggest to implement a switch that allows users to skip the optimizations. Not to mention the complexity of separate platform support and installation issues that come with a combination of Java interface and native implementation.

So, a strong vote for a pure Java solution from my side. And a big thumbs up for the lib!

Cheers,

Tom

Am 08.08.2019 um 19:06 schrieb Michel Feinstein:

I have no experience at all with Java interop, but for the sake of brainstorming, couldn't this library just map Java methods to C++ interop? At least as a stopgap solution for now?

I don't know if the overhead of interop will be worse then the math translation, but I felt it was worth sharing it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/google/s2-geometry-library-java/issues/3?email_source=notifications&email_token=AABSPUUJNAIDP6WOJYVI76TQDRHAXA5CNFSM4B7JQK72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD34I33Q#issuecomment-519605742, or mute the thread https://github.com/notifications/unsubscribe-auth/AABSPUWLJEA6BESYLR7GPN3QDRHAXANCNFSM4B7JQK7Q.

--

Dipl. Ing. Thomas Block

Brockmann Consult GmbH www.brockmann-consult.de Chrysanderstr. 1 D-21029 Hamburg, Germany Tel: +49 (0)40 69 63 89 - 304 Amtsgericht Hamburg HRB 157689 Geschäftsführer Dr. Carsten Brockmann

feinstein commented 5 years ago

@TomBlock don't worry, @eengle already made it clear he's not going to take any shortcuts and is aiming towards a pure Java solution.

I just mentioned JNI for the sake of brainstorming, not an actual possibility.

janacm commented 5 years ago

Any updates on the update?

alphairys commented 4 years ago

Would love to hear the update on this.

deinlandel commented 3 years ago

@eengle any news?

ryantheleach commented 3 years ago

To anyone sleeping on the news like I did, IT HAPPENED!