Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conversion between different Map projections in Java

In my GIS application the data are sometimes stored in "Google Mercator" (in meters), sometimes in WGS84 LatLon. I'd like a reliable library to convert this data easily and in a "scientific" way, rather than messing with it manually, risking big errors.

I've come across Proj4, which apparently is able to do this: http://trac.osgeo.org/proj

but I can't find a similar library for Java (or Groovy). Such a project would be highly beneficial, given that those projections are increasingly common in online applications. A little jar would be amazing :-)

There is a Java port, but there aren't any files to download: http://www.jhlabs.com/java/maps/proj/

Basically I need to do this type of conversion: http://proj4js.org

Any idea about how to do this in Java?

Thanks, Mulone

like image 509
Mulone Avatar asked Jan 21 '11 13:01

Mulone


People also ask

What are the main differences between different map projections?

The only factor that distinguishes different cylindrical map projections from one another is the scale used when spacing the parallel lines on the map.

What is equivalence in map projection?

Equivalent projections preserve areal relationships. This means that comparisons between sizes of land-masses (e.g., North America vs. Australia) can be properly made on equal area maps.

Are all map projections equivalent?

We have many different map projections because each has different patterns of distortion—there is more than one way to flatten an orange peel. Some projections can even preserve certain features of the Earth without distorting them, though they can't preserve everything.


1 Answers

Have a look at GeoTools. The bad thing is you don't get a little jar, but about a hundred.

This Tutorial might show something similiar to what you want to accomplish.

like image 149
adrianboimvaser Avatar answered Sep 23 '22 00:09

adrianboimvaser