Re: [OSM-dev] mod_tile svn's project variables 1)hardcoded 2)in many files
Jonathan-David SCHRODER wrote: for our project (Geopard) which does indoor outdoor mapping, we need zoom levels up to 24 or so. mod_tile's svn's render_config.h defines a constand #define MAX_ZOOM 18 (and also MIN_ZOOM) but this constant is used in only 2 or so files and the rest of max zoom values are hardcoded (just grep for 18 in the svn and you will find them)... The only 2 hardcoded z18 references I could find for renderd/mod_tile proper were in gen_tile.cpp. The other references are in the python support scripts, none of which play a crucial role in normal renderd operation. Unless you use renderd.py instead of renderd, that is. There is another hardcoded 18 in there. I increased my renderd to z19 for haiti related tiles, and that was as easy as changing those 2 hardcoded '18' occurences and the MAX_ZOOM define to 19. -- Lennard ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Import error using osm2pgsql in slim mode
I'm working with osm2pgsql (latest trunk version) to import OSM into a PostgreSQL/PostGIS database. The issue I'm having is that if I use the --slim option I'll occasionally get an error similar to: Going over pending relations COPY_END for COPY osm_rels FROM STDIN; failed: ERROR: duplicate key value violates unique constraint osm_rels_pkey CONTEXT: COPY osm_rels, line 1207: 2841320323 {42198453,20559277,20559273,20558263,20494565,40702583,19846737,19826462,20582455,20585... If I don't use slim mode, it seems to always work. Right now I'm just testing with state snapshots from http://downloads.cloudmade.com/, but I'd like to be able to import the whole OSM planet database and I'd really like to be able to use slim mode so I can do incremental updates and reduce the memory requirements for importing. If I remember correctly this error occurs when you try to import two data sets which contain some overlapping data. In your case it appears that relation ID 284132 appears in both the data extracts. Only the slim mode keeps a copy of this node/way/relation data and triggers this error. You could try the attached patch to osm2pgsql. This makes it treat all new data as a modify operation which should avoid problems caused by duplicate data. Unfortunately this makes the data import process significantly slower so I won't be applying this change to the trunk code. I will think about adding this as a new command line option and try to figure out if there is something that can be done to reduce the performance penalty. Jon Index: osm2pgsql.c === --- osm2pgsql.c (revision 19148) +++ osm2pgsql.c (working copy) @@ -137,7 +137,7 @@ actions_t new_action = ACTION_NONE; xmlChar *action = xmlTextReaderGetAttribute( reader, BAD_CAST action ); if( action == NULL ) -new_action = ACTION_CREATE; +new_action = ACTION_MODIFY; else if( strcmp((char *)action, modify) == 0 ) new_action = ACTION_MODIFY; else if( strcmp((char *)action, delete) == 0 ) @@ -160,7 +160,7 @@ if (xmlStrEqual(name, BAD_CAST osm)) { filetype = FILETYPE_OSM; -action = ACTION_CREATE; +action = ACTION_MODIFY; } else if (xmlStrEqual(name, BAD_CAST osmChange)) { ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Import error using osm2pgsql in slim mode
Hi John, Thanks for the patch, I will give it a test this weekend! I think it would be a decent option on the command line if it works out well. Jason On Fri, Jan 22, 2010 at 6:38 PM, Jon Burgess jburgess...@googlemail.comwrote: I'm working with osm2pgsql (latest trunk version) to import OSM into a PostgreSQL/PostGIS database. The issue I'm having is that if I use the --slim option I'll occasionally get an error similar to: Going over pending relations COPY_END for COPY osm_rels FROM STDIN; failed: ERROR: duplicate key value violates unique constraint osm_rels_pkey CONTEXT: COPY osm_rels, line 1207: 2841320323 {42198453,20559277,20559273,20558263,20494565,40702583,19846737,19826462,20582455,20585... If I don't use slim mode, it seems to always work. Right now I'm just testing with state snapshots from http://downloads.cloudmade.com/, but I'd like to be able to import the whole OSM planet database and I'd really like to be able to use slim mode so I can do incremental updates and reduce the memory requirements for importing. If I remember correctly this error occurs when you try to import two data sets which contain some overlapping data. In your case it appears that relation ID 284132 appears in both the data extracts. Only the slim mode keeps a copy of this node/way/relation data and triggers this error. You could try the attached patch to osm2pgsql. This makes it treat all new data as a modify operation which should avoid problems caused by duplicate data. Unfortunately this makes the data import process significantly slower so I won't be applying this change to the trunk code. I will think about adding this as a new command line option and try to figure out if there is something that can be done to reduce the performance penalty. Jon ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev