Convert Decimal Degrees or Degree Minutes Seconds to Meters in Java

4.9k views Asked by At

I am working with a GIS project. Right now I have code to convert decimal degrees to degree/minute/seconds, but I don't have any idea how to convert decimal degree or degree/minutes/seconds to meters. Can anyone help me to convert decimal degree or degree/minutes/seconds to meters in Java?

2

There are 2 answers

0
trojanfoe On

How about GDAL?

GDAL is a translator library for raster geospatial data formats that is released under an X/MIT style Open Source license by the Open Source Geospatial Foundation. As a library, it presents a single abstract data model to the calling application for all supported formats. It also comes with a variety of useful commandline utilities for data translation and processing. The NEWS page describes the January 2011 GDAL/OGR 1.8.0 release.

2
anon On

You question might be really easy, or really complicated. Can we assume a spherical Earth? If so, you might be fine with the basic arc length formula:

Arc Length = degrees * pi * R / 180