[Java-collab] First contents in osgeom repository

Ugo Taddei ugo.taddei at iais.fraunhofer.de
Wed Aug 12 04:55:17 EDT 2009


Hi,

Markus Schneider wrote:
> Jody Garnett wrote:
> 
>> Although not mentioned in your list (and I don't have the code to
>> check at work here). I would like to comment on Point:
>> - I want to be sure we don't have getX() and getY(). The have caused
>> so much confusion in letting people assume x/y even when their
>> coordinate system is radial; or happens to be in y/x order etc... I
>> would like to remove these methods and just have get( int
>> )/getOrdiante( int ) etc...
> 
> You're absolutely right, I fixed that in the SVN already. I went for Point#get0(), Point#get1(), Point#get2() and
> Point#get(int) because these are methods that are used very, very often and should have short names.
> 

I don't agree with the point being made here, sorry. I find getX() and 
getY() clearer (and less cumbersome), and I reckon this is what people 
expect to find *most of the time*. I haven't worked with radial CRSs, 
and never came across a CRS with "inverted" axes (though I know they 
exist and have been a source of headache for everyone), so folks working 
with those please understand and correct me.

Of course, getOrdinate( n ) is more generic, at the cost of API 
usability, I find. Same goes for getSpan( n ) instead of 
getWidth()/getHeight().


Cheers,

Ugo


More information about the Java-collab mailing list