Вы находитесь на странице: 1из 3

Osmosis/Installation - OpenStreetMap Wiki

Create account Log in

Page Discussion

Read View source View history

Go

Search

Search

Osmosis/Installation
< Osmosis
site
Main Page
The map
Map Features
Contributors
Help
Blogs
Shop
Donations
Recent changes
Tools


Available languages

Help

Deutsch English italiano


Other languages Help us translating this wiki
Afrikaans Alemannisch

asturianu azrbaycanca
bosanski
brezhoneg catal etina corsu dansk
eesti espaol Esperanto euskara franais
Frysk Gaeilge Gidhlig galego
Hausa
hrvatski Igbo Bahasa Indonesia
interlingua isiXhosa isiZulu slenska Basa Jawa

Kiswahili Kreyl ayisyen


Kryl gwadloupyen Kurd
latvieu Ltzebuergesch lietuvi magyar Malagasy
Malti

Bahasa Melayu Baso Minangkabau


Nederlands
norsk bokml
norsk nynorsk occitan
Oromoo ozbekcha

polski portugus portugus do Brasil
romn shqip
slovenina slovenina Soomaaliga / srpski suomi svenska

Trke Vahcuengh Ting Vit Wolof Yorb Zazaki


What links here


Related changes

Osmosis installation is usually quite straightforward and lightweight. Osmosis is only a small command line tool after all,

Special pages

however it does require java on your system. This page gives instructions for installing osmosis on different operating

Printable version

systems as well as general information on #environment variables and config files

Permanent link
Page information
Cite this page

Contents
1 Installing pre-built Osmosis
1.1 Linux
1.2 Windows
2 Building from source
2.1 Requirements
2.2 Steps
3 Debian
3.1 Stable, Testing, SID
3.2 Unofficial backports
4 OS X
4.1 OS X 10.5 or earlier
4.2 Homebrew
5 Environment variables and config files

Installing pre-built Osmosis


Linux

wget http://bretth.dev.openstreetmap.org/osmosis-build/osmosislatest.tgz
tar xvfz osmosis-latest.tgz
cd osmosis-*
chmod a+x bin/osmosis
bin/osmosis

Windows
See Osmosis/Quick_Install_(Windows)

Building from source


Requirements
Building Osmosis from source currently requires at least Java Development Kit 1.6 (see Osmosis#Notes for details), Junit,
ant, and ant-optional.

Steps

cd ~/src

http://wiki.openstreetmap.org/wiki/Osmosis/Installation[2015-04-14 11:04:25]

Osmosis/Installation - OpenStreetMap Wiki

git clone git://github.com/openstreetmap/osmosis.git


cd osmosis
./gradlew assemble
Osmosis does not build with 'ant' anymore. Please see the readme file:
https://github.com/openstreetmap/osmosis/blob/master/README

for usage with gradlew.

The compiled package can then be run:

package/bin/osmosis
For up-to-date instructions, see the readme file: https://github.com/openstreetmap/osmosis/blob/master/README

Debian
Stable, Testing, SID
Osmosis is in debian since the Squeeze release, actually in 0.34

version. If you use debian stable, testing or sid you can

install osmosis as simple as:

apt-get install osmosis

Unofficial backports
Rodolphe Quideville maintains an unofficial backport of osmosis for Debian stable that you can reach on
http://rodolphe.quiedeville.org/debian/
Add the following line is your sources.list file to use it:

deb http://rodolphe.quiedeville.org/debian/

squeeze-backports main

OS X
OS X 10.5 or earlier
Running osmosis on Mac OS X 10.5 requires switching the Java framework to 1.6 (from the 1.5 default) by setting the shell
variable JAVACMD before executing osmosis. This works on 2007 MacBook Pro Dual Core 2.44MHz and later.

export
JAVACMD="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
-Xmx128m"
Alternative: Installation instructions for OS X 10.5 are same as above, except with the caveat that Java 1.6 is currently only
supported on 64-bit Intel machines. You could try SoyLatte

instead.

Homebrew
Package manager homebrew

has a 'recipe' for osmosis. To install the latest stable version, do

brew install osmosis

Environment variables and config files


Things may well run OK without changing the defaults, but you can configure JVM Options and other osmosis defaults by
setting environment variables which are picked up by the bin/osmosis script (tacked on to the java command which is
invoked there)

JAVACMD - The java command to launch osmosis.


JAVACMD_OPTIONS - The options to append to the java command, typically used to modify JVM settings such as max
memory.

OSMOSIS_OPTIONS - The options to apply to all osmosis invocations, typically used to add plugins or make quiet
operation the default.
To set an environment variable in the scope of your current terminal, just do a command such as:

http://wiki.openstreetmap.org/wiki/Osmosis/Installation[2015-04-14 11:04:25]

Osmosis/Installation - OpenStreetMap Wiki

export JAVACMD_OPTIONS=-Xmx2G
(This example will bump up the amount of available memory for Java up to 2GB. See Osmosis/Tuning for details)
But if you want to save this so that it happens every time you run osmosis, put the command in a config file. The start-up
script looks for a config file at a couple of different possible locations:

/etc/osmosis - (no file extension) This applies to all users on a *nix system.
~/.osmosis - (no file extension) This applies to just your user on a *nix system.
%ALLUSERSPROFILE%\osmosis.bat - This applies to all users on a windows system.
%USERPROFILE%\osmosis.bat - This applies to just your user on a windows system.
Fo example if you want to set the memory and the temporary file use you may enter this line into the config file:

export JAVACMD_OPTIONS="-Xmx2G -Djava.io.tmpdir=/mnt/database/tmp/"

Categories: Technical

Osmosis

This page was last modified on 2 November 2014, at 00:06.


Content is available under Creative Commons Attribution-ShareAlike 2.0 license unless otherwise noted.
Privacy policy

About OpenStreetMap Wiki

http://wiki.openstreetmap.org/wiki/Osmosis/Installation[2015-04-14 11:04:25]

Disclaimers

Вам также может понравиться