Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

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

share|improve this question
A comment at this nearly identical (but unanswered) question has a link to a Java Map Projection Library; many Java-related questions mention GeoTools. – whuber Mar 11 '13 at 18:44
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. – mkennedy Mar 11 '13 at 19:33

I assume your data are stored inside a postgis db. You can use postgis functions to do the transformations directly. No need for external libs

    st_x(st_transform(geom,<SRID>) as X, 
    st_y(st_transform(geom,<srid>) as Y 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.