An open API service indexing awesome lists of open source software.

https://github.com/marlonlom/latlng2dms

Some utilities for converting latitude/longitudes to degrees/minutes/seconds format
https://github.com/marlonlom/latlng2dms

coordinates dms geography java

Last synced: over 1 year ago
JSON representation

Some utilities for converting latitude/longitudes to degrees/minutes/seconds format

Awesome Lists containing this project

README

          

# latlng2dms - Latitude/Longitude to DMS representation

[![GitHub issues](https://img.shields.io/github/issues/marlonlom/latlng2dms.svg?style=flat-square)](https://github.com/marlonlom/latlng2dms/issues)
![Github Releases](https://img.shields.io/github/downloads/marlonlom/latlng2dms/latest/total.svg?style=flat-square)
[![Bintray](https://img.shields.io/bintray/v/marlonlom/latlng2dms/latlng2dms.svg?style=flat-square)](https://github.com/marlonlom/latlng2dms)
[![Build Status](https://travis-ci.org/marlonlom/latlng2dms.svg?branch=master&style=flat-square)](https://travis-ci.org/marlonlom/latlng2dms)
[![Download](https://api.bintray.com/packages/marlonlom/latlng2dms/latlng2dms/images/download.svg) ](https://bintray.com/marlonlom/latlng2dms/latlng2dms/_latestVersion)

Some utilities for converting latitude/longitudes to degrees/minutes/seconds format

## Examples:
- 40°26′46″ N, 79°58′56″ W
- 2°20'24" N, 5°20'24" W

## Usage:

### Import as a dependency:

Gradle:

```
compile 'com.github.marlonlom:latlng2dms:$latestVersion'
```

Maven:

```xml

com.github.marlonlom
latlng2dms
$latestVersion

```

### Use it in your code:

With coordinates:

```java
final Double[] coordinates = {151.209900d, -33.865143d};
final String converted = LatsLngs.with(coordinates).toDms();
/* Will return 33°51'54" S, 151°12'35" E */
```

Or with single longitude/latitude value:

```java
final Double value = -34.206841d;
final String converted = LatsLngs.with(value).asLatitude().toDms();
/* Will return 34°12'24 S */
```

## Spread the word

If you like this library, please tell others about it :thumbsup::thumbsup:



- []()Follow me on **Twitter**: [**@Marlonlom**](https://twitter.com/marlonlom)
- Contact me on **LinkedIn**: [**Marlonlom**](https://co.linkedin.com/in/marlonlom)

### License

```
Copyright 2017 marlonlom

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```