[openstreetmap/openstreetmap-website] suggested modifications in INSTALL and CONFIGURE files

Jean-Claude Jouffre jean-claude.jouffre at univ-savoie.fr
Fri Dec 2 15:26:30 UTC 2016


Hello Tom,

Thanks again for your quick answers.

Le 02/12/2016 à 12:41, Tom Hughes a écrit :
> I don't really want to be telling to people to install Node.js and npm
> for something that's entirely optional and doesn't matter at all.
>
> I can't see anything that mentions `--no-svgo` which is good because it
> would be complete nonsense. Rails knows nothing about svgo as such.

As I am an osm beginner, when I encounter an error message, I am not 
able to understand if it will have bad consequences or not.

The only reference to svgo is the line 'svgo:' in the 
config/image_optim.yml file, following other parameters configured to 
false (e.g. jpegtran: false).

But when I try to set it to false ('svgo: false' in image_optim.yml), 
the next time I run trails server, it fails :
/var/lib/gems/2.0.0/gems/psych-2.1.1/lib/psych.rb:379:in `parse': 
(/data/openstreetmap-website/config/image_optim.yml): mapping values are 
not allowed in this context at line 12 column 18 (Psych::SyntaxError)

So chances are the best choice is to have the 'svgo not found' message 
at the console and keep the osm web site available.

>
>> 2) CONFIGURE.md
>>
>> if you populate the database using the osmosis example, then your users
>> table becomes inconsistant :
>> - the users table is filled with a lot of records (5,338)
>> - but the associated sequence users_id_seq remains to 1
>>
>> So the next step (to create a user by signing up to the local website)
>> will fail.
>>
>> The workaround is to manually configure the sequence, requesting the
>> greatest value of id users then configuring the sequence above :
>> su - postgres
>>   psql openstreetmap
>>     select max(id) from users;
>>       -> 4900009
>>     alter sequence users_id_seq restart with 5000000;
>>     \q
>
> Try to populate the database using omsosis is not recommended and we
> should probably just remove that. As you've discovered it doesn't really
> work.

If I properly read the CONFIGURE file, an alternative could be osm2pgsql.

But I already used it to build a tile server as described here :
https://switch2osm.org/fr/servir-des-tuiles/mettre-en-place-manuellement-un-serveur-de-tuiles-12-04/
in the "Loading data into your server" item.

It has filled postgis tables planet_osm_xxx and not the postgres tables 
described in rails port/database schema.

So, would be osm2pgsql be smart enough to fill both schemas ? Do you 
advice another way to fill in the data ?

And last, if we only fill the rails port tables (for the web site), is 
there a trick to automatically populate postgis tables too (for the tile 
server) ?

J.C.



More information about the rails-dev mailing list