Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
orienternet-api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ifs
IPA
Webapp-Frontend OrienterNet
orienternet-api
Commits
a92fdb93
Commit
a92fdb93
authored
1 year ago
by
Paul-Edouard Sarlin
Browse files
Options
Downloads
Patches
Plain Diff
Improve error messages
parent
bbecb01f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
maploc/demo.py
+6
-4
6 additions, 4 deletions
maploc/demo.py
with
6 additions
and
4 deletions
maploc/demo.py
+
6
−
4
View file @
a92fdb93
...
...
@@ -96,9 +96,9 @@ def read_input_image(
raise
ValueError
(
"
geocoding unavailable, install geopy.
"
)
location
=
geolocator
.
geocode
(
prior_address
)
if
location
is
None
:
logger
.
info
(
"
Could not find any location for %s.
"
,
prior_address
)
logger
.
info
(
"
Could not find any location for
address
'
%s.
'
"
,
prior_address
)
else
:
logger
.
info
(
"
Using prior address
:
%s
"
,
location
.
address
)
logger
.
info
(
"
Using prior address
'
%s
'
"
,
location
.
address
)
latlon
=
(
location
.
latitude
,
location
.
longitude
)
if
latlon
is
None
:
geo
=
exif
.
extract_geo
()
...
...
@@ -107,9 +107,11 @@ def read_input_image(
latlon
=
(
geo
[
"
latitude
"
],
geo
[
"
longitude
"
],
alt
)
logger
.
info
(
"
Using prior location from EXIF.
"
)
else
:
logger
.
info
(
"
Could not find any prior location in
EXIF
.
"
)
logger
.
info
(
"
Could not find any prior location in
the image EXIF metadata
.
"
)
if
latlon
is
None
:
raise
ValueError
(
"
Need prior latlon
"
)
raise
ValueError
(
"
No location prior given: maybe provide the name of a street, building or neighborhood?
"
)
latlon
=
np
.
array
(
latlon
)
proj
=
Projection
(
*
latlon
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment