Osm2pgsql options trading
Benchmarks of osm2pgsql are important metrics for users to reference because importing OSM data is highly dependent on machine hardware and software configurations. Importing a complete planet file can take days even on a typical higher end desktop machine.
Importing an extract subset of the planet file can take considerably osm2pgsql options trading time to import and should be used if osm2pgsql options trading for your import instead of the planet file. The following is sample output generated while importing a planet file using osm2pgsql for reference.
The linux time command was used in this example to output the amount of time it took for osm2pgsql to finish. If you want to know how far the import has gone, see the statistics and compare it with "Processing: Node" section of the output. Note that processing relation takes approximately 10 times as processing a way which takes approximately 10 times processing a node.
In my case, nodes were processed at Also, closing a table take approximately as long as importing the data. List of benchmarks contributed by users. Currently simply using time command to return length of time' it takes osm2pgsql task to complete. If you do not have time available please provide some other meaningful metric. Better organization and formatting standard for this section is needed.
While import performance was of great importance when it took weeks, today it is really more interesting to improve the time it takes to catch up and update the database. For example in the above example it takes 24 hours to import and much longer to catch up with the current diffs. Even assuming a planet dump can be downloaded in a couple of hours, an installation will have to catch up at least the 3 days it takes to osm2pgsql options trading produce the dump.
Further experience shows that rendering and updating tend to impact eachother leading to installations falling substantially behind over time. To see if this is actually the case I ran a further import on above HW osm2pgsql options trading the persitent node cache enabled and updated the DB for a while.
As a further comparision numbers from the fastet installation I currently have Intel E Persistent node cache located on Osm2pgsql options trading SSD. See full osm2pgsql session. Other languages — Help us translate this wiki. Node k Way k Relation k Node stats: Retrieved from " http: Navigation menu Personal tools English Create account Log in.
Views Read View source View history. This osm2pgsql options trading was last edited on 23 Novemberosm2pgsql options trading
This documentation page was cobbled together from the various locations where documentation for osm2pgsql has been hidden to make it hard to find: The OpenStreetmap Wiki, source readme file, help message and manual page osm2pgsql options trading below. I have also added my own experiences where possible.
The Wiki suggests running decompression and database import in parallel on multi-core machines, like this:. This live database can then be used by rendering programs or the Nominatim geocoder.
OSM planet snapshots can be downloaded from here. Geodata files for various countries and regions "extracts" are available here in the especially small PBF ProtoBufBinary format, and from osm2pgsql options trading sources see reference list in the Wiki. Both schemas were specifically optimized for the purpose they were intended for and they may therefore be less suitable for other general purpose processing. Nevertheless, the osm2pgsql options trading schema might be useful for other purposes as well, and has been used for a variety of additionally purposes.
Osm2pgsql options trading you are completely new to osm2pgsqlyou may prefer to follow a tutorial rather than read the docs. Tile server setup tutorials are linked herea tutorial for creating map tiles for offline use is here.
The downloadable OpenStreetmap data contain the geographical latitude and longitude of nodes which are points out of which all else is composed. When importing the data into a database, osm2pgsql already performs a map projection.
Presumably this serves to prevent duplication of the projection computation later on, as most node coordinates will be needed multiple times when rendering different zoom levels of the same region.
The projection used by default is the Pseudo-Mercator projection, so called because it is osm2pgsql options trading inconsistent and therefore can distort angles very slightly. It is universally used osm2pgsql options trading web map services and also called Web Mercator and spherical Mercator. It can also be explicitly selected with the -m option.
Two other projections can be selected with simple command-line switches. The first, -lis not an actual projection, but stores the latitude and longitude themselves. This may be helpful if you want to query the database yourself using the geocoordinates. The other projection with a dedicated command-line option, WGS84 Mercator -Mis considered obsolete. The WGS84in case you wondered, stands for today's standard ellipsoid used to approximate the earth's surface. In addition, osm2pgsql can create the database using any projection known to the proj program that converts plain-text coordinate files between projections.
It is an indirect dependency osm2pgsql options trading osm2pgsqlso it has to be osm2pgsql options trading. The osm2pgsql option -E allows to choose any of them by number. The projections with dedicated options can also be represented as EPSG projections:. In order to do manual conversions with projyou need not enter the whole SRS string.
The default OpenStreetmap rendering style for Mapnik assumes the default Pseudo-Mercator projection, so you probably want to stick with that unless you have special needs. Options related to an osm2pgsql options trading hstore-type column for tags.
These option requires that the hstore extension has been enabled in the database see below. In the example above, postgres is the user of the database, the user enabled slim mode generally recommended. For more advanced and larger datasets, read the Optimization section.
This requires access as the database administrator, normally the postgres user. It is generally best to run the latest released versions if possible. The default name for this database is gis but this may be changed by using osm2pgsql 's --database option.
This is setup by default on many Unix installs but does not work on Windows due to osm2pgsql options trading lack of unix sockets. Some example commands are given below but you may also want to look at this wiki page.
The version numbers in the osm2pgsql options trading will vary. The spatial reference system is not normally included with PostGIS. To add it you should run the Osm2pgsql options trading script that comes with osm2pgsql:. If you want to use osm2pgsql options trading support then you will also need to enable the PostgreSQL hstore extension:.
On PostgreSQL versions before 9. The values you need to set will depend on the hardware you have available, but you will likely need to increase the values for the following parameters: See also this Talk by Frederik Ramm: Please report bugs to the github tracker. Any questions should be directed at the OSM dev list.