Le 20/03/2013 15:06, sly (sylvain letuffe) a écrit :
On mercredi 20 mars 2013, Vincent Pottier wrote:
Merci pour vos conseils.
Je suggère de passer sur la liste dev-fr (en copie de ce mail)

peux-tu renvoyer :
$ osm2pgsql -h

et le full log de ta tentative d'import
Peux tu tenter avec un fichier .osm.bz2 tout petit (genre corse.osm.bz2) ?

osm2pgsql -h

donne
---
osm2pgsql SVN version 0.81.0 (64bit id space)

Usage:
    osm2pgsql [options] planet.osm
    osm2pgsql [options] planet.osm.{gz,bz2}
    osm2pgsql [options] file1.osm file2.osm file3.osm

This will import the data from the OSM file(s) into a PostgreSQL database
suitable for use by the Mapnik renderer

Options:
   -a|--append        Add the OSM file into the database without removing
                      existing data.
   -b|--bbox        Apply a bounding box filter on the imported data
                      Must be specified as: minlon,minlat,maxlon,maxlat
                      e.g. --bbox -0.5,51.25,0.5,51.75
   -c|--create        Remove existing data from the database. This is the
                      default if --append is not specified.
   -d|--database    The name of the PostgreSQL database to connect
                      to (default: gis).
   -i|--tablespace-index    The name of the PostgreSQL tablespace where
                      all indexes will be created.
The following options allow more fine-grained control:
      --tablespace-main-data     tablespace for main tables
      --tablespace-main-index    tablespace for main table indexes
      --tablespace-slim-data     tablespace for slim mode tables
      --tablespace-slim-index    tablespace for slim mode indexes
(if unset, use db's default; -i is equivalent to setting
                      --tablespace-main-index and --tablespace-slim-index)
   -l|--latlong        Store data in degrees of latitude & longitude.
   -m|--merc        Store data in proper spherical mercator (default)
   -M|--oldmerc        Store data in the legacy OSM mercator format
   -E|--proj num    Use projection EPSG:num
   -u|--utf8-sanitize    Repair bad UTF8 input data (present in planet
                    dumps prior to August 2007). Adds about 10% overhead.
   -p|--prefix        Prefix for table names (default planet_osm)
   -s|--slim        Store temporary data in the database. This greatly
reduces the RAM usage but is much slower. This switch is
                    required if you want to update with --append later.
                    This program was compiled on a 32bit system, so at most
                    3GB of RAM will be used. If you encounter problems
                    during import, you should try this switch.
--drop only with --slim: drop temporary tables after import (no updates). -S|--style Location of the style file. Defaults to /usr/share/osm2pgsql/osm2pgsql/default.style
   -C|--cache        Now required for slim and non-slim modes:
Use up to this many MB for caching nodes (default: 800)
   -U|--username    Postgresql user name
password can be given by prompt or PGPASS environment variable.
   -W|--password    Force password prompt.
   -H|--host        Database server hostname or socket location.
   -P|--port        Database server port.
   -e|--expire-tiles [min_zoom-]max_zoom    Create a tile expiry list.
   -o|--expire-output filename    Output filename for expired tiles list.
   -r|--input-reader    Input frontend.
                      libxml2   - Parse XML using libxml2. (default)
                      primitive - Primitive XML parsing.
                      pbf       - OSM binary format.
   -O|--output        Output backend.
                      pgsql - Output to a PostGIS database. (default)
gazetteer - Output to a PostGIS database suitable for gazetteer
                      null  - No output. Useful for testing.
   -x|--extra-attributes
                      Include attributes for each object in the database.
This includes the username, userid, timestamp and version. Note: this option also requires additional entries in your style file. -k|--hstore Add tags without column to an additional hstore (key/value) column to postgresql tables --hstore-match-only Only keep objects that have a value in one of the columns - (normal action with --hstore is to keep all objects) -j|--hstore-all Add all tags to an additional hstore (key/value) column in postgresql tables -z|--hstore-column Add an additional hstore (key/value) column containing all tags that start with the specified string, eg --hstore-column "name:" will produce an extra hstore column that contains all name:xx tags -G|--multi-geometry Generate multi-geometry features in postgresql tables. -K|--keep-coastlines Keep coastline data rather than filtering it out. By default natural=coastline tagged data will be discarded based on the assumption that post-processed Coastline Checker shapefiles will be used. --number-processes Specifies the number of parallel processes used for certain operations
                     Default is 1
-I|--disable-parallel-indexing Disable indexing all tables concurrently. --unlogged Use unlogged tables (lost on crash but faster). Requires PostgreSQL 9.1.
      --cache-strategy    Specifies the method used to cache nodes in ram.
                              Available options are:
dense: caching strategy optimised for full planet import chunked: caching strategy optimised for non-contigouse memory allocation sparse: caching strategy optimised for small extracts optimized: automatically combines dense and sparse strategies for optimal storage efficiency. optimized may use twice as much virtual memory, but no more physical memory
                                 The default is "chunked"
--flat-nodes Specifies the flat file to use to persistently store node information in slim mode instead of in pgsql This file is a single > 16Gb large file. This method is only recomended for full planet imports as it doesn't work well with small extracts. The default is disabled
   -h|--help        Help information.
   -v|--verbose        Verbose output.

Add -v to display supported projections.
Use -E to access any espg projections (usually in /usr/share/proj/epsg)
---
$ ./france.osm2sql.sh
osm2pgsql SVN version 0.81.0 (64bit id space)

Using projection SRS 4326 (Latlong)
Setting up table: france_point
NOTICE:  table "france_point" does not exist, skipping
NOTICE:  table "france_point_tmp" does not exist, skipping
Setting up table: france_line
NOTICE:  table "france_line" does not exist, skipping
NOTICE:  table "france_line_tmp" does not exist, skipping
Setting up table: france_polygon
NOTICE:  table "france_polygon" does not exist, skipping
NOTICE:  table "france_polygon_tmp" does not exist, skipping
Setting up table: france_roads
NOTICE:  table "france_roads" does not exist, skipping
NOTICE:  table "france_roads_tmp" does not exist, skipping
Allocating memory for dense node cache
Allocating dense node cache in block sized chunks
Node-cache: cache=2000MB, maxblocks=0*256001, allocation method=8192
Mid: pgsql, scale=10000000 cache=2000
Setting up table: france_nodes
NOTICE:  table "france_nodes" does not exist, skipping
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "france_nodes_pkey" for table "france_nodes"
Setting up table: france_ways
NOTICE:  table "france_ways" does not exist, skipping
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "france_ways_pkey" for table "france_ways"
Setting up table: france_rels
NOTICE:  table "france_rels" does not exist, skipping
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "france_rels_pkey" for table "france_rels"

Reading in file: /home/vincent/tmp/france-latest.osm.pbf
Unable to open /home/vincent/tmp/france-latest.osm.pbf
Error occurred, cleaning up

Ça roule pour corse-latest.osm.pbf, comme pour bz2.
Je teste avec france-130319.osm.pbf pour voir s'il n'y a pas un problème de saut de version de fichier durant le téléchargement. (pourtant le md5 était bon)
--
FrViPofm

_______________________________________________
dev-fr mailing list
dev-fr@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev-fr

Répondre à