Modify

Opened 4 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#19833 closed defect (fixed)

[Patch] Duplicated way nodes after GeoJSON import

Reported by: machyna@… Owned by: machyna@…
Priority: normal Milestone: 20.09
Component: Core Version:
Keywords: merge Cc:

Description

What steps will reproduce the problem?

Load this GeoJSON file into JOSM:
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "height": null, "ele": null, "building": "yes", "building:part": null, "addr:street": null, "addr:housenumber": null, "addr:postcode": null, "addr:city": null, "addr:unit": null }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -73.500884095915112, 41.411448378403584, 681.359332416657708 ], [ -73.500858064042177, 41.411443813252596, 681.359660499991151 ], [ -73.50084195885043, 41.411431915657403, 680.701197249989491 ], [ -73.500855880045762, 41.4113869301355, 680.701197249989491 ], [ -73.500874724615144, 41.411383106023649, 680.993847583318711 ], [ -73.500903034858709, 41.411388071371178, 681.481379416654818 ], [ -73.50090474718067, 41.411382537731413, 681.481379416654818 ], [ -73.501042393669806, 41.411406679460427, 681.420355916663539 ], [ -73.500999852003986, 41.411544145321969, 681.420355916663539 ], [ -73.500989732866444, 41.411542370117715, 690.282542916655075 ], [ -73.500978892737024, 41.411577397270364, 690.379327499991632 ], [ -73.500870169858928, 41.411558327562069, 690.379327499991632 ], [ -73.50088809459605, 41.411500407047804, 686.351776499985135 ], [ -73.500881512311409, 41.411499252515114, 682.578490083324141 ], [ -73.500894761250208, 41.411456439661585, 682.578490083324141 ], [ -73.500882278650622, 41.411454250396936, 681.359332416657708 ], [ -73.500884095915112, 41.411448378403584, 681.359496458324429 ], [ -73.500884095915112, 41.411448378403584, 681.359332416657708 ] ] ] } }
]
}

  1. Run validation

Comes back as error "Duplicated way nodes" for node -73.500884095915112, 41.411448378403584

  1. Use Select or lasso tool to select the node
  2. Use Merge

What is the expected result?

Would expect both nodes with the same coordinate to be merged.

What happens instead?

I get an error message: Please select at least two nodes to merge ...

Please provide any additional information below. Attach a screenshot if possible.

If it is not clear, node [-73.500884095915112, 41.411448378403584] is in the polygon 3 times.
2x as the closing endpoint of polygon: [ -73.500884095915112, 41.411448378403584, 681.359332416657708 ]
1x as extra duplicated node: [ -73.500884095915112, 41.411448378403584, 681.359496458324429 ]

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-09-06 16:54:59 +0200 (Sun, 06 Sep 2020)
Build-Date:2020-09-07 01:30:48
Revision:17013
Relative:URL: ^/trunk

Identification: JOSM/1.5 (17013 en) Mac OS X 10.15.6
OS Build number: Mac OS X 10.15.6 (19G2021)
Memory Usage: 1599 MB / 1820 MB (505 MB allocated, but free)
Java version: 1.8.0_261-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.formdev.flatlaf.FlatDarkLaf
Screen: Display 69733632 1440x900 (scaling 1.0x1.0), Display 731409282 2560x1440 (scaling 1.0x1.0)
Maximum Screen Size: 2560x1440
Best cursor sizes: 16x16 -> 16x16, 32x32 -> 32x32
VM arguments: [-Djava.security.policy=file:<java.home>/lib/security/javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>/bin, -Djava.security.manager, -Djnlpx.origFilenameArg=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/56/1ee8cfb8-2bc3e844, -Djnlpx.remove=false, -Dsun.awt.warmup=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=NULL,2048m, -Dmacosx.jnlpx.dock.name=JOSM, -Dmacosx.jnlpx.dock.icon=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/25/4c122699-4466e0ba.icns, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp , -Djnlpx.jvm="<java.home>/bin/java"]
Dataset consistency test: No problems found

Plugins:
+ FastDraw (35499)
+ MicrosoftStreetside (35248)
+ PicLayer (35405)
+ apache-commons (35524)
+ apache-http (35092)
+ buildings_tools (35500)
+ changeset-viewer (22)
+ editgpx (35248)
+ ejml (35313)
+ flatlaf (35541)
+ geotools (35169)
+ javafx-osx (35458)
+ jaxb (35092)
+ jna (35092)
+ jts (35122)
+ log4j (35092)
+ merge-overlap (35248)
+ opendata (35513)
+ poly (35248)
+ reltoolbox (35529)
+ reverter (35499)
+ terracer (35499)
+ utilsplugin2 (35487)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/Freemap&preset&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Golf_Course&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/hiking_routes_with_trail_marking&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/SentieriItaliani&zip=1

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/LessObtrusiveNodes&style&zip=1
- https://github.com/simon04/coloured-addresses.mapcss/raw/master/dist/coloured-addresses.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features_ryg&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Cycleways&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/LitObjects&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lit&style&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Osmc&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/SlovakiaBicycleRoutes&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://github.com/TelenavMapping/Community_MapRoulette/blob/master/maxspeed.mapcss
+ ${HOME}/Documents/Results/Scripts/JOSM_style/AreaHighway.mapcss

Last errors/warnings:
- 133884.544 W: java.net.SocketTimeoutException: connect timed out
- 134174.802 E: Error header: The changeset 91180670 was closed at 2020-09-20 16:11:05 UTC
- 154750.574 E: http://click.message.yale.edu/?qs=1e6c28766977c837c12101a65026091c68bb8efb7d9ad31c933386884063f8a06277cd7eb99fe45b02c84334ca754d9c03b4461760cc6df0: java.lang.IllegalArgumentException: {qs=1e6c28766977c837c12101a65026091c68bb8efb7d9ad31c933386884063f8a06277cd7eb99fe45b02c84334ca754d9c03b4461760cc6df0} does not contain lat
- 156512.010 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out
- 159731.169 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out
- 159731.175 W: java.net.SocketTimeoutException: Read timed out
- 160037.240 W: java.net.SocketTimeoutException: connect timed out
- 160727.280 E: Error header: The changeset 91190888 was closed at 2020-09-20 23:33:38 UTC
- 177190.407 E: Error header: The changeset 91196142 was closed at 2020-09-21 04:08:02 UTC
- 231503.295 W: java.net.SocketTimeoutException: connect timed out

Attachments (1)

19833.patch (1.7 KB) - added by GerdP 4 weeks ago.
filter duplicated nodes before creating an OSM way

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 weeks ago by GerdP

As you already noted there is only one node but it appears two times in sequence in the same way.
The easiest way to fix this is to click on the Fix button.
I guess the importer should be changed so that the duplicated node is not added to the way in the first place?

Changed 4 weeks ago by GerdP

Attachment: 19833.patch added

filter duplicated nodes before creating an OSM way

comment:2 Changed 4 weeks ago by GerdP

Owner: changed from team to machyna@…
Status: newneedinfo
Summary: Two points with the same Lat/Lon can't be merged[Patch] Duplicated way nodes after GeoJSON import

The result of this patch is similar to the result of the Fix Button

Last edited 4 weeks ago by GerdP (previous) (diff)

comment:3 Changed 4 weeks ago by machyna@…

If the polygons get fixed automatically during data loading then that should do it. Thanks!

comment:4 Changed 4 weeks ago by GerdP

Resolution: fixed
Status: needinfoclosed

In 17054/josm:

fix #19833: Duplicated way nodes after GeoJSON import

  • filter duplicated nodes before creating an OSM way

comment:5 Changed 4 weeks ago by GerdP

Component: Core multipolyCore

comment:6 Changed 4 weeks ago by GerdP

Milestone: 20.09

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain machyna@….
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.