[OSM-dev] Daily diff fails to import

Adrian Chapela achapela.rexistros at gmail.com
Fri May 27 12:09:28 BST 2011


Hello,

I was reading your suggestions and I decide to start with this, a new
fresh database! I haved downloaded
http://download.geofabrik.de/osm/south-america/brazil.osm.bz2 , to start
with a new database and a new country. I followed all steps again and I
have the same issue... I don't know why...

osm2pgsql -las -C 2000 -O gazetteer -U postgres -d gazetteer2
./planet.openstreetmap.org/daily/20110526-20110527.osc.gz -W
osm2pgsql SVN version 0.70.5

Password:
Using projection SRS 4326 (Latlong)
Mid: pgsql, scale=10000000, cache=2000MB, maxblocks=256001*8192
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels

Reading in file:
/home/achapela/planet.openstreetmap.org/daily/20110526-20110527.osc.gz
COPY_END for place failed: ERROR:  operator is not unique: geometry <>
geometry
LINE 5:      OR (existing.geometry != NEW.geometry AND ST_Distance(S...
                                   ^
HINT:  Could not choose a best candidate operator. You might need to add
explicit type casts.
QUERY:  SELECT existing.osm_type IS NULL
     OR existingplacex.osm_type IS NULL
     OR coalesce(existing.admin_level, 100) != coalesce(NEW.admin_level,
100)
--     OR coalesce(existing.country_code, '') !=
coalesce(NEW.country_code, '')
     OR (existing.geometry != NEW.geometry AND
ST_Distance(ST_Centroid(existing.geometry),ST_Centroid(NEW.geometry)) >
0.01 AND NOT
     (ST_GeometryType(existing.geometry) in
('ST_Polygon','ST_MultiPolygon') AND ST_GeometryType(NEW.geometry) in
('ST_Polygon','ST_MultiPolygon')))
CONTEXT:  PL/pgSQL function "place_insert" line 52 at IF
COPY place, line 1: "\N    N    194324    highway    traffic_lights   
\N    100    \N    \N    \N    \N    \N    \N    \N    \N    \N   
SRID=4326;POINT(-1.0657087 50.8..."

Error occurred, cleaning up

I will try to install a new version of postgis, now I am using
Postgresql 9.0 and Postgis 1.5.1.

Regards.

En 26/05/11 15:58, Yoanis Gil Delgado escribiu:
> Hi Adrian,
>
> I think I have ran into similar issues. In my case, I skipped a few
> steps and ran into also sort of *weird* issues. Is your database
> properly setup? Try going over the steps here:
>
> http://wiki.openstreetmap.org/wiki/Nominatim/Installation
>
> using a fresh database.
>
> Regards,
>
> Yoanis.
>
> On Thu, May 26, 2011 at 9:34 AM, Adrian Chapela
> <achapela.rexistros at gmail.com> wrote:
>> I am trying to import a daily diff and is impossible. I have tried with
>> util.update.php and the result is the same.
>>
>> Now I am trying to the next command. Below you coud see the output.
>>
>> osm2pgsql -as -O gazetteer -d gazetteer -U postgres -W
>> 20110405-20110406.osc.gz
>> osm2pgsql SVN version 0.70.5
>>
>> Password:
>> Using projection SRS 900913 (Spherical Mercator)
>> Mid: pgsql, scale=100, cache=800MB, maxblocks=102401*8192
>> Setting up table: planet_osm_nodes
>> Setting up table: planet_osm_ways
>> Setting up table: planet_osm_rels
>>
>> Reading in file: 20110405-20110406.osc.gz
>> COPY_END for place failed: ERROR:  operator is not unique: geometry <>
>> geometry
>> LINE 5:      OR (existing.geometry != NEW.geometry AND ST_Distance(S...
>>                                   ^
>> HINT:  Could not choose a best candidate operator. You might need to add
>> explicit type casts.
>> QUERY:  SELECT existing.osm_type IS NULL
>>     OR existingplacex.osm_type IS NULL
>>     OR coalesce(existing.admin_level, 100) != coalesce(NEW.admin_level,
>> 100)
>> --     OR coalesce(existing.country_code, '') !=
>> coalesce(NEW.country_code, '')
>>     OR (existing.geometry != NEW.geometry AND
>> ST_Distance(ST_Centroid(existing.geometry),ST_Centroid(NEW.geometry)) >
>> 0.01 AND NOT
>>     (ST_GeometryType(existing.geometry) in
>> ('ST_Polygon','ST_MultiPolygon') AND ST_GeometryType(NEW.geometry) in
>> ('ST_Polygon','ST_MultiPolygon')))
>> CONTEXT:  PL/pgSQL function "place_insert" line 52 at IF
>> COPY place, line 1: "\N    N    443853    highway    bus_stop
>>  {"(\\"name\\",\\"Neumarkt\\")"}    100    \N    \N    \N    \N    \N
>>  \N    \N    \N    \N    SRID=900..."
>>
>> Error occurred, cleaning up
>>
>>
>> PostgreSQL server version is 9.0 and 8.4.7. I only want to import it to
>> use with nominatim but I can't... it is very extrange. I was looking for
>> the operator != isn't in the database....
>>
>> Have you any idea ?
>>
>> Regards.
>>
>> _______________________________________________
>> dev mailing list
>> dev at openstreetmap.org
>> http://lists.openstreetmap.org/listinfo/dev
>>




More information about the dev mailing list