[OSM-dev] Osmosis Bug Report: Node TileIDs Incorrect
Christopher Schmidt
crschmidt at metacarta.com
Wed Apr 23 04:17:23 BST 2008
On Wed, Apr 23, 2008 at 09:07:50AM +1000, Brett Henderson wrote:
> Oh crap, apparently I didn't test that bit. I never did get the mysql
> extensions installed to compare against.
>
> I doubt if I'll get to this for a few days, bit run off my feet at the
> moment. I don't know what the problem is but perhaps Java is doing some
> unexpected rounding along the way.
That's essentially what I figured. For now, anyone using osmosis to
populate a mysql database should use the update statement at the end of
this post if they want to get accurate results back from API map/bbox
queries.
> Christopher Schmidt wrote:
> > Osmosis creates incorrect tile IDs for some nodes when reading from XML
> > and inserting into MySQL.
> >
> > For the node:
> >
> > <node id="21619242" lat="51.4781325" lon="-0.1474929" user="Osmosis
> > System User" visible="true" timestamp="2007-11-11T09:11:14-05:00">
> >
> > Osmosis generates:
> >
> > 2062265655
> >
> > tile_for_point generates:
> >
> > 16:35:51 < crschmidt> select tile_for_point(514781325,-01474929);
> > 16:35:56 < crschmidt> | tile_for_point(514781325,-01474929) |
> > 16:35:56 < crschmidt> +-------------------------------------+
> > 16:35:56 < crschmidt> | 2062265654 |
> >
> > Updating a table with 115000 nodes in it says:
> >
> > mysql> update current_nodes set tile=tile_for_point(latitude,
> > longitude);
> > Query OK, 103333 rows affected (11.41 sec)
> > Rows matched: 115692 Changed: 103333 Warnings: 0
> >
> > Which means, I guess, that 12000 (~10%) ended up okay, and everything
> > else was (presumably) off by one.
> >
> > Regards,
> >
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
--
Christopher Schmidt
MetaCarta
More information about the dev
mailing list