orange3-geo
orange3-geo copied to clipboard
Adjust lat/long for Norway?
Geo version
0.2.8
Orange version
3.27.1
Expected behavior
I think it would make more sense to have the default location of Norway to be in mainland Norway, say somewhere about 62° N, 8° E.
Actual behavior
Currently Norway is represented by a point on Svalbard, which, while admittedly Norwegian territory, is not where you’d look first.
Steps to reproduce the behavior
Show any data containing Norway with Geo Map.
Additional info (worksheets, data, screenshots, ...)

I could be that the point is computed as a central point due to Norway having some overseas territories, but unsure if that's the case. I was not able to find where to adjust this. :(
That would be in orange3-geo-master/orangecontrib/geo/geojson/admin1-NOR.json
I know, but where in that file? I was only able to find polygon descriptions, couldn't figure out where is the coordinate for the "center of Norway". If you can find it, feel free to submit a pull request. :)
Yes, I was too hasty. There is a lat/long, but it’s for Bouvet Island. Weird. I’ll dig a bit more.
Not just Bouvet, also other counties. @kernc Do you perhaps remember if there is a "center" coordinate or it is computed on-the-fly?
Yes, if there isn’t an explicit latitude and longitude given, a “representative point” is computed. So, it should be possible to add lat/long data to the file. I’ll fiddle around and see what I can come up with :-)
What I do remember is that JSONs are generated. Manual edits should probably be made to the generating code. :sweat_smile:
https://github.com/biolab/orange3-geo/blob/c54a6a8e266395b0aaad65dcf90afb2231b21c0e/orangecontrib/geo/geojson/make-geojson.sh#L81-L141
Then again, maybe lat-longs for admin0 (countries) are computed on-the-fly, in which case the override might also fit somewhere here: https://github.com/biolab/orange3-geo/blob/12660269364a15a13e32d525adbf6ad7f9f722cc/orangecontrib/geo/mapper.py#L111-L126
I've been looking at the data files and I can’t figure out how they are generated. As we noted, there is info on Bouvet island (also Norwegian territory) in the admin1-NOR.json file, but nowhere else in the orange3-geo-master tree, so if that file is generated, what is it based on?
if that file is generated, what is it based on?
https://github.com/biolab/orange3-geo/blob/master/CONTRIBUTING.md#building-geojson-files
Based on your screenshot, however, I think you should to be looking at admin0.json and the code snippet above.