Module: CocinaDisplay::Geospatial::DecimalParser::Helpers
- Defined in:
- lib/cocina_display/geospatial.rb
Instance Method Summary collapse
-
#normalize_coord(coord_str) ⇒ String
Convert hemispheres to plus/minus signs for parsing.
Instance Method Details
#normalize_coord(coord_str) ⇒ String
Note:
The hemisphere can either lead or trail the degrees.
Convert hemispheres to plus/minus signs for parsing.
360 361 362 |
# File 'lib/cocina_display/geospatial.rb', line 360 def normalize_coord(coord_str) hemisphere_first(coord_str).tr("EN", "+").tr("WS", "-") end |