[OSM-dev] Daily diff fails to import
openstreetmap at brian.quinion.co.uk
Thu May 26 18:57:57 BST 2011
On 26 May 2011 18:46, Sandro Santilli <strk at keybit.net> wrote:
> On Thu, May 26, 2011 at 06:17:47PM +0100, Brian Quinion wrote:
> > Adrian,
> > I had this occur once with a schema that I had updated between
> > versions of postgis. I never did entirely get to the bottom of it - I
> > ended up adding ::text in a similar way to what Sandro suggested.
> > i.e.:
> > existing.geometry::text != NEW.geometry::text
> > It was a crude hack (and probably hurt performance) and didn't seem to
> > be needed the result of the time so I never committed it.
> I'm sure binary tree operators used to do bounding box checks.
> Your ::text cast instead would do a bitwise comparison.
> There are few ways to compare geometries, and with recent versions
> also Hausdorf distance for similarities.
I said it was a crude hack not worth commiting - you don't have to convince
me. I can however confirm that it definitely works and fixes the error as
given. The bitwise comparison isn't that horrible in this case since we are
only interested in a perfect equivalence not a geometric relationship.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev