I think this is a consequence of the EditTransaction class. All changes are
run though it to see if they are valid, even deletions. Since every change
is undoable and redoable, you need a null object as the proposed Geometry to
hold the place of the deletion. However, since there is a Feature involved
too, I'm not sure how a null Feature holds a null Geometry. Hmm.
Larry
On Mon, Mar 22, 2010 at 1:28 PM, Martin Davis <mbda...@refractions.net>wrote:
> That doesn't sound quite right. Why is a deleted geometry being checked
> for validity at all? Is this some consequence of changes made to allow
> null geometries to be handled? Perhaps the geometry deletion code is
> using null to represent "no feature", rather than "a feature with null
> geometry"?
>
> Larry Becker wrote:
> > It should be easy to fix. Here is the current code:
> >
> > public boolean proposedGeometriesValid() {
> > for (int i = 0; i < proposedGeometries.size(); i++) {
> > Geometry proposedGeometry = (Geometry)
> > proposedGeometries.get(i);
> > if (! proposedGeometry.isValid()) { return false; }
> > }
> > return true;
> > }
> >
> > We could just add a null Geometry check:
> >
> > public boolean proposedGeometriesValid() {
> > for (int i = 0; i < proposedGeometries.size(); i++) {
> > Geometry proposedGeometry = (Geometry)
> > proposedGeometries.get(i);
> > if (proposedGeometry == null) { return true; }
> > if (! proposedGeometry.isValid()) { return false; }
> > }
> > return true;
> > }
> >
> > But is this the right fix?
> >
> > Larry
> >
> > On Mon, Mar 22, 2010 at 12:53 PM, Larry Becker <becker.la...@gmail.com
> >wrote:
> >
> >
> >> I had no trouble duplicating the problem - just create a point and
> delete
> >> it in a new project. I don't have a clue as to what is going on though.
> >>
> >> Larry
> >>
> >>
> >> On Mon, Mar 22, 2010 at 12:40 PM, Martin Davis <mbda...@refractions.net
> >wrote:
> >>
> >>
> >>> Hmm... JTS 1.11 didn't introduce any changes into IsValidOp, I don't
> >>> think.
> >>>
> >>> Is it possible that JTS is not filtering out null geometries from being
> >>> tested by IsValidOp?
> >>>
> >>> Otherwise, someone will have to debug into the execution and figure out
> >>> what exact geometry is causing this problem.
> >>>
> >>> Stefan Steiniger wrote:
> >>>
> >>>> Hei,
> >>>>
> >>>> I haven't found the time to look into it, but I got this error report
> >>>> from Bernd:
> >>>>
> >>>> the issue is that he can not delete point features in existing
> projects
> >>>> or even just created tets layers. (must have been introduced to the NB
> >>>> after Feb 24th)
> >>>>
> >>>> ava.lang.NullPointerException
> >>>> at
> >>>>
> >>>>
> >>>
> com.vividsolutions.jts.operation.valid.IsValidOp.isValid(IsValidOp.java:62)
> >>>
> >>>> at com.vividsolutions.jts.geom.Point.isValid(Point.java:117)
> >>>> at
> >>>>
> >>>>
> >>>
> com.vividsolutions.jump.workbench.ui.EditTransaction.proposedGeometriesValid(EditTransaction.java:315)
> >>>
> >>>> at
> >>>>
> >>>>
> >>>
> com.vividsolutions.jump.workbench.ui.EditTransaction.commit(EditTransaction.java:256)
> >>>
> >>>> at
> >>>>
> >>>>
> >>>
> com.vividsolutions.jump.workbench.ui.EditTransaction.commit(EditTransaction.java:235)
> >>>
> >>>> at
> >>>>
> >>>>
> >>>
> com.vividsolutions.jump.workbench.ui.plugin.DeleteSelectedItemsPlugIn.execute(DeleteSelectedItemsPlugIn.java:99)
> >>>
> >>>> at
> >>>>
> >>>>
> >>>
> com.vividsolutions.jump.workbench.plugin.AbstractPlugIn$1.actionPerformed(AbstractPlugIn.java:130)
> >>>
> >>>> at
> >>>>
> >>>>
> >>>
> com.vividsolutions.jump.workbench.ui.WorkbenchFrame$24.keyPressed(WorkbenchFrame.java:1142)
> >>>
> >>>> at
> >>>>
> >>>>
> >>>
> com.vividsolutions.jump.workbench.ui.WorkbenchFrame$9.keyPressed(WorkbenchFrame.java:353)
> >>>
> >>>> at
> >>>> java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:233)
> >>>> at java.awt.Component.processKeyEvent(Component.java:6221)
> >>>> at
> javax.swing.JComponent.processKeyEvent(JComponent.java:2801)
> >>>> at java.awt.Component.processEvent(Component.java:6040)
> >>>> at java.awt.Container.processEvent(Container.java:2041)
> >>>> at java.awt.Component.dispatchEventImpl(Component.java:4630)
> >>>> at java.awt.Container.dispatchEventImpl(Container.java:2099)
> >>>> at java.awt.Component.dispatchEvent(Component.java:4460)
> >>>> at
> >>>>
> >>>>
> >>>
> java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
> >>>
> >>>> at
> >>>>
> >>>>
> >>>
> java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704)
> >>>
> >>>> at
> >>>>
> >>>>
> >>>
> java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969)
> >>>
> >>>> at
> >>>>
> >>>>
> >>>
> java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841)
> >>>
> >>>> at
> >>>>
> >>>>
> >>>
> java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668)
> >>>
> >>>> at java.awt.Component.dispatchEventImpl(Component.java:4502)
> >>>> at java.awt.Container.dispatchEventImpl(Container.java:2099)
> >>>> at java.awt.Window.dispatchEventImpl(Window.java:2475)
> >>>> at java.awt.Component.dispatchEvent(Component.java:4460)
> >>>> at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
> >>>> at
> >>>>
> >>>>
> >>>
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
> >>>
> >>>> at
> >>>>
> >>>>
> >>>
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
> >>>
> >>>> at
> >>>>
> >>>>
> >>>
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
> >>>
> >>>> at
> >>>> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> >>>> at
> >>>> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> >>>> at
> >>>>
> >>> java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> >>>
> >>>>
> >>>
> ------------------------------------------------------------------------------
> >>>
> >>>> Download Intel® Parallel Studio Eval
> >>>> Try the new software tools for yourself. Speed compiling, find bugs
> >>>> proactively, and fine-tune applications for parallel performance.
> >>>> See why Intel Parallel Studio got high marks during beta.
> >>>> http://p.sf.net/sfu/intel-sw-dev
> >>>> _______________________________________________
> >>>> Jump-pilot-devel mailing list
> >>>> Jump-pilot-devel@lists.sourceforge.net
> >>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >>>>
> >>>>
> >>>>
> >>> --
> >>> Martin Davis
> >>> Senior Technical Architect
> >>> Refractions Research, Inc.
> >>> (250) 383-3022
> >>>
> >>>
> >>>
> >>>
> ------------------------------------------------------------------------------
> >>> Download Intel® Parallel Studio Eval
> >>> Try the new software tools for yourself. Speed compiling, find bugs
> >>> proactively, and fine-tune applications for parallel performance.
> >>> See why Intel Parallel Studio got high marks during beta.
> >>> http://p.sf.net/sfu/intel-sw-dev
> >>> _______________________________________________
> >>> Jump-pilot-devel mailing list
> >>> Jump-pilot-devel@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >>>
> >>>
> >>
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> ------------------------------------------------------------------------------
> > Download Intel® Parallel Studio Eval
> > Try the new software tools for yourself. Speed compiling, find bugs
> > proactively, and fine-tune applications for parallel performance.
> > See why Intel Parallel Studio got high marks during beta.
> > http://p.sf.net/sfu/intel-sw-dev
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Jump-pilot-devel mailing list
> > Jump-pilot-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
>
> --
> Martin Davis
> Senior Technical Architect
> Refractions Research, Inc.
> (250) 383-3022
>
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel