This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Finding relation between Nominatim row and gb_postcode table row?

0

Currently I have PgAdmin 3 open with a copy of the Nominatim DB I processed on a Linux virtual machine. I imported the gb_postcode.sql database successfully from the Nominatim documentation but I'm struggling to find a way to match a row in my main placex table in Nominatim to my gb_postcode table that's been imported.

Both tables provide a Geometry row, of which I tried using ST_Intersection on but the result was beyond inaccurate (returned 1.6m records rather than a single one, or a small subset of data).

Is there any way currently that will allow me to find a relationship between a Geometry object in a Nominatim record (such as 0102000020E61000000500000014A5CEED6F5A01C07D6F78E68A1A4A4091E398767B5A01C08A517C21891A4A404221020EA15A01C02E05FFB6821A4A405698631E9E5A01C0CBC1C7BB7E1A4A40A53D14BB6C5A01C026A36F777B1A4A40) and the Geometry object in the gb_postcode table (such as 0101000020E61000005D96EA24715B01C0A76FB0828F1A4A40)?

For examples sake, these two Geometry values are matching for the same street in the UK, but I'm struggling to relate them programmatically.

Thanks in advance.

asked 04 Oct '16, 14:29

JamesGould's gravatar image

JamesGould
19691020
accept rate: 33%

Source code available on GitHub .