Adrian Custer wrote:
> Meanwhile, a new question along the same lines: why are the various
> interfaces declaring getBounds() as returning the 2D BoundingBox rather
> than the completely general Envelope? Is this an oversight or are you
> really intending to facilitate the 2D case at the expense of generality?
>   
This is one of two things:
- an oversight because we were not familiar with the GeoAPI geometry 
breakdown (ie BoundingBox extends Envelope); or
- Matching what GML does

I would also suspect that the use of Envelope would cause no end of 
confusion due to the naming conflict with JTS Envelope.

Irregardless the idea is to be more general than the specifications; I 
am not sure if BoundingBox was intended to be only 2D - my impression is 
we added enough helper methods to this interface to allow it to be 
useful (expands to include, etc... the definition of getX, getY is 
documented exactly in terms of getOrdinate( 0 ) and getOrdinate(1) and 
does not prevent getOrdinate(2) from being used.

Jody
> If the latter, how are we going to edit the javadoc to declare which 2D
> one should pull out of the various 3D CRS's and what to do with 1D CRSs?
>
>
> Finally, perhaps the text below clarifies slightly the
> Feature.getBounds() javadoc:
>
> * The coordinate reference system (CRS) of the returned bounds must be 
> * derived from the geometric attributes which were used to compute the 
> * bounds. In the event that the feature contains multiple geometric 
> * attributes which have different CRSs, the returned bounds should use 
> * the CRS defined by [EMAIL PROTECTED] #getDefaultGeometry()} and the 
> calculation 
> * of the bounds should reproject all other geometric attributes to that 
> * CRS.
> * </p>
> *
> * @return the feature bounds, possibly empty.
> */
> BoundingBox getBounds();
>
> unfortunately, you'll have to edit the text to re-align it to the code. 
>
> --adrian
>
>
>
> -------------------------------------------------------------------------
> 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

Reply via email to