Given latitude and longitude, how to find in what country those coordinates are?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
Research direction
Begin with the issue's GeoJSON and EPSG:4326/JTS question; no source files, tests, or entry points are named. Before work can be considered done, the project would need a decided implementation or documented answer for country lookup, including acceptable border-case behavior and the optimization approach.
Written by the indexing model from the issue text.
Description
This is more of a question as I need help to figure out...
So as ti title says:
Given latitude and longitude, how to find in what country those coordinates are?
I have geojson file with country borders. Each country is represented with either Polygon or MultiPolygon. If I understand correctly, those coordinates that are inside geojson file are longitude and latitude in EPSG:4236 CRS. Because of that I cannot just check relation between Point (longitude, latitude) and Polygon because it might give error because operation/methods from this library and JTS does not take into account curvature of earth.
So my idea is first to convert all geometries from EPSG:4326 to Google Mercator, and then convert given longitude and latitude, and finally perform contains and intersect operations?
Am I on the right way? Or can I directly use geometries without transformation from one CRS to another (I am willing to tolerate some error, like some near border cases)?
Also for the optimization purposes, I would build quad tree and boundary box checks...
- Dominant language
- Java
- Stars
- 961
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from locationtech/spatial4j
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
locationtech/spatial4j#232 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
locationtech/spatial4j#231 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
locationtech/spatial4j#230 · 2 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
locationtech/spatial4j#227 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
locationtech/spatial4j#221 ·
All issues in locationtech/spatial4j
Similar issues
-
type: possible bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
grimmory-tools/grimmory#2850 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
aoqia194/leaf-loader#19 ·