NullPointerException when using Topology Plugin

44 views
Skip to first unread message

Zizi Jama

unread,
Aug 20, 2018, 10:51:57 AM8/20/18
to openjump-users
I am using Version 20180819 snapshot rev.5917  and have also tried with Version 1.13 release rev.5792  on Ubuntu 18.04 64bit

I have a polygon layer (parcel boundaries) I get the following error when running Plugins > Topology > Adjust Polygon Boundaries

java.lang.NullPointerException
    at com.vividsolutions.jcs.conflate.coverage.Coverage.computeAdjustedFeatureUpdates(Coverage.java:121)
    at com.vividsolutions.jcs.conflate.coverage.CoverageCleaner.adjustNearFeatures(CoverageCleaner.java:281)
    at com.vividsolutions.jcs.conflate.coverage.CoverageCleaner.process(CoverageCleaner.java:170)
    at com.vividsolutions.jcs.plugin.clean.CoverageCleanerPlugIn.run(CoverageCleanerPlugIn.java:126)
    at com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:152)

I did run QA > Make Geometries Valid

I did also run Plugins > Topology > Find Coverage Gaps

Any idea what could be the cause of this?

edgar....@web.de

unread,
Aug 21, 2018, 6:02:07 AM8/21/18
to openjum...@googlegroups.com, Zizi Jama, Michael Michaud
hey Zizi,

this happens to be within the Topology Extension by Michael. looks like the geometry is unexpectedly null in line 121
https://sourceforge.net/p/jump-pilot/code/HEAD/tree/plug-ins/TopologyPlugin/trunk/src/com/vividsolutions/jcs/conflate/coverage/Coverage.java#l121

i'll CC him and maybe he can come up with a fix.. ede

Michaël Michaud

unread,
Aug 21, 2018, 7:50:06 AM8/21/18
to openjump-users
Hi Zizi,

Would it be possible for you to attach the dataset or a subset of your dataset with which I can reproduce the problem ?

Michaël

Zizi Jama

unread,
Aug 24, 2018, 6:48:19 AM8/24/18
to openjump-users
Here is the link to the data https://drive.google.com/open?id=1gVv3eNb2IpkGV0jmw1FCfXxaSU40N-t0

I am attempting to perform an automated cleaning process for gaps using a tolerance of 0.001

Zizi Jama

unread,
Sep 4, 2018, 6:34:21 AM9/4/18
to openjump-users
Hi Michael,

I am not sure if you did receive the sample data.

Zizi

Jukka Rahkonen

unread,
Sep 10, 2018, 10:33:33 AM9/10/18
to openjum...@googlegroups.com, Zizi Jama
Hi,

I cutted your massive dataset into halves and eliminater little by
little geometries which were OK for the process. Finally I got a minimum
dataset that can be used for re-producing the error and it contains only
two geometries (attached).

Please try to do the job of producing a minimal re-producible test case
by yourself next time. It would save the time of the developers that
they can use better for trying to fix the issue.

Now let's see if Michaël finds time to think how to avoid the null
pointer exception that seems to caused by this 8 millimeter long
triangular polygon in this small dataset:

com.vividsolutions.jump.feature.BasicFeature@509a8d69 9284193 103786 KETHN0FT000000015352000001 FP R C 6065.61 30.987533 -29.696919 RE/15352 3.6E-5 6.275635 MC N0FT00000001535200000 Wed
Nov 26 00:00:00 EET 2014 KWAZULU-NATAL FT N0FT0000 15352 0

Unfortunately deleting that single polygon from your original data does
not prevent NPE from happening.


-Jukka Rahkonen-



Zizi Jama kirjoitti 2018-09-04 13:34:
> Hi Michael,
>
> I am not sure if you did receive the sample data.
>
> Zizi
>
> On Tuesday, August 21, 2018 at 12:02:07 PM UTC+2, ede wrote:
>
>> hey Zizi,
>>
>> this happens to be within the Topology Extension by Michael. looks
>> like the geometry is unexpectedly null in line 121
>>
>>
> https://sourceforge.net/p/jump-pilot/code/HEAD/tree/plug-ins/TopologyPlugin/trunk/src/com/vividsolutions/jcs/conflate/coverage/Coverage.java#l121
>> [1]
>>
>> i'll CC him and maybe he can come up with a fix.. ede
>>
>> On 20.08.2018 09:11, Zizi Jama wrote:
>>> I am using Version 20180819 snapshot rev.5917 and have also tried
>> with
>>> Version 1.13 release rev.5792 on Ubuntu 18.04 64bit
>>>
>>> I have a polygon layer (parcel boundaries) I get the following
>> error when
>>> running Plugins > Topology > Adjust Polygon Boundaries
>>>
>>> java.lang.NullPointerException
>>> at
>>>
>>
> com.vividsolutions.jcs.conflate.coverage.Coverage.computeAdjustedFeatureUpdates(Coverage.java:121)
>>
>>> at
>>>
>>
> com.vividsolutions.jcs.conflate.coverage.CoverageCleaner.adjustNearFeatures(CoverageCleaner.java:281)
>>
>>> at
>>>
>>
> com.vividsolutions.jcs.conflate.coverage.CoverageCleaner.process(CoverageCleaner.java:170)
>>
>>> at
>>>
>>
> com.vividsolutions.jcs.plugin.clean.CoverageCleanerPlugIn.run(CoverageCleanerPlugIn.java:126)
>>
>>> at
>>>
>>
> com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:152)
>>
>>>
>>> I did run QA > Make Geometries Valid
>>>
>>> I did also run Plugins > Topology > Find Coverage Gaps
>>>
>>> Any idea what could be the cause of this?
>>>
>
> --
> -- You received this message because you are subscribed to the Google
> Groups openjump-users group. To post to this group, send email to
> openjum...@googlegroups.com. To unsubscribe from this group, send
> email to openjump-user...@googlegroups.com. For more
> options, visit this group at
> https://groups.google.com/d/forum/openjump-users?hl=en
> ---
> You received this message because you are subscribed to the Google
> Groups "openjump-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openjump-user...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> Links:
> ------
> [1]
> https://sourceforge.net/p/jump-pilot/code/HEAD/tree/plug-ins/TopologyPlugin/trunk/src/com/vividsolutions/jcs/conflate/coverage/Coverage.java#l121
adjust_polygon_error.jml

Michaël Michaud

unread,
Sep 12, 2018, 5:07:27 PM9/12/18
to openjump-users
Hi,

Sorry for the delay, and thanks to Jukka who made a simple test case which helps a lot.

I uploaded a new version (0.9.3) which fixes the problem

The origin of the problem was small polygons which produced degenerated geometries after conflation (like flat polygons).
It now produces empty polygons. Empty polygons cannot be visualized in the map but their semantic is kept in case the user wants to process it another way.
You can fliter empty polygons out with selection tool (Edit>Selection>Select by geometry type)


Le lundi 20 août 2018 16:51:57 UTC+2, Zizi Jama a écrit :

Zizi Jama

unread,
Oct 16, 2018, 1:03:56 AM10/16/18
to openjum...@googlegroups.com
Thank you.

--
Reply all
Reply to author
Forward
0 new messages