Martin Desruisseaux wrote: > According a quick search on Google, it seems to me that current argument order > for GeographicBoundingBoxImpl(double,double,double,double): > > http://javadoc.geotools.fr/snapshot/org/geotools/metadata/iso/extent/GeographicBoundingBoxImpl.html#GeographicBoundingBoxImpl(double,%20double,%20double,%20double) > > is in contradiction with common usage. Common usage seems to be > (xmin,ymin,xmax,ymax) rather than (xmin,xmax,ymin,ymax). > > Any objection if I deprecate the above-constructor in GeoTools 2.4 and fix the > argument order in 2.5? The intend is to make developper life easier by > complying > to the order he is used to. Unless anyone can correct me in my interpretation > of > common usage? > That sounds like a really scary change; all client code would still compile but be wrong? So here is a suggestion - making the constructor package visible (so client code will break) and using a geometry factory?
You are correct that argument order for bounds / rectangle / bounding box and such like is very annoying. It is one of the mistakes that every geotools user makes when learning. So far we have: - xmin, xmax, ymin, ymax (has the advantage of scaling to more axis smoothly) - x, y, w, h - x1,y1,x2,y2 I would recommend things like: - Factory.createBounds( DirectPosition, DirectPosition ) - the CRS would ensure it was a GeographicBoundingBox right? Making a method that acccepted raw doubles may not be worth it; no performance gain and it is ambigious... if you need to: - factory.createBounds( double[], CoordinateReferenceSystem ) Where the array can be wrapped up as a PointArray with a direct position mapped onto the first 2 ordiantes, and another mapped onto the second 2 ordinates... Jody > Martin > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Geotools-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-devel > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
