0

I am following this tutorials.

As explained I can convert the cell id from degrees like below

latlng = s2.S2LatLng.FromDegrees(-30.043800, -51.140220)
cell = s2.S2CellId.FromLatLng(latlng)

But I want to get the cell id from lat lng values (Not from degrees)

latlng = s2.S2LatLng.ToLATLANG(51.577106, 1.067254)

How can I do it (no need to be python)?

Michael Entin
  • 7,189
  • 3
  • 21
  • 26
Vish K
  • 135
  • 5
  • 14

1 Answers1

0

If you already have latlng object, just use it in the second code line.

If not, choose needed constructor from repository file (or documentation if exists).

MBo
  • 77,366
  • 5
  • 53
  • 86
  • Thanks, I didn't find any double arguments from the library to pass (51.577106, 1.067254) ? that's why I posted the question. Sorry. – Vish K Nov 22 '17 at 08:55
  • FromDegrees and FromRadians get double arguments. What are units for your `(51.577106, 1.067254)` values? – MBo Nov 22 '17 at 09:01
  • (51.577106, 1.067254) = (latitude, longitude) from google map android user location. – Vish K Nov 22 '17 at 09:39
  • Oh sorry that map lng and lat in degrees. – Vish K Nov 22 '17 at 09:45