Modify

Opened 12 years ago

Closed 12 years ago

#3775 closed defect (fixed)

JOSM tries to upload a new relation that references a unuploaded way

Reported by: avarab@… Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

So this is what I did:

  1. Traced a bunch of lakes with lakewalker
  2. One lake had an Island that lakewalker didn't trace, so I created an inner way around the island, selected it and the lake and clicked "Create multipolygon" (multipoly plugin)
  3. Upload
  4. This creates this data locally:
  <relation id='-1' visible='true'>
    <member type='way' ref='-2' role='inner' />
    <member type='way' ref='43122004' role='outer' />
    <tag k='type' v='multipolygon' />
  </relation>

So somehow after the failed upload I have a pending relation for upload with a local inner way that hasn't been uploaded. JOSM doesn't know to solve this my uploading the local way *first*:

PUT http://api.openstreetmap.org/api/0.6/relation/create... Precondition Failed
Error header: Precondition failed: Relation with id  cannot be saved due to Way with id -1
25.10.2009 16:51:18 org.openstreetmap.josm.actions.UploadAction handlePreconditionFailed
WARNING: Warning: error header "Precondition failed: Relation with id  cannot be saved due to Way with id -1" did not match with an expected pattern
org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed: Relation with id  cannot be saved due to Way with id -1>
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:562)
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:462)
	at org.openstreetmap.josm.io.OsmApi.createPrimitive(OsmApi.java:250)
	at org.openstreetmap.josm.io.OsmServerWriter.makeApiRequest(OsmServerWriter.java:181)
	at org.openstreetmap.josm.io.OsmServerWriter.uploadChangesIndividually(OsmServerWriter.java:93)
	at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:165)
	at org.openstreetmap.josm.actions.UploadAction$UploadPrimitivesTask.realRun(UploadAction.java:654)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:62)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:116)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 14.2-b01 (Sun Microsystems Inc.)
Main-class: JOSM
Main-Version: 2318 SVN
Main-Date: 2009-10-25T14:51:51.162049Z
Memory Usage: 457 MB / 986 MB (168 MB allocated, but free)
Java version: 1.6.0_16

Plugins: lakewalkermultipolyopenstreetbugsopenvisibleremotecontrolutilspluginvalidatorwalkingpaperswmsplugin
Plugin lakewalker Version: 17375
Plugin multipoly Version: 18142
Plugin openstreetbugs Version: 18147
Plugin openvisible Version: 17536
Plugin remotecontrol Version: 18144
Plugin utilsplugin Version: 17707
Plugin validator Version: 18197
Plugin walkingpapers Version: 17822
Plugin wmsplugin Version: 17817


agpifoj.visible=false
cache.motd.html=1256486535
cache.motd.html.lang=Is:
cache.motd.html.version=2318
cache.wmsplugin.expire=-1
cache.wmsplugin.maxsize=-1
color.node=#FF0000
commandstack.visible=false
conflictresolutiondialog.height=342
conflictresolutiondialog.width=1001
conflictresolutiondialog.x=159
conflictresolutiondialog.y=209
coordinates=DECIMAL_DEGREES
download.gps=false
download.osm=true
draw.fullscreen=true
draw.rawgps.colorTracksTune=10
draw.rawgps.colors=1
draw.rawgps.direction=true
draw.rawgps.large=true
draw.splashscreen=false
filter.visible=false
help.window.bounds=72,133,800,600
josm.version=2318 SVN
laf=javax.swing.plaf.metal.MetalLookAndFeel
language=is
lastDirectory=/home/avar/src/josm
marker.audiofromstart=false
marker.buttonlabels=false
markers.lastaudiodirectory=/home/avar
measure.visible=true
message.convert_to_data=false
message.movedManyElements=false
mirror.http://josm.openstreetmap.de/presets=1256075480040;/home/avar/.josm/mirror_http___josm.openstreetmap.de_presets
mirror.http://josm.openstreetmap.de/styles=1256075479042;/home/avar/.josm/mirror_http___josm.openstreetmap.de_styles
mirror.http://svn.openstreetmap.org/applications/editors/josm/plugins/validator/ignoretags.cfg=1256487105642;/home/avar/.josm/plugins/validator/mirror_http___svn.openstreetmap.org_applications_editors_josm_plugins_validator_ignoretags.cfg
mirror.http://svn.openstreetmap.org/applications/editors/josm/plugins/validator/tagchecker.cfg=1256487105849;/home/avar/.josm/plugins/validator/mirror_http___svn.openstreetmap.org_applications_editors_josm_plugins_validator_tagchecker.cfg
mirror.http://svn.openstreetmap.org/applications/editors/josm/plugins/wmsplugin/sources.cfg=1256487106278;/home/avar/.josm/plugins/wmsplugin/mirror_http___svn.openstreetmap.org_applications_editors_josm_plugins_wmsplugin_sources.cfg
mirror.http://svn.openstreetmap.org/applications/utils/planet.osm/java/speller/words.cfg=1256487104967;/home/avar/.josm/plugins/validator/mirror_http___svn.openstreetmap.org_applications_utils_planet.osm_java_speller_words.cfg
org.openstreetmap.josm.actions.UploadAction$UploadDialogPanel=x=374,y=59,width=536,height=400
org.openstreetmap.josm.gui.actionsupport.DeleteFromRelationConfirmationDialog.geometry=x=649,y=387,width=400,height=200
org.openstreetmap.josm.gui.conflict.tags.CombinePrimitiveResolverDialog.geometry=x=165,y=294,width=788,height=445
org.openstreetmap.josm.gui.download.DownloadDialog.geometry=x=17,y=60,width=1000,height=600
org.openstreetmap.josm.gui.io.CloseChangesetDialog.geometry=x=396,y=272,width=562,height=305
org.openstreetmap.josm.gui.io.UploadDialog.geometry=x=503,y=347,width=529,height=423
org.openstreetmap.josm.gui.io.UploadSelectionDialog.geometry=x=241,y=237,width=345,height=400
osb.api.disabled=false
osb.auto_download=true
osb.include_date=true
osb.uri.close=http://openstreetbugs.schokokeks.org/api/0.1/closePOIexec
osb.uri.download=http://openstreetbugs.schokokeks.org/api/0.1/getBugs
osb.uri.edit=http://openstreetbugs.schokokeks.org/api/0.1/editPOIexec
osb.uri.new=http://openstreetbugs.schokokeks.org/api/0.1/addPOIexec
osm-download.bounds=67.08882787950223;-18.841552734375;67.18273963248883;-18.56689453125
osm-primitives.showid=true
osm-server.atomic-upload=false
pluginmanager.lastupdate=1256477179859
plugins=lakewalkermultipolyopenstreetbugsopenvisibleremotecontrolutilspluginvalidatorwalkingpaperswmsplugin
proxy.anonymous=false
proxy.enable=false
relationlist.visible=true
save.keepbackup=false
selectionlist.bounds=470,310,340,179
shortcut.groups.1=128
shortcut.groups.10=64
shortcut.groups.11=576
shortcut.groups.12=64
shortcut.groups.13=512
shortcut.groups.15=640
shortcut.groups.16=640
shortcut.groups.17=576
shortcut.groups.18=512
shortcut.groups.19=128
shortcut.groups.2=128
shortcut.groups.20=512
shortcut.groups.3=0
shortcut.groups.4=512
shortcut.groups.5=0
shortcut.groups.6=512
shortcut.groups.8=192
shortcut.groups.9=192
shortcut.groups.configured=true
tagimages.lastdirectory=/home/avar/src/cam/2009-07-29-Mapping-Bankholzen
toggleDialogs.width=323
upload.comment.history=Tracing lakes in Iceland from Landsat imagery using JOSM's lakewalker pluginAdd natural=lake to the multipolygon relation of a lake and remove natural=land and source= tags on its inner ways, that's redundant123Tracing Vanuatu from GPX track in the database as requested on the Talk mailing listhighway=service tagging for parking be the highwayReverting changeset 123589409: Converting all shop=greengrocer nodes last edited by user:farlokko to shop=groceriesAdd bridge on Bústaðavegur over MiklabrautFixing way end node near other highway errors found with JOSM's validatorAdd tourism=museum to museum nodeSaxhóll is a caldera. But that shouldn't be included in the name=* tagDoing crossings correctly. Tagging it on a node, not a wayFixing overlapping highways s found with JOSM's validatorMaking what looks like a normal gas station service way a highway=service instead of highway=tertiary tourism=attractionReverting the change (mostly by DaníelG) of adding natural=water to waterway=riverbank ways and adding natural=water and waterway=riverbank to ways which were "inner" in riverbank relations. This is incorrect and redundant, respectivelySetting layer=-1 on all waterways in Iceland that the JOSM validator complained about in the Crossing ways test. Hopefully all of these cross under some highway and it's now unambiguous what that means
validator.TagChecker.checkComplexBeforeUpload=false
validator.TagChecker.checkFixmesBeforeUpload=false
validator.TagChecker.checkKeysBeforeUpload=false
validator.TagChecker.checkValuesBeforeUpload=false
validator.TagChecker.paintBeforeUpload=false
validator.tests=Coastlines=true,SimilarNamedWays=true,UntaggedNode=true,CrossingWays=true,NodesWithSameName=true,TagChecker=true,OverlappingWays=true,UnclosedWays=true,WronglyOrderedWays=true,UnconnectedWays=true,SelfIntersectingWay=true,DuplicatedWayNodes=true,NameMismatch=true,DuplicateWay=true,UntaggedWay=true,DuplicateNode=true
validator.testsBeforeUpload=Coastlines=false,SimilarNamedWays=false,UntaggedNode=false,CrossingWays=false,NodesWithSameName=false,TagChecker=false,OverlappingWays=false,UnclosedWays=false,WronglyOrderedWays=false,UnconnectedWays=false,SelfIntersectingWay=false,DuplicatedWayNodes=false,NameMismatch=true,DuplicateWay=true,UntaggedWay=false,DuplicateNode=false
walkingpapers.last-used-id=bdtgnkvs
wmsplugin.default.html:http://josm.openstreetmap.de/wmsplugin/YahooDirect.html?=true
wmsplugin.default.http://onearth.jpl.nasa.gov/wms.cgi?request_GetMap&layers_global_mosaic&styles_&format_image/jpeg&=true
wmsplugin.default.http://openaerialmap.org/wms/?VERSION_1.0&request_GetMap&layers_world&styles_&format_image/jpeg&=true
wmsplugin.url.0.name=Czech CUZK:KM
wmsplugin.url.0.url=http://wms.cuzk.cz/wms.asp?service=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&LAYERS=kn,def_budovy,prehledky&FORMAT=image/png&TRANSPARENT=TRUE&
wmsplugin.url.1.name=Czech UHUL:ORTOFOTO
wmsplugin.url.1.url=http://geoportal2.uhul.cz/cgi-bin/oprl.asp?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&LAYERS=Ortofoto_cb&STYLES=default&FORMAT=image/jpeg&TRANSPARENT=TRUE&
wmsplugin.url.10.name=Terraserver Urban
wmsplugin.url.10.url=http://terraservice.net/ogcmap.ashx?version=1.1.1&request=GetMap&Layers=urbanarea&styles=&format=image/jpeg&
wmsplugin.url.11.name=TilesAtHome
wmsplugin.url.11.url=html:http://josm.openstreetmap.de/wmsplugin/TilesAtHome.html?
wmsplugin.url.12.name=Yahoo Sat
wmsplugin.url.12.url=html:http://josm.openstreetmap.de/wmsplugin/YahooDirect.html?
wmsplugin.url.2.name=Landsat
wmsplugin.url.2.url=http://onearth.jpl.nasa.gov/wms.cgi?request=GetMap&layers=global_mosaic&styles=&format=image/jpeg&
wmsplugin.url.3.name=NPE Maps
wmsplugin.url.3.url=http://nick.dev.openstreetmap.org/openpaths/freemap.php?layers=npe&
wmsplugin.url.4.name=NPE Maps (Tim)
wmsplugin.url.4.url=http://dev.openstreetmap.org/~timsc/wms2/map.php?
wmsplugin.url.5.name=Open Aerial Map
wmsplugin.url.5.url=http://openaerialmap.org/wms/?VERSION=1.0&request=GetMap&layers=world&styles=&format=image/jpeg&
wmsplugin.url.6.name=OpenCycleMap
wmsplugin.url.6.url=html:http://josm.openstreetmap.de/wmsplugin/OpenCycleMap.html?
wmsplugin.url.7.name=OpenStreetMap
wmsplugin.url.7.url=html:http://josm.openstreetmap.de/wmsplugin/OpenStreetMap.html?
wmsplugin.url.8.name=Streets NRW Geofabrik.de
wmsplugin.url.8.url=http://tools.geofabrik.de/osmi/view/strassennrw/josmwms?
wmsplugin.url.9.name=Terraserver Topo
wmsplugin.url.9.url=http://terraservice.net/ogcmap.ashx?version=1.1.1&request=GetMap&Layers=drg&styles=&format=image/jpeg&
wmsplugin.url.overlap=false
wmsplugin.url.overlapEast=14
wmsplugin.url.overlapNorth=4

Attachments (0)

Change History (2)

comment:1 Changed 12 years ago by Gubaer

(In [2320]) see #3775: JOSM tries to upload a new relation that references a unuploaded way

comment:2 Changed 12 years ago by Gubaer

Resolution: fixed
Status: newclosed

Could reproduce with simple test cases like one new relation and one new way. Nevertheless, JOSM now sorts new objects before uploading according to their type: nodes before ways, ways before relations.

This should fix the issue. Could you post a sample file if it happens again?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.