rename to imposm
parent
f83080c1d0
commit
0ca34413d6
12
.travis.yml
12
.travis.yml
|
@ -97,7 +97,9 @@ before_deploy:
|
||||||
- mkdir -p ${PKG_DIR}/lib
|
- mkdir -p ${PKG_DIR}/lib
|
||||||
|
|
||||||
# copy files
|
# copy files
|
||||||
- cp imposm3 ${PKG_DIR}
|
- cp imposm ${PKG_DIR}
|
||||||
|
- ln -s imposm ${PKG_DIR}/imposm3
|
||||||
|
- cp README.md ${PKG_DIR}
|
||||||
- cp example-mapping.json ${PKG_DIR}/mapping.json
|
- cp example-mapping.json ${PKG_DIR}/mapping.json
|
||||||
|
|
||||||
# copy/link libs
|
# copy/link libs
|
||||||
|
@ -112,9 +114,9 @@ before_deploy:
|
||||||
- chrpath ${PKG_DIR}/lib/libgeos_c.so -r '${ORIGIN}'
|
- chrpath ${PKG_DIR}/lib/libgeos_c.so -r '${ORIGIN}'
|
||||||
|
|
||||||
# create tar.gz
|
# create tar.gz
|
||||||
- BUILD_VERSION=`${PKG_DIR}/imposm3 version`-linux-x86-64
|
- BUILD_VERSION=`${PKG_DIR}/imposm version`-linux-x86-64
|
||||||
- mv ${PKG_DIR} /tmp/imposm3-${BUILD_VERSION}
|
- mv ${PKG_DIR} /tmp/imposm-${BUILD_VERSION}
|
||||||
- cd /tmp && tar zcvf imposm3-${BUILD_VERSION}.tar.gz imposm3-${BUILD_VERSION}
|
- cd /tmp && tar zcvf imposm-${BUILD_VERSION}.tar.gz imposm-${BUILD_VERSION}
|
||||||
|
|
||||||
# move back to build dir for deploy
|
# move back to build dir for deploy
|
||||||
- cd ${TRAVIS_BUILD_DIR}
|
- cd ${TRAVIS_BUILD_DIR}
|
||||||
|
@ -123,7 +125,7 @@ deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
api_key:
|
api_key:
|
||||||
secure: fBhtCy6vdxxxuLYuJWXeTHJb3SAZCCbUJncIvR9ZOLCDWMJAPBnzPoqJFbByWzl6XghVRwhy9fe/82vzqByKiB/AQpqGqBxlwA9dSsqvSQcQxomAoHKKfZVdOuxM2bLDW3v5pJpmFtCMwhWjgwIOb9WxnBVeLxBbsq2Ox49tgHw=
|
secure: fBhtCy6vdxxxuLYuJWXeTHJb3SAZCCbUJncIvR9ZOLCDWMJAPBnzPoqJFbByWzl6XghVRwhy9fe/82vzqByKiB/AQpqGqBxlwA9dSsqvSQcQxomAoHKKfZVdOuxM2bLDW3v5pJpmFtCMwhWjgwIOb9WxnBVeLxBbsq2Ox49tgHw=
|
||||||
file: /tmp/imposm3-${BUILD_VERSION}.tar.gz
|
file: /tmp/imposm-${BUILD_VERSION}.tar.gz
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
on:
|
on:
|
||||||
repo: omniscale/imposm3
|
repo: omniscale/imposm3
|
||||||
|
|
14
Makefile
14
Makefile
|
@ -29,24 +29,24 @@ VERSION_LDFLAGS=-X github.com/omniscale/imposm3.Version=$(BUILD_VERSION)
|
||||||
|
|
||||||
all: build test
|
all: build test
|
||||||
|
|
||||||
imposm3: $(PBGOFILES) $(GOFILES)
|
imposm: $(PBGOFILES) $(GOFILES)
|
||||||
$(GO) build $(GOTAGS) $(GOLDFLAGS) ./cmd/imposm3
|
$(GO) build $(GOTAGS) $(GOLDFLAGS) ./cmd/imposm
|
||||||
|
|
||||||
build: imposm3
|
build: imposm
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f imposm3
|
rm -f imposm
|
||||||
(cd test && make clean)
|
(cd test && make clean)
|
||||||
|
|
||||||
test: imposm3 system-test-files
|
test: imposm system-test-files
|
||||||
$(GO) test $(GOTAGS) -i `$(GO) list ./... | grep -Ev '/vendor'`
|
$(GO) test $(GOTAGS) -i `$(GO) list ./... | grep -Ev '/vendor'`
|
||||||
$(GO) test $(GOTAGS) `$(GO) list ./... | grep -Ev '/vendor'`
|
$(GO) test $(GOTAGS) `$(GO) list ./... | grep -Ev '/vendor'`
|
||||||
|
|
||||||
test-unit: imposm3
|
test-unit: imposm
|
||||||
$(GO) test $(GOTAGS) -i `$(GO) list ./... | grep -Ev '/test|/vendor'`
|
$(GO) test $(GOTAGS) -i `$(GO) list ./... | grep -Ev '/test|/vendor'`
|
||||||
$(GO) test $(GOTAGS) `$(GO) list ./... | grep -Ev '/test|/vendor'`
|
$(GO) test $(GOTAGS) `$(GO) list ./... | grep -Ev '/test|/vendor'`
|
||||||
|
|
||||||
test-system: imposm3
|
test-system: imposm
|
||||||
(cd test && make test)
|
(cd test && make test)
|
||||||
|
|
||||||
system-test-files:
|
system-test-files:
|
||||||
|
|
73
README.md
73
README.md
|
@ -1,16 +1,14 @@
|
||||||
Imposm 3
|
Imposm
|
||||||
========
|
======
|
||||||
|
|
||||||
Imposm is an importer for OpenStreetMap data. It reads PBF files and
|
Imposm is an importer for OpenStreetMap data. It reads PBF files and imports the data into PostgreSQL/PostGIS. It can also automatically update the database with the latest changes from OSM.
|
||||||
imports the data into PostgreSQL/PostGIS. It can also automatically update the database with the latest changes from OSM.
|
|
||||||
|
|
||||||
It is designed to create databases that are optimized for rendering (i.e. generating tiles or for WMS services).
|
It is designed to create databases that are optimized for rendering (i.e. generating tiles or for WMS services).
|
||||||
|
|
||||||
Imposm 3 is written in Go and it is a complete rewrite of the previous Python implementation.
|
Imposm >=3 is written in Go and it is a complete rewrite of the previous Python implementation.
|
||||||
Configurations/mappings and cache files are not compatible with Imposm 2, but they share a similar architecture.
|
Configurations/mappings and cache files are not compatible with Imposm 2, but they share a similar architecture.
|
||||||
|
|
||||||
The development of Imposm 3 was sponsored by [Omniscale](http://omniscale.com/). There are [commercial licenses available for Imposm](http://omniscale.com/opensource/soss) to support the long-term development of Imposm.
|
The development of Imposm is sponsored by [Omniscale](https://omniscale.com/).
|
||||||
There is also commercial support available from Omniscale.
|
|
||||||
|
|
||||||
|
|
||||||
Features
|
Features
|
||||||
|
@ -47,10 +45,10 @@ Features
|
||||||
Limit imported geometries to polygons from GeoJSON, for city/state/country imports.
|
Limit imported geometries to polygons from GeoJSON, for city/state/country imports.
|
||||||
|
|
||||||
- Easy deployment:
|
- Easy deployment:
|
||||||
Single binary with only runtime dependencies to common libs (GEOS, ProtoBuf and LevelDB).
|
Single binary with only runtime dependencies to common libs (GEOS and LevelDB).
|
||||||
|
|
||||||
- Automatic OSM updates:
|
- Automatic OSM updates:
|
||||||
Includes background service (imposm3 run) that automatically downloads and imports the latest OSM changes.
|
Includes background service (`imposm run`) that automatically downloads and imports the latest OSM changes.
|
||||||
|
|
||||||
- Route relations:
|
- Route relations:
|
||||||
Import all relation types including routes.
|
Import all relation types including routes.
|
||||||
|
@ -61,11 +59,9 @@ Features
|
||||||
Performance
|
Performance
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Imposm 3 is much faster than Imposm 2 and osm2pgsql:
|
* Imposm makes full use of all available CPU cores
|
||||||
|
* Imposm uses bulk inserts into PostgreSQL with `COPY FROM`
|
||||||
* Makes full use of all available CPU cores
|
* Imposm uses efficient intermediate caches for reduced IO load during ways and relations building
|
||||||
* Bulk inserts into PostgreSQL with `COPY FROM`
|
|
||||||
* Efficient intermediate cache for reduced IO load during ways and relations building
|
|
||||||
|
|
||||||
|
|
||||||
An import in diff-mode on a Hetzner PX121-SSD server (Intel Xeon E5-1650 v3 Hexa-Core, 256GB RAM and SSD RAID 1) of a 36GB planet PBF (2017-08-10) with generalized tables and spatial indices, etc. takes around 6:30h. This is for an import that is ready for minutely updates. The non-diff mode is even faster.
|
An import in diff-mode on a Hetzner PX121-SSD server (Intel Xeon E5-1650 v3 Hexa-Core, 256GB RAM and SSD RAID 1) of a 36GB planet PBF (2017-08-10) with generalized tables and spatial indices, etc. takes around 6:30h. This is for an import that is ready for minutely updates. The non-diff mode is even faster.
|
||||||
|
@ -76,26 +72,30 @@ Imports without SSDs will take longer.
|
||||||
Current status
|
Current status
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Imposm 3 is used in production but there is no official 3.0 release yet.
|
Imposm is used in production but there is no official 3.0 release yet.
|
||||||
|
Imposm >=3, successor of Imposm 2, was called "Imposm 3" and binaries were named `imposm3` during development. Since April 2018 the project is only called Imposm to allow semantic versioning beyond version 3.
|
||||||
|
The repository will be renamed to github.com/omniscale/imposm in the future.
|
||||||
|
|
||||||
### Planned features ###
|
### Planned features ###
|
||||||
|
|
||||||
There are a few features we like to see in Imposm 3:
|
There are a few features we like to see in Imposm:
|
||||||
|
|
||||||
* Support for other projections than EPSG:3857 or EPSG:4326
|
* Support for other projections than EPSG:3857 or EPSG:4326
|
||||||
* Custom field/filter functions
|
* Custom field/filter functions
|
||||||
* Official releases with binaries for more platforms
|
* Official releases with binaries for more platforms
|
||||||
|
|
||||||
There is no roadmap however, as the implementation of these features largely depends on external funding. There are [commercial licenses available for Imposm](http://omniscale.com/opensource/soss) if you like to help with this development.
|
There is no roadmap however, as the implementation of these features largely depends on external funding.
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
### Binary
|
### Binary
|
||||||
|
|
||||||
There are no official releases, but you find development builds at <http://imposm.org/static/rel/>.
|
[Binary releases are available at GitHub.](https://github.com/omniscale/imposm3/releases)
|
||||||
These builds are for x86 64bit Linux and require *no* further dependencies. Download, untar and start `imposm3`.
|
|
||||||
Imposm 0.5 binaries are compatible with Debian 8, Ubuntu 14.04 and SLES 12 (and newer versions). Older Imposm binaries also support Debian 6, RHEL 6 and SLES 11.
|
These builds are for x86 64bit Linux and require *no* further dependencies. Download, untar and start `imposm`.
|
||||||
|
Binaries are compatible with Debian 8, Ubuntu 14.04 and SLES 12 (and newer versions). Older Imposm binaries (<=0.4) also support Debian 6, RHEL 6 and SLES 11.
|
||||||
|
Older versions are available at <http://imposm.org/static/rel/>.
|
||||||
|
|
||||||
### Source
|
### Source
|
||||||
|
|
||||||
|
@ -107,14 +107,13 @@ You need [Go >=1.6](http://golang.org).
|
||||||
|
|
||||||
#### C/C++ libraries
|
#### C/C++ libraries
|
||||||
|
|
||||||
Other dependencies are [libleveldb][], [libgeos][] and [protobuf][].
|
Other dependencies are [libleveldb][] and [libgeos][].
|
||||||
Imposm 3 was tested with recent versions of these libraries, but you might succeed with older versions.
|
Imposm was tested with recent versions of these libraries, but you might succeed with older versions.
|
||||||
GEOS >=3.2 is recommended, since it became much more robust when handling invalid geometries.
|
GEOS >=3.2 is recommended, since it became much more robust when handling invalid geometries.
|
||||||
|
|
||||||
|
|
||||||
[libleveldb]: https://github.com/google/leveldb/
|
[libleveldb]: https://github.com/google/leveldb/
|
||||||
[libgeos]: http://trac.osgeo.org/geos/
|
[libgeos]: http://trac.osgeo.org/geos/
|
||||||
[protobuf]: https://github.com/google/protobuf
|
|
||||||
|
|
||||||
#### Compile
|
#### Compile
|
||||||
|
|
||||||
|
@ -124,17 +123,17 @@ Create a [Go workspace](http://golang.org/doc/code.html) by creating the `GOPATH
|
||||||
cd go
|
cd go
|
||||||
export GOPATH=`pwd`
|
export GOPATH=`pwd`
|
||||||
|
|
||||||
Get the code and install Imposm 3:
|
Get the code and install Imposm:
|
||||||
|
|
||||||
go get github.com/omniscale/imposm3
|
go get github.com/omniscale/imposm3
|
||||||
go install github.com/omniscale/imposm3/cmd/imposm3
|
go install github.com/omniscale/imposm3/cmd/imposm
|
||||||
|
|
||||||
Done. You should now have an imposm3 binary in `$GOPATH/bin`.
|
Done. You should now have an imposm binary in `$GOPATH/bin`.
|
||||||
|
|
||||||
Go compiles to static binaries and so Imposm 3 has no runtime dependencies to Go.
|
Go compiles to static binaries and so Imposm has no runtime dependencies to Go.
|
||||||
Just copy the `imposm3` binary to your server for deployment. The C/C++ libraries listed above are still required though.
|
Just copy the `imposm` binary to your server for deployment. The C/C++ libraries listed above are still required though.
|
||||||
|
|
||||||
See `packaging.sh` for instruction on how to build binary packages for Linux.
|
See also `packaging.sh` for instructions on how to build binary packages for Linux.
|
||||||
|
|
||||||
#### LevelDB
|
#### LevelDB
|
||||||
|
|
||||||
|
@ -145,36 +144,36 @@ For better performance you can either use [HyperLevelDB][libhyperleveldb] as an
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
`imposm3` has multiple subcommands. Use `imposm3 import` for basic imports.
|
`imposm` has multiple subcommands. Use `imposm import` for basic imports.
|
||||||
|
|
||||||
For a simple import:
|
For a simple import:
|
||||||
|
|
||||||
imposm3 import -connection postgis://user:password@host/database \
|
imposm import -connection postgis://user:password@host/database \
|
||||||
-mapping mapping.json -read /path/to/osm.pbf -write
|
-mapping mapping.json -read /path/to/osm.pbf -write
|
||||||
|
|
||||||
You need a JSON file with the target database mapping. See `example-mapping.json` to get an idea what is possible with the mapping.
|
You need a JSON file with the target database mapping. See `example-mapping.json` to get an idea what is possible with the mapping.
|
||||||
|
|
||||||
Imposm creates all new tables inside the `import` table schema. So you'll have `import.osm_roads` etc. You can change the tables to the `public` schema:
|
Imposm creates all new tables inside the `import` table schema. So you'll have `import.osm_roads` etc. You can change the tables to the `public` schema:
|
||||||
|
|
||||||
imposm3 import -connection postgis://user:passwd@host/database \
|
imposm import -connection postgis://user:passwd@host/database \
|
||||||
-mapping mapping.json -deployproduction
|
-mapping mapping.json -deployproduction
|
||||||
|
|
||||||
|
|
||||||
You can write some options into a JSON configuration file:
|
You can write some options into a JSON configuration file:
|
||||||
|
|
||||||
{
|
{
|
||||||
"cachedir": "/var/local/imposm3",
|
"cachedir": "/var/local/imposm",
|
||||||
"mapping": "mapping.json",
|
"mapping": "mapping.json",
|
||||||
"connection": "postgis://user:password@localhost:port/database"
|
"connection": "postgis://user:password@localhost:port/database"
|
||||||
}
|
}
|
||||||
|
|
||||||
To use that config:
|
To use that config:
|
||||||
|
|
||||||
imposm3 import -config config.json [args...]
|
imposm import -config config.json [args...]
|
||||||
|
|
||||||
For more options see:
|
For more options see:
|
||||||
|
|
||||||
imposm3 import -help
|
imposm import -help
|
||||||
|
|
||||||
|
|
||||||
Note: TLS/SSL support is disabled by default due to the lack of renegotiation support in Go's TLS implementation. You can re-enable encryption by setting the `PGSSLMODE` environment variable or the `sslmode` connection option to `require` or `verify-full`, eg: `-connect postgis://host/dbname?sslmode=require`. You will need to disable renegotiation support on your server to prevent connection errors on larger imports. You can do this by setting `ssl_renegotiation_limit` to 0 in your PostgreSQL server configuration.
|
Note: TLS/SSL support is disabled by default due to the lack of renegotiation support in Go's TLS implementation. You can re-enable encryption by setting the `PGSSLMODE` environment variable or the `sslmode` connection option to `require` or `verify-full`, eg: `-connect postgis://host/dbname?sslmode=require`. You will need to disable renegotiation support on your server to prevent connection errors on larger imports. You can do this by setting `ssl_renegotiation_limit` to 0 in your PostgreSQL server configuration.
|
||||||
|
@ -202,7 +201,7 @@ You can report any issues at: <https://github.com/omniscale/imposm3/issues>
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Imposm 3 is released as open source under the Apache License 2.0. See LICENSE.
|
Imposm is released as open source under the Apache License 2.0. See LICENSE.
|
||||||
|
|
||||||
All dependencies included as source code are released under a BSD-ish license. See LICENSE.dep.
|
All dependencies included as source code are released under a BSD-ish license. See LICENSE.dep.
|
||||||
|
|
||||||
|
@ -229,4 +228,4 @@ There is a Makefile that creates all test files if necessary and then runs the t
|
||||||
|
|
||||||
Call `make test-system` to skip the unit tests.
|
Call `make test-system` to skip the unit tests.
|
||||||
|
|
||||||
WARNING: It uses your local PostgeSQL database (`imposm3testimport`, `imposm3testproduction` and `imposm3testbackup` schema). Change the database with the standard `PGDATABASE`, `PGHOST`, etc. environment variables.
|
WARNING: It uses your local PostgreSQL database (`imposm_test_import`, `imposm_test_production` and `imposm_test_backup` schema). Change the database with the standard `PGDATABASE`, `PGHOST`, etc. environment variables.
|
||||||
|
|
|
@ -71,7 +71,7 @@ func TestReadWriteDeltaCoordsLinearImport(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkReadWriteDeltaCoords(t *testing.T, withLinearImport bool) {
|
func checkReadWriteDeltaCoords(t *testing.T, withLinearImport bool) {
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newDeltaCoordsCache(cache_dir)
|
cache, err := newDeltaCoordsCache(cache_dir)
|
||||||
|
@ -157,7 +157,7 @@ func deleteAndCheck(t *testing.T, cache *DeltaCoordsCache, id int64) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSingleUpdate(t *testing.T) {
|
func TestSingleUpdate(t *testing.T) {
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newDeltaCoordsCache(cache_dir)
|
cache, err := newDeltaCoordsCache(cache_dir)
|
||||||
|
@ -189,7 +189,7 @@ func TestSingleUpdate(t *testing.T) {
|
||||||
|
|
||||||
func BenchmarkWriteDeltaCoords(b *testing.B) {
|
func BenchmarkWriteDeltaCoords(b *testing.B) {
|
||||||
b.StopTimer()
|
b.StopTimer()
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newDeltaCoordsCache(cache_dir)
|
cache, err := newDeltaCoordsCache(cache_dir)
|
||||||
|
@ -217,7 +217,7 @@ func BenchmarkWriteDeltaCoords(b *testing.B) {
|
||||||
|
|
||||||
func BenchmarkReadDeltaCoords(b *testing.B) {
|
func BenchmarkReadDeltaCoords(b *testing.B) {
|
||||||
b.StopTimer()
|
b.StopTimer()
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newDeltaCoordsCache(cache_dir)
|
cache, err := newDeltaCoordsCache(cache_dir)
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
|
|
||||||
func TestDiffCache(t *testing.T) {
|
func TestDiffCache(t *testing.T) {
|
||||||
|
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newCoordsRefIndex(cache_dir)
|
cache, err := newCoordsRefIndex(cache_dir)
|
||||||
|
@ -49,7 +49,7 @@ func TestDiffCache(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestWriteDiff(t *testing.T) {
|
func TestWriteDiff(t *testing.T) {
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newRefIndex(cache_dir, &globalCacheOptions.CoordsIndex)
|
cache, err := newRefIndex(cache_dir, &globalCacheOptions.CoordsIndex)
|
||||||
|
@ -77,7 +77,7 @@ func TestWriteDiff(t *testing.T) {
|
||||||
|
|
||||||
func BenchmarkWriteDiff(b *testing.B) {
|
func BenchmarkWriteDiff(b *testing.B) {
|
||||||
b.StopTimer()
|
b.StopTimer()
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newRefIndex(cache_dir, &globalCacheOptions.CoordsIndex)
|
cache, err := newRefIndex(cache_dir, &globalCacheOptions.CoordsIndex)
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
package cache
|
package cache
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/omniscale/imposm3/element"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/omniscale/imposm3/element"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCreateCache(t *testing.T) {
|
func TestCreateCache(t *testing.T) {
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newNodesCache(cache_dir)
|
cache, err := newNodesCache(cache_dir)
|
||||||
|
@ -24,7 +25,7 @@ func TestCreateCache(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestReadWriteNode(t *testing.T) {
|
func TestReadWriteNode(t *testing.T) {
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newNodesCache(cache_dir)
|
cache, err := newNodesCache(cache_dir)
|
||||||
|
@ -58,7 +59,7 @@ func TestReadWriteNode(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestReadWriteWay(t *testing.T) {
|
func TestReadWriteWay(t *testing.T) {
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newWaysCache(cache_dir)
|
cache, err := newWaysCache(cache_dir)
|
||||||
|
@ -93,7 +94,7 @@ func TestReadWriteWay(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestReadMissingWay(t *testing.T) {
|
func TestReadMissingWay(t *testing.T) {
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newWaysCache(cache_dir)
|
cache, err := newWaysCache(cache_dir)
|
||||||
|
@ -111,7 +112,7 @@ func TestReadMissingWay(t *testing.T) {
|
||||||
|
|
||||||
func BenchmarkWriteWay(b *testing.B) {
|
func BenchmarkWriteWay(b *testing.B) {
|
||||||
b.StopTimer()
|
b.StopTimer()
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newWaysCache(cache_dir)
|
cache, err := newWaysCache(cache_dir)
|
||||||
|
@ -133,7 +134,7 @@ func BenchmarkWriteWay(b *testing.B) {
|
||||||
|
|
||||||
func BenchmarkReadWay(b *testing.B) {
|
func BenchmarkReadWay(b *testing.B) {
|
||||||
b.StopTimer()
|
b.StopTimer()
|
||||||
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
|
cache_dir, _ := ioutil.TempDir("", "imposm_test")
|
||||||
defer os.RemoveAll(cache_dir)
|
defer os.RemoveAll(cache_dir)
|
||||||
|
|
||||||
cache, err := newWaysCache(cache_dir)
|
cache, err := newWaysCache(cache_dir)
|
||||||
|
|
|
@ -21,7 +21,7 @@ var (
|
||||||
relIds = flags.String("rel", "", "relation")
|
relIds = flags.String("rel", "", "relation")
|
||||||
full = flags.Bool("full", false, "recurse into relations/ways")
|
full = flags.Bool("full", false, "recurse into relations/ways")
|
||||||
deps = flags.Bool("deps", false, "show dependent ways/relations")
|
deps = flags.Bool("deps", false, "show dependent ways/relations")
|
||||||
cachedir = flags.String("cachedir", "/tmp/imposm3", "cache directory")
|
cachedir = flags.String("cachedir", "/tmp/imposm", "cache directory")
|
||||||
)
|
)
|
||||||
|
|
||||||
type nodes map[string]*node
|
type nodes map[string]*node
|
||||||
|
|
|
@ -5,6 +5,7 @@ import (
|
||||||
golog "log"
|
golog "log"
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/omniscale/imposm3"
|
"github.com/omniscale/imposm3"
|
||||||
"github.com/omniscale/imposm3/cache/query"
|
"github.com/omniscale/imposm3/cache/query"
|
||||||
|
@ -39,6 +40,10 @@ func Main(usage func()) {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.HasSuffix(os.Args[0], "imposm3") {
|
||||||
|
fmt.Println("WARNING: Use imposm binary instead of imposm3!")
|
||||||
|
}
|
||||||
|
|
||||||
switch os.Args[1] {
|
switch os.Args[1] {
|
||||||
case "import":
|
case "import":
|
||||||
config.ParseImport(os.Args[2:])
|
config.ParseImport(os.Args[2:])
|
|
@ -1,10 +1,10 @@
|
||||||
Imposm3
|
Imposm
|
||||||
=======
|
======
|
||||||
|
|
||||||
Imposm3 is an importer for OpenStreetMap data. It reads PBF files and imports the data into PostgreSQL/PostGIS databases.
|
Imposm is an importer for OpenStreetMap data. It reads PBF files and imports the data into PostgreSQL/PostGIS databases.
|
||||||
It is designed to create databases that are optimized for rendering/tile/map-services.
|
It is designed to create databases that are optimized for rendering/tile/map-services.
|
||||||
|
|
||||||
It is developed and supported by `Omniscale <http://omniscale.com>`_ and is released as open source under the `Apache Software License 2.0 <http://www.apache.org/licenses/LICENSE-2.0.html>`_. Imposm3 is a rewrite of Imposm 2 with even better performance and support for (minutely) diff updates.
|
It is developed and supported by `Omniscale <http://omniscale.com>`_ and is released as open source under the `Apache Software License 2.0 <http://www.apache.org/licenses/LICENSE-2.0.html>`_. Imposm >=3 is a rewrite of Imposm 2 with even better performance and support for (minutely) diff updates.
|
||||||
|
|
||||||
|
|
||||||
Features
|
Features
|
||||||
|
@ -40,8 +40,6 @@ Support
|
||||||
|
|
||||||
There is a `mailing list at Google Groups <http://groups.google.com/group/imposm>`_ for all questions. You can subscribe by sending an email to: imposm+subscribe@googlegroups.com
|
There is a `mailing list at Google Groups <http://groups.google.com/group/imposm>`_ for all questions. You can subscribe by sending an email to: imposm+subscribe@googlegroups.com
|
||||||
|
|
||||||
For commercial support `contact Omniscale <http://omniscale.com/contact>`_.
|
|
||||||
|
|
||||||
Development
|
Development
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,11 @@ Installation
|
||||||
Binary
|
Binary
|
||||||
------
|
------
|
||||||
|
|
||||||
There are no official releases, but you find development builds at <http://imposm.org/static/rel/>.
|
`Binary releases are available at GitHub. <https://github.com/omniscale/imposm3/releases>`_
|
||||||
These builds are for x86 64bit Linux and require *no* further dependencies. Download, untar and start `imposm3`.
|
|
||||||
|
These builds are for x86 64bit Linux and require *no* further dependencies. Download, untar and start ``imposm``.
|
||||||
|
Binaries are compatible with Debian 8, Ubuntu 14.04 and SLES 12 (and newer versions). Older Imposm binaries (<=0.4) also support Debian 6, RHEL 6 and SLES 11.
|
||||||
|
Older versions are available at `<http://imposm.org/static/rel/>`_.
|
||||||
|
|
||||||
Source
|
Source
|
||||||
------
|
------
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
Tutorial
|
Tutorial
|
||||||
========
|
========
|
||||||
|
|
||||||
The ``imposm3`` command has multiple sub-commands. This tutorial will explain the most important sub-commands: ``import`` and ``diff``.
|
The ``imposm`` command has multiple sub-commands. This tutorial will explain the most important sub-commands: ``import`` and ``diff``.
|
||||||
|
|
||||||
Use the name of the sub-command as the second argument to start it. For example, to print the installed version number call the ``version`` sub-command::
|
Use the name of the sub-command as the second argument to start it. For example, to print the installed version number call the ``version`` sub-command::
|
||||||
|
|
||||||
$ imposm3 version
|
$ imposm version
|
||||||
0.1dev-20150507-7ddba33
|
master-20180507-7ddba33
|
||||||
|
|
||||||
|
|
||||||
Preparation
|
Preparation
|
||||||
|
@ -58,13 +58,13 @@ Imposm needs to know which OSM elements you want to have in your database. You c
|
||||||
|
|
||||||
To read an extract::
|
To read an extract::
|
||||||
|
|
||||||
imposm3 import -mapping mapping.yml -read germany.osm.pbf
|
imposm import -mapping mapping.yml -read germany.osm.pbf
|
||||||
|
|
||||||
|
|
||||||
Cache files
|
Cache files
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
||||||
Imposm stores the cache files in `/tmp/imposm3`. You can change that path with ``-cachedir``. Imposm can merge multiple OSM files into the same cache (e.g. when combining multiple extracts) with the ``-appendcache`` option or it can overwrite existing caches with ``-overwritecache``. Imposm will fail to ``-read`` if it finds existing cache files and if you don't specify either ``-appendcache`` or ``-overwritecache``.
|
Imposm stores the cache files in `/tmp/imposm`. You can change that path with ``-cachedir``. Imposm can merge multiple OSM files into the same cache (e.g. when combining multiple extracts) with the ``-appendcache`` option or it can overwrite existing caches with ``-overwritecache``. Imposm will fail to ``-read`` if it finds existing cache files and if you don't specify either ``-appendcache`` or ``-overwritecache``.
|
||||||
|
|
||||||
Make sure that you have enough disk space for storing these cache files. The underlying LevelDB library will crash if it runs out of free space. 2-3 times the size of the PBF file is a good estimate for the cache size, even with -diff mode.
|
Make sure that you have enough disk space for storing these cache files. The underlying LevelDB library will crash if it runs out of free space. 2-3 times the size of the PBF file is a good estimate for the cache size, even with -diff mode.
|
||||||
|
|
||||||
|
@ -80,16 +80,16 @@ You need to tell Imposm the connection parameters of your database. The ``-conne
|
||||||
In our example:
|
In our example:
|
||||||
::
|
::
|
||||||
|
|
||||||
imposm3 import -mapping mapping.yml -write -connection postgis://osm:osm@localhost/osm
|
imposm import -mapping mapping.yml -write -connection postgis://osm:osm@localhost/osm
|
||||||
|
|
||||||
You can combine reading and writing::
|
You can combine reading and writing::
|
||||||
|
|
||||||
imposm3 import -mapping mapping.yml -read hamburg.osm.pbf -write -connection postgis://osm:osm@localhost/osm
|
imposm import -mapping mapping.yml -read hamburg.osm.pbf -write -connection postgis://osm:osm@localhost/osm
|
||||||
|
|
||||||
|
|
||||||
All tables are prefixed with ``osm_``, e.g. ``roads`` will create the table ``osm_roads``. You can change the prefix by appending ``?prefix=myprefix`` to the connection URL. Use ``NONE`` to disable prefixing::
|
All tables are prefixed with ``osm_``, e.g. ``roads`` will create the table ``osm_roads``. You can change the prefix by appending ``?prefix=myprefix`` to the connection URL. Use ``NONE`` to disable prefixing::
|
||||||
|
|
||||||
imposm3 import -mapping mapping.yml -write -connection postgis://osm:osm@localhost/osm?prefix=NONE
|
imposm import -mapping mapping.yml -write -connection postgis://osm:osm@localhost/osm?prefix=NONE
|
||||||
|
|
||||||
|
|
||||||
Limit to
|
Limit to
|
||||||
|
@ -99,7 +99,7 @@ You can limit the imported geometries to polygon boundaries. You can load the li
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
imposm3 import -mapping mapping.yml -connection postgis://osm:osm@localhost/osm -read europe.osm.pbf -write -limitto germany.geojson
|
imposm import -mapping mapping.yml -connection postgis://osm:osm@localhost/osm -read europe.osm.pbf -write -limitto germany.geojson
|
||||||
|
|
||||||
|
|
||||||
``-limitto`` also controls which elements are stored in the internal cache. You can configure a buffer around the ``-limitto`` geometry with the ``-limittocachebuffer`` to add more elements to your cache. This is necessary for getting complete polygons and line strings at the boundaries of your ``-limitto`` geometry.
|
``-limitto`` also controls which elements are stored in the internal cache. You can configure a buffer around the ``-limitto`` geometry with the ``-limittocachebuffer`` to add more elements to your cache. This is necessary for getting complete polygons and line strings at the boundaries of your ``-limitto`` geometry.
|
||||||
|
@ -123,14 +123,14 @@ You can configure the following options:
|
||||||
Here is an example configuration::
|
Here is an example configuration::
|
||||||
|
|
||||||
{
|
{
|
||||||
"cachedir": "/tmp/imposm3_cache",
|
"cachedir": "/tmp/imposm_cache",
|
||||||
"connection": "postgis://osm:osm@localhost/osm",
|
"connection": "postgis://osm:osm@localhost/osm",
|
||||||
"mapping": "mapping.yml"
|
"mapping": "mapping.yml"
|
||||||
}
|
}
|
||||||
|
|
||||||
And here is it in use::
|
And here is it in use::
|
||||||
|
|
||||||
imposm3 import -config config.json -read hamburg.osm.pbf -write
|
imposm import -config config.json -read hamburg.osm.pbf -write
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -141,11 +141,11 @@ This step is optional and it does some optimization on the created tables. It cl
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
imposm3 import -config config.json -optimize
|
imposm import -config config.json -optimize
|
||||||
|
|
||||||
You can combine reading, writing and optimizing::
|
You can combine reading, writing and optimizing::
|
||||||
|
|
||||||
imposm3 import -config config.json -read hamburg.osm.pbf -write -optimize
|
imposm import -config config.json -read hamburg.osm.pbf -write -optimize
|
||||||
|
|
||||||
|
|
||||||
.. _production_tables:
|
.. _production_tables:
|
||||||
|
@ -161,17 +161,17 @@ Imposm imports all tables into the ``import`` schema by default. For example, af
|
||||||
Imposm can `deploy` all imported tables by updating the schema of the tables.
|
Imposm can `deploy` all imported tables by updating the schema of the tables.
|
||||||
To move all tables form ``import`` to the default schema ``public``::
|
To move all tables form ``import`` to the default schema ``public``::
|
||||||
|
|
||||||
imposm3 import -mapping mapping.yml -connection postgis://osm:osm@localhost/osm -deployproduction
|
imposm import -mapping mapping.yml -connection postgis://osm:osm@localhost/osm -deployproduction
|
||||||
|
|
||||||
This will also remove all existing Imposm tables from ``backup`` and it will moves tables from the ``public`` to the ``backup`` schema.
|
This will also remove all existing Imposm tables from ``backup`` and it will moves tables from the ``public`` to the ``backup`` schema.
|
||||||
|
|
||||||
You can revert a deploy (moving ``public`` tables to ``import`` and ``backup`` tables to ``public``)::
|
You can revert a deploy (moving ``public`` tables to ``import`` and ``backup`` tables to ``public``)::
|
||||||
|
|
||||||
imposm3 import -mapping mapping.yml -connection postgis://osm:osm@localhost/osm -revertdeploy
|
imposm import -mapping mapping.yml -connection postgis://osm:osm@localhost/osm -revertdeploy
|
||||||
|
|
||||||
And you can remove the backup schema::
|
And you can remove the backup schema::
|
||||||
|
|
||||||
imposm3 import -mapping mapping.yml -connection postgis://osm:osm@localhost/osm -removebackup
|
imposm import -mapping mapping.yml -connection postgis://osm:osm@localhost/osm -removebackup
|
||||||
|
|
||||||
You can change the schema names with ``dbschema-import``, ``-dbschema-production`` and ``-dbschema-backup``
|
You can change the schema names with ``dbschema-import``, ``-dbschema-production`` and ``-dbschema-backup``
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ It needs to cache a few more information to be able to update the database from
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
imposm3 import -config config.json -read hamburg.osm.pbf -write -diff -cachedir ./cache -diffdir ./diff
|
imposm import -config config.json -read hamburg.osm.pbf -write -diff -cachedir ./cache -diffdir ./diff
|
||||||
|
|
||||||
.. note:: Each diff import requires access to the cache files from this initial import. So it is a good idea to set ``-cachedir`` to a premanent location instead of `/tmp/`.
|
.. note:: Each diff import requires access to the cache files from this initial import. So it is a good idea to set ``-cachedir`` to a premanent location instead of `/tmp/`.
|
||||||
|
|
||||||
|
@ -202,13 +202,13 @@ It needs to cache a few more information to be able to update the database from
|
||||||
`run`
|
`run`
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Imposm 3 can automatically fetch and import diff files. It stores the current sequence in `last.state.txt` inside the `-diffdir` directory. The downloaded diff files are cached in this directory as well.
|
Imposm can automatically fetch and import diff files. It stores the current sequence in `last.state.txt` inside the `-diffdir` directory. The downloaded diff files are cached in this directory as well.
|
||||||
|
|
||||||
To start the update process::
|
To start the update process::
|
||||||
|
|
||||||
imposm3 run -config config.json
|
imposm run -config config.json
|
||||||
|
|
||||||
You can stop processing new diff files SIGTERM (``crtl-c``), SIGKILL or SIGHUP. You should create systemd/upstart/init.d service for ``imposm3 run`` to always run in background.
|
You can stop processing new diff files SIGTERM (``crtl-c``), SIGKILL or SIGHUP. You should create systemd/upstart/init.d service for ``imposm run`` to always run in background.
|
||||||
|
|
||||||
You can change to hourly updates by adding `replication_url: "https://planet.openstreetmap.org/replication/hour/"` and `replication_interval: "1h"` to the Imposm configuration. Same for daily updates (works also for Geofabrik updates): `replication_url: "https://planet.openstreetmap.org/replication/day/"` and `replication_interval: "24h"`.
|
You can change to hourly updates by adding `replication_url: "https://planet.openstreetmap.org/replication/hour/"` and `replication_interval: "1h"` to the Imposm configuration. Same for daily updates (works also for Geofabrik updates): `replication_url: "https://planet.openstreetmap.org/replication/day/"` and `replication_interval: "24h"`.
|
||||||
|
|
||||||
|
@ -224,9 +224,9 @@ The ``diff`` sub-command requires similar options as the ``import`` sub-command.
|
||||||
|
|
||||||
To update an existing database with three change files::
|
To update an existing database with three change files::
|
||||||
|
|
||||||
imposm3 diff -config config.json changes-1.osc.gz changes-2.osc.gz changes-3.osc.gz
|
imposm diff -config config.json changes-1.osc.gz changes-2.osc.gz changes-3.osc.gz
|
||||||
|
|
||||||
Imposm 3 stores the sequence number of the last imported changeset in `${cachedir}/last.state.txt`, if it finds a matching state file (`123.state.txt` for `123.osc.gz`). Imposm refuses to import the same diff files a second time if these state files are present.
|
Imposm stores the sequence number of the last imported changeset in `${cachedir}/last.state.txt`, if it finds a matching state file (`123.state.txt` for `123.osc.gz`). Imposm refuses to import the same diff files a second time if these state files are present.
|
||||||
|
|
||||||
Remember that you have to make the initial import with the ``-diff`` option. See above.
|
Remember that you have to make the initial import with the ``-diff`` option. See above.
|
||||||
|
|
||||||
|
|
15
packaging.sh
15
packaging.sh
|
@ -3,7 +3,7 @@
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
=================== Imposm Packaging Script ============================
|
=================== Imposm Packaging Script ============================
|
||||||
|
|
||||||
This script creates binary packages for Imposm 3 for Linux.
|
This script creates binary packages for Imposm for Linux.
|
||||||
It installs and builds all dependencies, compiles the master
|
It installs and builds all dependencies, compiles the master
|
||||||
branch of this local repository and creates a .tar.gz with
|
branch of this local repository and creates a .tar.gz with
|
||||||
the imposm3 binary and all 3rd party dependencies.
|
the imposm3 binary and all 3rd party dependencies.
|
||||||
|
@ -186,7 +186,8 @@ echo '-> building imposm package'
|
||||||
rm -rf $BUILD_TMP
|
rm -rf $BUILD_TMP
|
||||||
mkdir -p $BUILD_TMP
|
mkdir -p $BUILD_TMP
|
||||||
pushd $IMPOSM_SRC
|
pushd $IMPOSM_SRC
|
||||||
cp imposm3 $BUILD_TMP
|
cp imposm $BUILD_TMP
|
||||||
|
cp README.md $BUILD_TMP
|
||||||
cp example-mapping.json $BUILD_TMP/mapping.json
|
cp example-mapping.json $BUILD_TMP/mapping.json
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
@ -211,12 +212,12 @@ popd
|
||||||
|
|
||||||
|
|
||||||
pushd $BUILD_BASE
|
pushd $BUILD_BASE
|
||||||
VERSION=`$BUILD_TMP/imposm3 version`-linux-x86-64
|
VERSION=`$BUILD_TMP/imposm version`-linux-x86-64
|
||||||
rm -rf imposm3-$VERSION
|
rm -rf imposm-$VERSION
|
||||||
mv imposm-build imposm3-$VERSION
|
mv imposm-build imposm-$VERSION
|
||||||
tar zcvf imposm3-$VERSION.tar.gz imposm3-$VERSION
|
tar zcvf imposm-$VERSION.tar.gz imposm-$VERSION
|
||||||
mkdir -p /vagrant/dist
|
mkdir -p /vagrant/dist
|
||||||
mv imposm3-$VERSION.tar.gz /vagrant/dist/
|
mv imposm-$VERSION.tar.gz /vagrant/dist/
|
||||||
|
|
||||||
echo "###########################################################################"
|
echo "###########################################################################"
|
||||||
echo " Call the following commands to download the created binary packages:"
|
echo " Call the following commands to download the created binary packages:"
|
||||||
|
|
|
@ -129,7 +129,7 @@ func (d *downloader) download(seq int, ext string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
req.Header.Set("User-Agent", "Imposm3 "+imposm3.Version)
|
req.Header.Set("User-Agent", "Imposm "+imposm3.Version)
|
||||||
resp, err := d.client.Do(req)
|
resp, err := d.client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -22,7 +22,7 @@ func TestSeqPath(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestWaitTillPresent(t *testing.T) {
|
func TestWaitTillPresent(t *testing.T) {
|
||||||
tmpdir, err := ioutil.TempDir("", "imposm3tests")
|
tmpdir, err := ioutil.TempDir("", "imposm_tests")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
func TestAnyAny_Prepare(t *testing.T) {
|
func TestAnyAny_Prepare(t *testing.T) {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
ts.dir, err = ioutil.TempDir("", "imposm3test")
|
ts.dir, err = ioutil.TempDir("", "imposm_test")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ var ts importTestSuite
|
||||||
func TestComplete_Prepare(t *testing.T) {
|
func TestComplete_Prepare(t *testing.T) {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
ts.dir, err = ioutil.TempDir("", "imposm3test")
|
ts.dir, err = ioutil.TempDir("", "imposm_test")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ import (
|
||||||
func TestExpireTiles_Prepare(t *testing.T) {
|
func TestExpireTiles_Prepare(t *testing.T) {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
ts.dir, err = ioutil.TempDir("", "imposm3test")
|
ts.dir, err = ioutil.TempDir("", "imposm_test")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,9 +22,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
dbschemaImport = "imposm3testimport"
|
dbschemaImport = "imposm_test_import"
|
||||||
dbschemaProduction = "imposm3testproduction"
|
dbschemaProduction = "imposm_test_production"
|
||||||
dbschemaBackup = "imposm3testbackup"
|
dbschemaBackup = "imposm_test_backup"
|
||||||
)
|
)
|
||||||
|
|
||||||
type importConfig struct {
|
type importConfig struct {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
func TestRouteRelation_Prepare(t *testing.T) {
|
func TestRouteRelation_Prepare(t *testing.T) {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
ts.dir, err = ioutil.TempDir("", "imposm3test")
|
ts.dir, err = ioutil.TempDir("", "imposm_test")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ const RelOffset = -1e17
|
||||||
func TestSingleTable_Prepare(t *testing.T) {
|
func TestSingleTable_Prepare(t *testing.T) {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
ts.dir, err = ioutil.TempDir("", "imposm3test")
|
ts.dir, err = ioutil.TempDir("", "imposm_test")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue