-
-
Save ImreSamu/02f82061268c52141ca6 to your computer and use it in GitHub Desktop.
string_suffixreplace test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@91e34ac1f29e:/go/src/github.com/omniscale/imposm3# ./suffixtest.sh | |
+ impconnection=postgis://localhost/imposm3dev | |
+ monaco_osm_pbf=./parser/pbf/monaco-20150428.osm.pbf | |
+ mapping_file=../road.json | |
+ git checkout 063730b8e80465a915d6e3920ccc177a3c8cdb11 | |
Note: checking out '063730b8e80465a915d6e3920ccc177a3c8cdb11'. | |
You are in 'detached HEAD' state. You can look around, make experimental | |
changes and commit them, and you can discard any commits you make in this | |
state without impacting any branches by performing another checkout. | |
If you want to create a new branch to retain commits you create, you may | |
do so (now or later) by using -b with the checkout command again. Example: | |
git checkout -b <new-branch-name> | |
HEAD is now at 063730b... document licenses of all dependencies | |
+ test | |
+ rm -f imposm3 | |
+ go build -a | |
+ /go/src/github.com/omniscale/imposm3/imposm3 import -mapping ../road.json -read ./parser/pbf/monaco-20150428.osm.pbf -diff -write -optimize -overwritecache -deployproduction -connection postgis://localhost/imposm3dev | |
[Sep 7 09:41:31] [INFO] removing existing cache /tmp/imposm3 | |
[Sep 7 09:41:31] [INFO] [reader] reading ./parser/pbf/monaco-20150428.osm.pbf with data till 2015-04-27 22:21:02 +0200 CEST | |
[Sep 7 09:41:32] [INFO] [ 0] C: 0/s (17233) N: 0/s (0) W: 0/s (2398) R: 0/s (10) | |
[Sep 7 09:41:32] [INFO] Reading OSM data took: 346.669101ms | |
[Sep 7 09:41:32] [INFO] [ 0] C: 0/s ( 0.0%) N: 0/s (0) W: 0/s (100.0%) R: 0/s (100.0%) | |
[Sep 7 09:41:32] [INFO] Writing OSM data took: 428.02331ms | |
[Sep 7 09:41:32] [INFO] [PostGIS] Creating generalized tables took: 65.023µs | |
[Sep 7 09:41:32] [INFO] [PostGIS] Creating OSM id index on osm_example_suffixreplace took: 24.144912ms | |
[Sep 7 09:41:32] [INFO] [PostGIS] Creating geometry indices took: 24.441639ms | |
[Sep 7 09:41:32] [INFO] Importing OSM data took: 452.73886ms | |
[Sep 7 09:41:32] [INFO] [PostGIS] Analysing osm_example_suffixreplace took: 5.663989ms | |
[Sep 7 09:41:32] [INFO] [PostGIS] Clustering on geometry took: 6.174443ms | |
[Sep 7 09:41:32] [INFO] [PostGIS] Rotating osm_example_suffixreplace from import -> public -> backup | |
[Sep 7 09:41:32] [INFO] [PostGIS] backup of osm_example_suffixreplace, to backup | |
[Sep 7 09:41:32] [INFO] [PostGIS] Rotating tables took: 12.06423ms | |
[Sep 7 09:41:32] [INFO] Imposm took: 907.873425ms | |
+ git checkout master | |
Previous HEAD position was 063730b... document licenses of all dependencies | |
Switched to branch 'master' | |
Your branch is up-to-date with 'upstream/master'. | |
+ test | |
+ rm -f imposm3 | |
+ go build -a | |
+ /go/src/github.com/omniscale/imposm3/imposm3 import -mapping ../road.json -read ./parser/pbf/monaco-20150428.osm.pbf -diff -write -optimize -overwritecache -deployproduction -connection postgis://localhost/imposm3dev | |
[Sep 7 09:41:36] [INFO] [mapping] suffixes in args for string_suffixreplace not a dict | |
[Sep 7 09:41:36] [INFO] removing existing cache /tmp/imposm3 | |
[Sep 7 09:41:36] [INFO] [reader] reading ./parser/pbf/monaco-20150428.osm.pbf with data till 2015-04-27 22:21:02 +0200 CEST | |
[Sep 7 09:41:36] [INFO] [ 0] C: 0/s (17233) N: 0/s (0) W: 0/s (2398) R: 0/s (10) | |
[Sep 7 09:41:36] [INFO] Reading OSM data took: 335.649512ms | |
[Sep 7 09:41:36] [INFO] [mapping] suffixes in args for string_suffixreplace not a dict | |
[Sep 7 09:41:36] [WARN] [mapping] unhandled type:string_suffixreplace | |
[Sep 7 09:41:36] pq: extra data after last expected column | |
root@91e34ac1f29e:/go/src/github.com/omniscale/imposm3# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"tables": { | |
"example_suffixreplace": { | |
"fields": [ | |
{ | |
"type": "id", | |
"name": "osm_id", | |
"key": null | |
}, | |
{ | |
"type": "string", | |
"name": "railway", | |
"key" : "railway" | |
}, | |
{ | |
"args": { | |
"suffixes": { | |
"rail": "RAILRAIL", | |
"tram": "TRAMTRAM" | |
} | |
}, | |
"type": "string_suffixreplace", | |
"name": "railway_suffixreplace", | |
"key" : "railway" | |
} | |
], | |
"type": "linestring", | |
"filters": { | |
"exclude_tags": [ | |
["area", "yes"] | |
] | |
}, | |
"mappings": { | |
"railway": { | |
"mapping": { | |
"railway": [ | |
"rail", | |
"tram", | |
"light_rail", | |
"subway", | |
"narrow_gauge", | |
"preserved", | |
"funicular", | |
"monorail", | |
"disused" | |
] | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
impconnection=postgis://$PGHOST/$PGDATABASE | |
monaco_osm_pbf=./parser/pbf/monaco-20150428.osm.pbf | |
mapping_file=../road.json | |
function test { | |
rm -f imposm3 | |
go build -a | |
/go/src/github.com/omniscale/imposm3/imposm3 import \ | |
-mapping $mapping_file \ | |
-read $monaco_osm_pbf \ | |
-diff \ | |
-write \ | |
-optimize \ | |
-overwritecache \ | |
-deployproduction \ | |
-connection $impconnection | |
} | |
# end of function | |
# --------- before YAML ------------------- | |
git checkout 063730b8e80465a915d6e3920ccc177a3c8cdb11 | |
test | |
# ----------- Master ------- | |
git checkout master | |
test | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment