You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by "Martin Desruisseaux (JIRA)" <ji...@apache.org> on 2014/04/01 05:16:17 UTC
[jira] [Updated] (SIS-172) Replace boolean argument in
AbstractEnvelope.contains and intersects
[ https://issues.apache.org/jira/browse/SIS-172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Desruisseaux updated SIS-172:
------------------------------------
Affects Version/s: 0.4
0.3
> Replace boolean argument in AbstractEnvelope.contains and intersects
> --------------------------------------------------------------------
>
> Key: SIS-172
> URL: https://issues.apache.org/jira/browse/SIS-172
> Project: Spatial Information Systems
> Issue Type: Task
> Components: Referencing
> Affects Versions: 0.3, 0.4
> Reporter: Martin Desruisseaux
> Assignee: Martin Desruisseaux
> Priority: Minor
> Fix For: 0.5
>
>
> The {{AbstractEnvelope}} class provides the following methods:
> * {{boolean contains(Envelope envelope, boolean edgesInclusive)}}
> * {{boolean intersects(Envelope envelope, boolean edgesInclusive)}}
> We should probably replace the boolean argument by something like the following enumeration:
> {code:java}
> public enum EdgeInclusion {
> /**
> * All edges are inclusive.
> * This is the default policy for {{Envelope}}.
> */
> ALL,
> /**
> * All edges are exclusive.
> */
> NONE,
> /**
> * Edges defined by the lower corner are inclusive,
> * while edges defined by the upper corner are exclusive.
> * This is the usual policy in Java2D.
> */
> LOWER,
> /**
> * Edges defined by the upper corner are inclusive,
> * while edges defined by the lower corner are exclusive.
> * This policy is defined for completeness but rarely used.
> */
> UPPER
> }
> {code}
> The policy used in the majority of cases is the {{ALL}} one. Consequently we should provide convenience methods expecting only an {{Envelope}} argument and using that mode by default.
--
This message was sent by Atlassian JIRA
(v6.2#6252)