2

I'm using a PostGIS database and Java to develop my application. I need to transform my geographic data currently in latitude/longitude format into a x/y format. I found solutions based on UTM coordinates, however points in different zones are a problem. I'm looking for a java library or a algorithm that does exactly this: http://www.whoi.edu/marine/ndsf/cgi-bin/NDSFutility.cgi?form=0&from=LatLon&to=XY

Given two lat/lon coordinates, one of them for origin, the output is x and y in meters.

2
  • 1
    A comment at this nearly identical (but unanswered) question has a link to a Java Map Projection Library; many Java-related questions mention GeoTools. Commented Mar 11, 2013 at 18:44
  • 1
    Do you want to emulate the exact map projection? I think you'll have to ask them plus what earth model is being used. It looks like some sort of azimuthal projection. Commented Mar 11, 2013 at 19:33

1 Answer 1

3

I assume your data are stored inside a PostGIS database. You can use PostGIS functions to do the transformations directly. No need for external libraries.

 select st_x(st_transform(geom,<SRID>)) as X, st_y(st_transform(geom,<srid>)) as Y from mTable where ... 
0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.