jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoAPI
  • GEO-3

Support mutable geometries

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.0, 2.0
  • Fix Version/s: None
  • Component/s: geometry
  • Labels:
    None

Description

In GeoAPI 1.0, geometries are immutables. Some applications need mutables geometries, since reconstructing a whole geometry for a change in only one point (for example) is not always pratical. Some other application requires immutable geometries, for example a display could become out of synchronisation if a geometry changed without renderer knowledge. There is different ways to provide that:

1) Provide listeners

2) Provide mutable and immutable views of geometries either through:

a) optional setFoo(...) methods, which may thrown an
UnmodifiableGeometryException;

b) Some kind of ReadAccess and WriteAccess interfaces. For example
basic geometry interfaces could be immutable, with a
"ModifiableFoo" subinterface for each of them.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Bryce Nordgren added a comment - 02/Jun/06 4:19 PM

I see that the Geometry interface in the GeoAPI 2.0 release has the isMutable() and toImmutable() methods. Does this JIRA task refer to a somewhat more complicated support mechanism?

The out-of-synchronization issue is not necessarily related to immutability. A mutable geometry requires the use of NotifyingCollection interfaces (NotifyingSet, NotifyingList), defined to fire events when elements are added or deleted. GeoAPI could define the event/event listener to be used, as well as the required extensions to the Collections framework. So I guess we could either fix the synchronization problem by providing for immutability or setting up an extension to Collections.

Show
Bryce Nordgren added a comment - 02/Jun/06 4:19 PM I see that the Geometry interface in the GeoAPI 2.0 release has the isMutable() and toImmutable() methods. Does this JIRA task refer to a somewhat more complicated support mechanism? The out-of-synchronization issue is not necessarily related to immutability. A mutable geometry requires the use of NotifyingCollection interfaces (NotifyingSet, NotifyingList), defined to fire events when elements are added or deleted. GeoAPI could define the event/event listener to be used, as well as the required extensions to the Collections framework. So I guess we could either fix the synchronization problem by providing for immutability or setting up an extension to Collections.
Hide
Permalink
Martin Desruisseaux added a comment - 06/Jun/06 12:22 AM

The isMutable() and toImmutable() methods were provided as a first fix attempt for this JIRA task. It may or may not be enough; I was waiting for implementation experience implementation before to close this JIRA issue.

Notifying collections may help, but it may forces users to register many listeners for the same geometry. For example a user that wants to listen for polygon changes would have to listen for changes in the external ring as well as changes for every polygon holes. Would listeners at the geometry level be more convenient than listeners at the collections level?

Show
Martin Desruisseaux added a comment - 06/Jun/06 12:22 AM The isMutable() and toImmutable() methods were provided as a first fix attempt for this JIRA task. It may or may not be enough; I was waiting for implementation experience implementation before to close this JIRA issue. Notifying collections may help, but it may forces users to register many listeners for the same geometry. For example a user that wants to listen for polygon changes would have to listen for changes in the external ring as well as changes for every polygon holes. Would listeners at the geometry level be more convenient than listeners at the collections level?

People

  • Assignee:
    Unassigned
    Reporter:
    Martin Desruisseaux
Vote (0)
Watch (0)

Dates

  • Created:
    03/Aug/04 12:11 AM
    Updated:
    06/Jun/06 12:22 AM

Time Tracking

Estimated:
1w
Original Estimate - 1 week
Remaining:
1w
Remaining Estimate - 1 week
Logged:
Not Specified
Time Spent - Not Specified
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.