[OSM-talk] Way creation fails with no tags

Immanuel Scholz immanuel.scholz at gmx.de
Fri Jul 7 19:53:54 BST 2006


Hi,


>> > But I think it is strange that nobody else seems to have problems
>> > creating ways.  Is nobody creating ways this week?
>>
>> I've created lots.
>> Tried running ethereal or tcpdump to see what is actually being sent?
>>
>> Request:
>> PUT /api/0.3/way/0 HTTP/1.1
>> User-Agent: Java/1.5.0_06
>> Host: www.openstreetmap.org
>> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
>> Connection: keep-alive
>> Authorization: Basic
>> SSdtIG5vdCB0aGF0IHN0dXBpZCB0byBsZWF2ZSBteSBwYXNzd29yZCBoZXJlIDop
>> Content-Length: 259
>>
>> <?xml version='1.0' encoding='UTF-8'?>
>> <osm version='0.3' generator='JOSM'>
>>    <way id='0'>
>>      <seg id='545503' />
>>      <seg id='545504' />
>>      <seg id='545505' />
>>      <tag k='name' v='test way' />
>>      <tag k='created_by' v='JOSM' />
>>    </way>
>> </osm>
>
> I have now tested more and it succeeds if I have at least one segment
> AND one tag.  The requirement for one tag was not intuitive at all.
> If there is a requiremnt for one segment and onte tag or for one
> segment could that be documented on the API-page by somebody that
> knows about the intention.

This is not the intention, but a bug for sure. I though the error sql
statement came from the missing segments (would make sense to me ;-) but
it looks like it come from the insert into the tag table.

The errorous place is in dao.rb on line 982 to 990 (for Revision 1133). I
think these lines should be placed in "unless tags.empty? do ... end"
statements.

But currently I cannot try anything from here (and cannot update the
server anyway), so I wait for Steve to read this ;-)



Ciao, Imi





More information about the talk mailing list