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

Map node lang/late to country name #190

Open
0oM4R opened this issue Aug 12, 2024 · 3 comments
Open

Map node lang/late to country name #190

0oM4R opened this issue Aug 12, 2024 · 3 comments
Assignees
Labels
type_feature New feature or request
Milestone

Comments

@0oM4R
Copy link

0oM4R commented Aug 12, 2024

Map the country names in GraphQL:
on creating/updating node, GraphQL should use the longitude and latitude to set the country name using another service, so we will ignore the country and city fields from the chain and will overwrite it, and we can also add country code to manage regions in gridproxy

Originally posted by @0oM4R in threefoldtech/tfgrid-sdk-ts#3021 (comment)

we should use third party package to determine the country code then map it to the county table and update node location with the new values

@AhmedHanafy725 AhmedHanafy725 added the type_feature New feature or request label Aug 12, 2024
@AhmedHanafy725 AhmedHanafy725 added this to the 2.13.0 milestone Aug 12, 2024
@0oM4R
Copy link
Author

0oM4R commented Aug 14, 2024

Issue Update:
I was searching for a tool to get the location data using longitude and latitude, i couldn't find any npm package that match our requirement.
but I have multiple options:
1- using https://geopy.readthedocs.io/en/stable/#installation
2 using OSM api https://nominatim.openstreetmap.org/reverse.php?lat=31.0371&lon=32.3844&zoom=18&format=jsonv2
3- i tried to check the maxmind database, We can get the geoname_id using lon/lat then get location data using that id, or we may manipulate the database and update the current country table to contain lat/long and its location
image

I don't think it is a good idea to rely on api or third party service, we may reach to another conflict later, i think we should maintain our database, and we can add it to geoip.grid.tf as a service

@0oM4R
Copy link
Author

0oM4R commented Aug 15, 2024

Issue update:
I wrote a script that merge ipv4 and ipv6 data and dropped the unnecessary columns,
working on cleaning the data and removing redundant coordinates

@0oM4R
Copy link
Author

0oM4R commented Aug 18, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type_feature New feature or request
Projects
Status: Blocked
Development

No branches or pull requests

2 participants