RoadMatcher Issue

38 views
Skip to first unread message

Rajesh Dhull

unread,
Dec 2, 2018, 3:12:42 PM12/2/18
to openjump-users
Hi,

I am new to Open Jump and I wanted to checkout the conflation tool RoadMatcher. Based on the information available in the group for RoadMatcher I am using the OpenJUMP-1.11-r5434-CORE and  RoadMatcher-1.6.1.jar. I am getting errors as shown below when trying to the matching on the attached sample data. I have checked the geometries in both the datasets and they all are valid geometries.

When running the roadmatcher with all the attributes on the streets segments. I am geeting the error as below -

Illegal Argument Exception: geometries must not contain null elements

java.lang.IllegalArgumentException: geometries must not contain null elements
    at com.vividsolutions.jts.geom.GeometryCollection.<init>(GeometryCollection.java:76)
    at com.vividsolutions.jts.geom.MultiLineString.<init>(MultiLineString.java:76)
    at com.vividsolutions.jts.geom.GeometryFactory.createMultiLineString(GeometryFactory.java:304)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.SplitPath.getGeometry(SplitPath.java:158)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.SplitPathMatcher.match(SplitPathMatcher.java:193)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.SplitPathMatcher.matchSplitEdges(SplitPathMatcher.java:152)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.SplitPathMatcher.computeSplitPaths(SplitPathMatcher.java:72)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.SplitPathMatcher.getSplitPaths(SplitPathMatcher.java:43)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.SplitPathMatcher.isValid(SplitPathMatcher.java:213)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.PathZipper.split(PathZipper.java:142)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.PathZipper.computeUsingSubmatches(PathZipper.java:123)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.PathZipper.compute(PathZipper.java:99)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.PathZipper.isValid(PathZipper.java:75)
    at com.vividsolutions.jcs.conflate.roads.pathmatch.RoadPathZipper.zipper(RoadPathZipper.java:60)
    at com.vividsolutions.jcs.conflate.roads.pathmatch.RoadNetworkPathMatcher.matchPath(RoadNetworkPathMatcher.java:149)
    at com.vividsolutions.jcs.conflate.roads.pathmatch.RoadNetworkPathMatcher.matchPathsFromNodes(RoadNetworkPathMatcher.java:129)
    at com.vividsolutions.jcs.conflate.roads.pathmatch.RoadNetworkPathMatcher.matchOnlyCurrentGraphState(RoadNetworkPathMatcher.java:109)
    at com.vividsolutions.jcs.conflate.roads.pathmatch.RoadNetworkPathMatcher.match(RoadNetworkPathMatcher.java:65)
    at com.vividsolutions.jcs.conflate.roads.match.RoadMatcherProcess.computePathMatches(RoadMatcherProcess.java:94)
    at com.vividsolutions.jcs.conflate.roads.match.RoadMatcherProcess.matchOnce(RoadMatcherProcess.java:51)
    at com.vividsolutions.jcs.conflate.roads.match.RoadMatcherProcess.match(RoadMatcherProcess.java:38)
    at com.vividsolutions.jcs.conflate.roads.ConflationSession$2.yield(ConflationSession.java:286)
    at com.vividsolutions.jcs.conflate.roads.ConflationSession.doAutomatedProcess(ConflationSession.java:319)
    at com.vividsolutions.jcs.conflate.roads.ConflationSession.autoMatch(ConflationSession.java:284)
    at com.vividsolutions.jcs.plugin.conflate.roads.AutoMatchPlugIn$1$1.yield(AutoMatchPlugIn.java:88)
    at com.vividsolutions.jcs.plugin.conflate.roads.AutoMatchPlugIn.time(AutoMatchPlugIn.java:138)
    at com.vividsolutions.jcs.plugin.conflate.roads.AutoMatchPlugIn.access$000(AutoMatchPlugIn.java:15)
    at com.vividsolutions.jcs.plugin.conflate.roads.AutoMatchPlugIn$1.yield(AutoMatchPlugIn.java:85)
    at com.vividsolutions.jcs.conflate.roads.model.RoadsEventFirer.deferFiringEvents(RoadsEventFirer.java:76)
    at com.vividsolutions.jcs.plugin.conflate.roads.AutoMatchPlugIn.run(AutoMatchPlugIn.java:83)
    at com.vividsolutions.jcs.plugin.conflate.roads.AutoConflatePlugIn.run(AutoConflatePlugIn.java:143)
    at com.vividsolutions.jcs.plugin.conflate.roads.NewSessionPlugIn.initializeTask(NewSessionPlugIn.java:216)
    at com.vividsolutions.jcs.plugin.conflate.roads.NewSessionPlugIn.run(NewSessionPlugIn.java:193)
    at com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:152)
    at java.lang.Thread.run(Thread.java:748)

when I remove all the attributes or running the roadmatcher with just 2 attribute values (Street & Oneway); I am getting the error as below -


java.lang.ArrayIndexOutOfBoundsException: -1
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.QuantizedPath.segQuantaCount(QuantizedPath.java:39)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.QuantumIndex.maxQuantumIndex(QuantumIndex.java:126)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.QuantumIndex.prev(QuantumIndex.java:93)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.PlaceBackward.shiftBack(PlaceBackward.java:124)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.PlaceBackward.match(PlaceBackward.java:67)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.PlaceBackward.<init>(PlaceBackward.java:29)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.SplitPath.placeSplitNodes(SplitPath.java:114)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.SplitPath.split(SplitPath.java:87)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.SplitPathMatcher.computeSplitPaths(SplitPathMatcher.java:53)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.SplitPathMatcher.getSplitPaths(SplitPathMatcher.java:43)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.SplitPathMatcher.isValid(SplitPathMatcher.java:213)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.PathZipper.split(PathZipper.java:142)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.PathZipper.computeUsingSubmatches(PathZipper.java:123)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.PathZipper.compute(PathZipper.java:99)
    at com.vividsolutions.jcs.conflate.linearpathmatch.split.PathZipper.isValid(PathZipper.java:75)
    at com.vividsolutions.jcs.conflate.roads.pathmatch.RoadPathZipper.zipper(RoadPathZipper.java:60)
    at com.vividsolutions.jcs.conflate.roads.pathmatch.RoadNetworkPathMatcher.matchPath(RoadNetworkPathMatcher.java:149)
    at com.vividsolutions.jcs.conflate.roads.pathmatch.RoadNetworkPathMatcher.matchPathsFromNodes(RoadNetworkPathMatcher.java:129)
    at com.vividsolutions.jcs.conflate.roads.pathmatch.RoadNetworkPathMatcher.matchOnlyCurrentGraphState(RoadNetworkPathMatcher.java:109)
    at com.vividsolutions.jcs.conflate.roads.pathmatch.RoadNetworkPathMatcher.match(RoadNetworkPathMatcher.java:65)
    at com.vividsolutions.jcs.conflate.roads.match.RoadMatcherProcess.computePathMatches(RoadMatcherProcess.java:94)
    at com.vividsolutions.jcs.conflate.roads.match.RoadMatcherProcess.matchOnce(RoadMatcherProcess.java:51)
    at com.vividsolutions.jcs.conflate.roads.match.RoadMatcherProcess.match(RoadMatcherProcess.java:38)
    at com.vividsolutions.jcs.conflate.roads.ConflationSession$2.yield(ConflationSession.java:286)
    at com.vividsolutions.jcs.conflate.roads.ConflationSession.doAutomatedProcess(ConflationSession.java:319)
    at com.vividsolutions.jcs.conflate.roads.ConflationSession.autoMatch(ConflationSession.java:284)
    at com.vividsolutions.jcs.plugin.conflate.roads.AutoMatchPlugIn$1$1.yield(AutoMatchPlugIn.java:88)
    at com.vividsolutions.jcs.plugin.conflate.roads.AutoMatchPlugIn.time(AutoMatchPlugIn.java:138)
    at com.vividsolutions.jcs.plugin.conflate.roads.AutoMatchPlugIn.access$000(AutoMatchPlugIn.java:15)
    at com.vividsolutions.jcs.plugin.conflate.roads.AutoMatchPlugIn$1.yield(AutoMatchPlugIn.java:85)
    at com.vividsolutions.jcs.conflate.roads.model.RoadsEventFirer.deferFiringEvents(RoadsEventFirer.java:76)
    at com.vividsolutions.jcs.plugin.conflate.roads.AutoMatchPlugIn.run(AutoMatchPlugIn.java:83)
    at com.vividsolutions.jcs.plugin.conflate.roads.AutoConflatePlugIn.run(AutoConflatePlugIn.java:143)
    at com.vividsolutions.jcs.plugin.conflate.roads.NewSessionPlugIn.initializeTask(NewSessionPlugIn.java:216)
    at com.vividsolutions.jcs.plugin.conflate.roads.NewSessionPlugIn.run(NewSessionPlugIn.java:193)
    at com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:152)
    at java.lang.Thread.run(Thread.java:748)


Any ideas / suggestions why it's throwing up these errors and fixes for the same?

Regards,
Rajesh
sample.zip

Michaël Michaud

unread,
Dec 6, 2018, 4:30:50 PM12/6/18
to openjump-users
Hi Rajesh

I could reproduce the first error but have no idea why it raises this error. I'll try to have a deeper look by the end of the week.

Michaël

Michaël Michaud

unread,
Dec 16, 2018, 6:34:05 AM12/16/18
to openjump-users
Hi Rajesh,

I finally could have a look at the code and fix 2 bugs in version 1.6.2.

The code is relatively complex and I'm not 100% sure of my fix, but it now runs with your dataset.
Note that default parameters of RoadMatcher are for projected coordinates dataset. As yours is in lat/lon, you must change parameters in ConflationOptionsPlugIn.

Hope it helps,

Michaël

Le dimanche 2 décembre 2018 21:12:42 UTC+1, Rajesh Dhull a écrit :

Rajesh Dhull

unread,
Jan 15, 2019, 1:24:53 AM1/15/19
to openjum...@googlegroups.com
Thanks for the fix Michael. I'll test my dataset with the fixed version.

Regards,
Rajesh Dhull

--
-- 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.
Reply all
Reply to author
Forward
0 new messages