[OSM-dev] Potlatch - Richard... I know

Stefan de Konink stefan at konink.de
Tue Mar 31 01:27:06 BST 2009


Could anyone with knowledge in ruby *pretty please* take a look at the 
source code and invent some wheel that Potlatch will never 'reupdate' 
duplicate k/v-pairs by itself.

So to make everything clear:

1) I don't care that the wrapper layer screws up [so be it]
2) But if the object is touched again by Potlatch, it will automatically 
unique the k-v pair combinations.


I mean; how difficult can it be? Use < as delimiter, (since it can never 
be used in key or value tag), join key and value, now uniquely sort the 
list, split again on the delimiter, update the object.



In the last few days we are talking about:
3996175, 24612058, 32295369, 32300488, 32501209

I have already solved it;

+----+----------+------------+------------------------------------------------+
| L1 | way      | k          | v 
       |
+====+==========+============+================================================+
|  2 |  3996175 | name       | The Park 
       |
|  2 |  3996175 | highway    | residential 
       |
|  2 |  3996175 | created_by | Potlatch 0.10f 
       |
|  2 | 24612058 | name:he    | פתח-תקווה 
       |
|  2 | 24612058 | created_by | Potlatch 0.10f 
       |
|  2 | 24612058 | name       | פתח-תקווה 
       |
|  2 | 24612058 | highway    | tertiary 
       |
|  2 | 24612058 | name:en    | Petach Tikvah 
       |
|  2 | 24612058 | oneway     | true 
       |
|  2 | 32295369 | created_by | Potlatch 0.10f 
       |
|  2 | 32300488 | name       | Ewenny River 
       |
|  2 | 32300488 | boat       | no 
       |
|  2 | 32300488 | created_by | Potlatch 0.10f 
       |
|  2 | 32300488 | waterway   | river 
       |
|  2 | 32300488 | note       | Very approximate course - only known 
points    |
:    :          :            : are the road-bridges! 
       :
|  2 | 32501209 | created_by | Potlatch 0.10f 
       |
+----+----------+------------+------------------------------------------------+



...in the mean time i'll set up a Ruby benchmark for MySQL/PostgreSQL 
and if in time done MonetDB. Using 0.6.


Stefan




More information about the dev mailing list