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

how do i reference wk library in c++ project? #176

Open
LemonLiTree opened this issue Apr 6, 2023 · 3 comments
Open

how do i reference wk library in c++ project? #176

LemonLiTree opened this issue Apr 6, 2023 · 3 comments

Comments

@LemonLiTree
Copy link

how do i reference wk library in c++ project ?
I haven't learned R language, but I want to implement some functions. I noticed that there are many functions I want in the s2 library ( https://github.com/r-spatial/s2 ). Can I also use the S2 library directly in the c++ project?

@paleolimbot
Copy link
Owner

I think you may be looking for https://github.com/paleolimbot/s2geography or https://github.com/google/s2geometry , both of which are C++-only libraries!

@LemonLiTree
Copy link
Author

LemonLiTree commented Apr 7, 2023

https://github.com/paleolimbot/s2geography I did not find the conversion between wkb and S2geometry in this library

I want to realize the conversion between wkb format data and S2point /S2 polygon /etc, but now I have two problems:
1 . Is the SRID of S2geometry 4326?
2. The wkb format is
WKBPoint {
byte byteOrder;
uint32 wkbType;
Point point;
};
s2point is (longitude, latitude), for example: POINT(24,32),S2point is implemented with Vector3, including (x, y, z), which converts latitude and longitude into a three-dimensional unit vector, so i want to ask:To store point in wkb, use two doubles to store latitude and longitude ?or three doubles to store the (x, y, z) of the unit vector?

@paleolimbot
Copy link
Owner

It looks like I haven't upstreamed that yet! It is coming (maybe a few weeks away).

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

No branches or pull requests

2 participants