Hi Jan

It depends on what your coordinate reference system says; if you look in your 
coordinate reference systems there is an array of axis. The order of that array 
documents the meaning of the ordinates used.

In geotools you have the option to "force" the axis order to be in "XY" order 
(or easting / northing if you think that way). But it is a choice you make as 
an application developer.

We have a long article about "Axis" order somewhere on the wiki (because it is 
a common source of confusion).

Jody

On 13/01/2010, at 7:35 AM, Jan Torben Heuer wrote:

> Hi,
> 
> In which order expects JTS Coordinate the values? I thought, Coordinate(lon, 
> lat) would be the correct format. For example I have some OpenStreetMap data 
> in my database: "SRID=4326;POINT(12.1589415 47.5672387)" which is lon/lat  
> somewhere in Austria. When loading such data into JTS Point (using the 
> postgresql_jts JDBC driver) I get an object like;
> (com.vividsolutions.jts.geom.Point) POINT (12.1589415 47.5672387)
> 
> Up to this point I was absolutely convinced that JTS stores WGS84 
> coordinates as lon/lat. But, When I used the JTS#transform() I noticed the 
> following:
> 
> JTS.transform(factory_wgs84.createPoint(new Coordinate(100,30), 
> sometransformation)
> 
> throws the exception:
> 
> Latitude 100°00.0 is too close to a pole.
> 
> Why does JTS#transform() interpret the first axis as latitude and the second 
> as longitude? And which behaviour is correct?
> 
> And more important, how/where can I fix it? How does geotools handle this in 
> general?
> 
> Cheers, 
> 
> Jan
> 
> 
> -- 
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to