Add geo module (offline + nominatim)#17
Conversation
Zoriot
left a comment
There was a problem hiding this comment.
Also please add this new module to the Readme and also link it there.
Other then that looks quite good, still need to implement/try it trough.
| try { | ||
| JSONObject response; | ||
|
|
||
| URL url = URI.create("https://nominatim.openstreetmap.org/reverse?lat=" + latitude + "&lon=" + longitude + "&format=json&zoom=" + this.zoom).toURL(); |
There was a problem hiding this comment.
Can you make that komoot compatible? People might want to use that for obvious reasons
| ### [AlpsLib-Geo](https://mvn.alps-bte.com/#browse/browse:alps-bte:com%2Falpsbte%2Falpslib%2Falpslib-geo) | ||
|
|
||
| This module can be used to get geo information (like country or city) of a location identified by latitude and longitude. This is possible both offline and over https using Nominatim. | ||
|
|
There was a problem hiding this comment.
Please include a link to the readme of geocode
| * @param longitude The locations longitude | ||
| * @return The location data or null if there were errors | ||
| */ | ||
| public RgcGeoLocation locationFromCoordinates(float latitude, float longitude) { |
There was a problem hiding this comment.
A overload with doubles would be nice.
| @@ -0,0 +1,263 @@ | |||
| package com.alpsbte.alpslib.geo.rgc; | |||
|
|
|||
| /* Copyright (c) 2015, Erich Schubert | |||
There was a problem hiding this comment.
Hey, do we have to use this code? You are not the original author of this code right? because if not, we have to keep this here like specified in the licence.
I would rather avoid shipping multiple licenses if possible.
But if we have to, please specify in the projects LICENCE.md or somethere that this module uses other licenses as well other than MIT.
Also please verify that this is the only file that needs to have this header and none of the other classes come from the same source.
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| BestPractice | 3 medium 5 minor |
| ErrorProne | 1 medium |
| Security | 1 high |
| CodeStyle | 45 minor |
| Complexity | 2 medium |
🟢 Metrics 52 complexity · 0 duplication
Metric Results Complexity 52 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Using the geo module it is possible to retrieve location data by coordinates. For example the country or city. This can happen by either providing a data file for offline search or using the Nominatim API