latlng2dms

Simple java library for converting latitude/longitudes to degrees/minutes/seconds format.

License

License

GroupId

GroupId

com.github.marlonlom
ArtifactId

ArtifactId

latlng2dms
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

latlng2dms
Simple java library for converting latitude/longitudes to degrees/minutes/seconds format.
Project URL

Project URL

https://github.com/marlonlom/latlng2dms
Source Code Management

Source Code Management

https://github.com/marlonlom/latlng2dms

Download latlng2dms

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.marlonlom/latlng2dms/ -->
<dependency>
    <groupId>com.github.marlonlom</groupId>
    <artifactId>latlng2dms</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.marlonlom/latlng2dms/
implementation 'com.github.marlonlom:latlng2dms:1.0.0'
// https://jarcasting.com/artifacts/com.github.marlonlom/latlng2dms/
implementation ("com.github.marlonlom:latlng2dms:1.0.0")
'com.github.marlonlom:latlng2dms:jar:1.0.0'
<dependency org="com.github.marlonlom" name="latlng2dms" rev="1.0.0">
  <artifact name="latlng2dms" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.marlonlom', module='latlng2dms', version='1.0.0')
)
libraryDependencies += "com.github.marlonlom" % "latlng2dms" % "1.0.0"
[com.github.marlonlom/latlng2dms "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

latlng2dms - Latitude/Longitude to DMS representation

GitHub issues Github Releases Bintray Build Status Download

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:

<dependency>
  <groupId>com.github.marlonlom</groupId>
  <artifactId>latlng2dms</artifactId>
  <version>$latestVersion</version>
</dependency>

Use it in your code:

With coordinates:

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:

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 👍 👍

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.

Versions

Version
1.0.0