name package to imposm3

master
Oliver Tonnhofer 2013-08-29 15:44:15 +02:00
parent 7390b78aa6
commit 9e454714b8
56 changed files with 152 additions and 152 deletions

View File

@ -3,7 +3,7 @@ package binary
import (
"bytes"
"encoding/binary"
"goposm/element"
"imposm3/element"
)
func MarshalDeltaNodes(nodes []element.Node, buf []byte) []byte {

View File

@ -2,7 +2,7 @@ package binary
import (
"code.google.com/p/goprotobuf/proto"
"goposm/element"
"imposm3/element"
"math"
"math/rand"
"runtime"

View File

@ -4,7 +4,7 @@ import (
"bytes"
"encoding/binary"
"goposm/element"
"imposm3/element"
)
func MarshalIdRefsBunch(idRefs []element.IdRefs) []byte {

View File

@ -3,7 +3,7 @@ package binary
import (
"testing"
"goposm/element"
"imposm3/element"
)
func TestmarshalBunch(t *testing.T) {

View File

@ -2,7 +2,7 @@ package binary
import (
"code.google.com/p/goprotobuf/proto"
"goposm/element"
"imposm3/element"
)
const COORD_FACTOR float64 = 11930464.7083 // ((2<<31)-1)/360.0

View File

@ -1,7 +1,7 @@
package binary
import (
"goposm/element"
"imposm3/element"
"testing"
)

View File

@ -15,7 +15,7 @@ package binary
// etc.) are converted to a single ASCII control char (0x01-0x1f)
import (
"goposm/element"
"imposm3/element"
"unicode/utf8"
)

View File

@ -1,7 +1,7 @@
package binary
import (
"goposm/element"
"imposm3/element"
"testing"
)

4
cache/delta.go vendored
View File

@ -2,8 +2,8 @@ package cache
import (
"container/list"
"goposm/cache/binary"
"goposm/element"
"imposm3/cache/binary"
"imposm3/element"
"sort"
"sync"
)

4
cache/delta_test.go vendored
View File

@ -1,7 +1,7 @@
package cache
import (
"goposm/element"
"imposm3/element"
"io/ioutil"
"math/rand"
"os"
@ -28,7 +28,7 @@ func TestReadWriteDeltaCoordsLinearImport(t *testing.T) {
}
func checkReadWriteDeltaCoords(t *testing.T, withLinearImport bool) {
cache_dir, _ := ioutil.TempDir("", "goposm_test")
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
defer os.RemoveAll(cache_dir)
cache, err := newDeltaCoordsCache(cache_dir)

4
cache/diff.go vendored
View File

@ -9,8 +9,8 @@ import (
"sort"
"sync"
"goposm/cache/binary"
"goposm/element"
"imposm3/cache/binary"
"imposm3/element"
)
type byInt64 []int64

8
cache/diff_test.go vendored
View File

@ -5,12 +5,12 @@ import (
"os"
"testing"
"goposm/element"
"imposm3/element"
)
func TestDiffCache(t *testing.T) {
cache_dir, _ := ioutil.TempDir("", "goposm_test")
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
defer os.RemoveAll(cache_dir)
cache, err := newCoordsRefIndex(cache_dir)
@ -49,7 +49,7 @@ func TestDiffCache(t *testing.T) {
}
func TestWriteDiff(t *testing.T) {
cache_dir, _ := ioutil.TempDir("", "goposm_test")
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
defer os.RemoveAll(cache_dir)
cache, err := newRefIndex(cache_dir, &globalCacheOptions.CoordsIndex)
@ -77,7 +77,7 @@ func TestWriteDiff(t *testing.T) {
func BenchmarkWriteDiff(b *testing.B) {
b.StopTimer()
cache_dir, _ := ioutil.TempDir("", "goposm_test")
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
defer os.RemoveAll(cache_dir)
cache, err := newRefIndex(cache_dir, &globalCacheOptions.CoordsIndex)

4
cache/nodes.go vendored
View File

@ -2,8 +2,8 @@ package cache
import (
"github.com/jmhodges/levigo"
"goposm/cache/binary"
"goposm/element"
"imposm3/cache/binary"
"imposm3/element"
)
type NodesCache struct {

14
cache/osm_test.go vendored
View File

@ -1,7 +1,7 @@
package cache
import (
"goposm/element"
"imposm3/element"
"io/ioutil"
"math/rand"
"os"
@ -9,7 +9,7 @@ import (
)
func TestCreateCache(t *testing.T) {
cache_dir, _ := ioutil.TempDir("", "goposm_test")
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
defer os.RemoveAll(cache_dir)
cache, err := newNodesCache(cache_dir)
@ -24,7 +24,7 @@ func TestCreateCache(t *testing.T) {
}
func TestReadWriteNode(t *testing.T) {
cache_dir, _ := ioutil.TempDir("", "goposm_test")
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
defer os.RemoveAll(cache_dir)
cache, err := newNodesCache(cache_dir)
@ -58,7 +58,7 @@ func TestReadWriteNode(t *testing.T) {
}
func TestReadWriteWay(t *testing.T) {
cache_dir, _ := ioutil.TempDir("", "goposm_test")
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
defer os.RemoveAll(cache_dir)
cache, err := newWaysCache(cache_dir)
@ -93,7 +93,7 @@ func TestReadWriteWay(t *testing.T) {
}
func TestReadMissingWay(t *testing.T) {
cache_dir, _ := ioutil.TempDir("", "goposm_test")
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
defer os.RemoveAll(cache_dir)
cache, err := newWaysCache(cache_dir)
@ -111,7 +111,7 @@ func TestReadMissingWay(t *testing.T) {
func BenchmarkWriteWay(b *testing.B) {
b.StopTimer()
cache_dir, _ := ioutil.TempDir("", "goposm_test")
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
defer os.RemoveAll(cache_dir)
cache, err := newWaysCache(cache_dir)
@ -133,7 +133,7 @@ func BenchmarkWriteWay(b *testing.B) {
func BenchmarkReadWay(b *testing.B) {
b.StopTimer()
cache_dir, _ := ioutil.TempDir("", "goposm_test")
cache_dir, _ := ioutil.TempDir("", "imposm3_test")
defer os.RemoveAll(cache_dir)
cache, err := newWaysCache(cache_dir)

View File

@ -9,8 +9,8 @@ import (
"strconv"
"strings"
"goposm/cache"
"goposm/element"
"imposm3/cache"
"imposm3/element"
)
var flags = flag.NewFlagSet("query-cache", flag.ExitOnError)
@ -21,7 +21,7 @@ var (
relIds = flags.String("rel", "", "relation")
full = flags.Bool("full", false, "recurse into relations/ways")
deps = flags.Bool("deps", false, "show dependent ways/relations")
cachedir = flags.String("cachedir", "/tmp/goposm", "cache directory")
cachedir = flags.String("cachedir", "/tmp/imposm3", "cache directory")
)
type nodes map[string]*node

4
cache/relations.go vendored
View File

@ -2,8 +2,8 @@ package cache
import (
"github.com/jmhodges/levigo"
"goposm/cache/binary"
"goposm/element"
"imposm3/cache/binary"
"imposm3/element"
)
type RelationsCache struct {

4
cache/ways.go vendored
View File

@ -2,8 +2,8 @@ package cache
import (
"github.com/jmhodges/levigo"
"goposm/cache/binary"
"goposm/element"
"imposm3/cache/binary"
"imposm3/element"
)
type WaysCache struct {

View File

@ -19,7 +19,7 @@ type Config struct {
}
const defaultSrid = 3857
const defaultCacheDir = "/tmp/goposm"
const defaultCacheDir = "/tmp/imposm3"
var ImportFlags = flag.NewFlagSet("import", flag.ExitOnError)
var DiffFlags = flag.NewFlagSet("diff", flag.ExitOnError)

View File

@ -2,7 +2,7 @@ package database
import (
"errors"
"goposm/mapping"
"imposm3/mapping"
"strings"
)

View File

@ -5,9 +5,9 @@ import (
"errors"
"fmt"
pq "github.com/olt/pq"
"goposm/database"
"goposm/logging"
"goposm/mapping"
"imposm3/database"
"imposm3/logging"
"imposm3/mapping"
"runtime"
"strings"
"sync"

View File

@ -2,7 +2,7 @@ package postgis
import (
"fmt"
"goposm/mapping"
"imposm3/mapping"
"strings"
)

View File

@ -1,13 +1,13 @@
package diff
import (
"goposm/cache"
"goposm/database"
"goposm/diff/parser"
"goposm/element"
"goposm/expire"
"goposm/mapping"
"goposm/proj"
"imposm3/cache"
"imposm3/database"
"imposm3/diff/parser"
"imposm3/element"
"imposm3/expire"
"imposm3/mapping"
"imposm3/proj"
)
type Deleter struct {

View File

@ -4,7 +4,7 @@ import (
"bytes"
"errors"
"fmt"
"goposm/diff/state"
"imposm3/diff/state"
"io"
"io/ioutil"
"net/http"

View File

@ -3,8 +3,8 @@ package parser
import (
"compress/gzip"
"encoding/xml"
"goposm/element"
"goposm/logging"
"imposm3/element"
"imposm3/logging"
"os"
"strconv"
)

View File

@ -2,20 +2,20 @@ package diff
import (
"fmt"
"goposm/cache"
"goposm/config"
"goposm/database"
_ "goposm/database/postgis"
"goposm/diff/parser"
diffstate "goposm/diff/state"
"goposm/element"
"goposm/expire"
"goposm/geom/geos"
"goposm/geom/limit"
"goposm/logging"
"goposm/mapping"
"goposm/stats"
"goposm/writer"
"imposm3/cache"
"imposm3/config"
"imposm3/database"
_ "imposm3/database/postgis"
"imposm3/diff/parser"
diffstate "imposm3/diff/state"
"imposm3/element"
"imposm3/expire"
"imposm3/geom/geos"
"imposm3/geom/limit"
"imposm3/logging"
"imposm3/mapping"
"imposm3/stats"
"imposm3/writer"
"io"
)

View File

@ -4,8 +4,8 @@ import (
"bufio"
"errors"
"fmt"
"goposm/logging"
"goposm/parser/pbf"
"imposm3/logging"
"imposm3/parser/pbf"
"io"
"os"
"path"

View File

@ -3,7 +3,7 @@ package element
import (
"sort"
"goposm/geom/geos"
"imposm3/geom/geos"
)
type Tags map[string]string

View File

@ -4,7 +4,7 @@ import (
"database/sql"
"fmt"
_ "github.com/mattn/go-sqlite3"
"goposm/element"
"imposm3/element"
"io"
"math"
"sort"

View File

@ -2,8 +2,8 @@ package geom
import (
"errors"
"goposm/element"
"goposm/geom/geos"
"imposm3/element"
"imposm3/geom/geos"
)
type GeomError struct {

View File

@ -1,8 +1,8 @@
package geom
import (
"goposm/element"
"goposm/geom/geos"
"imposm3/element"
"imposm3/geom/geos"
"testing"
)

View File

@ -13,7 +13,7 @@ extern void initGEOS_debug();
import "C"
import (
"goposm/logging"
"imposm3/logging"
"runtime"
"unsafe"
)

View File

@ -3,8 +3,8 @@ package main
import (
"flag"
"fmt"
"goposm/geom/geos"
"goposm/geom/limit"
"imposm3/geom/geos"
"imposm3/geom/limit"
"log"
)

View File

@ -2,9 +2,9 @@ package limit
import (
"errors"
"goposm/geom/geos"
"goposm/geom/ogr"
"goposm/logging"
"imposm3/geom/geos"
"imposm3/geom/ogr"
"imposm3/logging"
"math"
"strings"
"sync"

View File

@ -1,7 +1,7 @@
package limit
import (
"goposm/geom/geos"
"imposm3/geom/geos"
"testing"
)

View File

@ -2,8 +2,8 @@ package geom
import (
"errors"
"goposm/element"
"goposm/geom/geos"
"imposm3/element"
"imposm3/geom/geos"
"sort"
)

View File

@ -1,8 +1,8 @@
package geom
import (
"goposm/element"
"goposm/geom/geos"
"imposm3/element"
"imposm3/geom/geos"
"math"
"testing"
)

View File

@ -9,7 +9,7 @@ package ogr
import "C"
import (
"fmt"
"goposm/geom/geos"
"imposm3/geom/geos"
"strings"
"unsafe"
)

View File

@ -1,8 +1,8 @@
package geom
import (
"goposm/element"
"goposm/geom/geos"
"imposm3/element"
"imposm3/geom/geos"
)
type Ring struct {

View File

@ -1,7 +1,7 @@
package geom
import (
"goposm/element"
"imposm3/element"
"sort"
"testing"
)

View File

@ -10,20 +10,20 @@ import (
"strings"
"time"
"goposm/cache"
"goposm/cache/query"
"goposm/config"
"goposm/database"
_ "goposm/database/postgis"
"goposm/diff"
state "goposm/diff/state"
"goposm/geom/limit"
"goposm/logging"
"goposm/mapping"
"goposm/parser/pbf"
"goposm/reader"
"goposm/stats"
"goposm/writer"
"imposm3/cache"
"imposm3/cache/query"
"imposm3/config"
"imposm3/database"
_ "imposm3/database/postgis"
"imposm3/diff"
state "imposm3/diff/state"
"imposm3/geom/limit"
"imposm3/logging"
"imposm3/mapping"
"imposm3/parser/pbf"
"imposm3/reader"
"imposm3/stats"
"imposm3/writer"
)
var log = logging.NewLogger("")

View File

@ -3,7 +3,7 @@ package mapping
import (
"encoding/json"
"errors"
"goposm/element"
"imposm3/element"
"os"
)

View File

@ -2,8 +2,8 @@ package mapping
import (
"errors"
"goposm/element"
"goposm/logging"
"imposm3/element"
"imposm3/logging"
"regexp"
"strconv"
"strings"

View File

@ -1,7 +1,7 @@
package mapping
import (
"goposm/element"
"imposm3/element"
)
func (m *Mapping) NodeTagFilter() *TagFilter {

View File

@ -1,7 +1,7 @@
package mapping
import (
"goposm/element"
"imposm3/element"
"testing"
)

View File

@ -1,7 +1,7 @@
package mapping
import (
"goposm/element"
"imposm3/element"
)
func (m *Mapping) PointMatcher() *TagMatcher {

View File

@ -7,7 +7,7 @@ import (
structs "encoding/binary"
"errors"
"fmt"
"goposm/parser/pbf/osmpbf"
"imposm3/parser/pbf/osmpbf"
"io"
"log"
"os"

View File

@ -417,7 +417,7 @@ type Relation struct {
Info *Info `protobuf:"bytes,4,opt,name=info" json:"info,omitempty"`
RolesSid []int32 `protobuf:"varint,8,rep,packed,name=roles_sid" json:"roles_sid,omitempty"`
Memids []int64 `protobuf:"zigzag64,9,rep,packed,name=memids" json:"memids,omitempty"`
Types []Relation_MemberType `protobuf:"varint,10,rep,packed,name=types,enum=goposm.Relation_MemberType" json:"types,omitempty"`
Types []Relation_MemberType `protobuf:"varint,10,rep,packed,name=types,enum=imposm3.Relation_MemberType" json:"types,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
@ -440,5 +440,5 @@ func (this *Relation) GetInfo() *Info {
}
func init() {
proto.RegisterEnum("goposm.Relation_MemberType", Relation_MemberType_name, Relation_MemberType_value)
proto.RegisterEnum("imposm3.Relation_MemberType", Relation_MemberType_name, Relation_MemberType_value)
}

View File

@ -1,8 +1,8 @@
package pbf
import (
"goposm/element"
"goposm/parser/pbf/osmpbf"
"imposm3/element"
"imposm3/parser/pbf/osmpbf"
"log"
)

View File

@ -5,7 +5,7 @@ import (
"code.google.com/p/goprotobuf/proto"
"compress/zlib"
"fmt"
"goposm/parser/pbf/osmpbf"
"imposm3/parser/pbf/osmpbf"
"io"
"log"
"os"

View File

@ -1,7 +1,7 @@
package proj
import (
"goposm/element"
"imposm3/element"
"math"
)

View File

@ -1,12 +1,12 @@
package reader
import (
"goposm/cache"
"goposm/element"
"goposm/logging"
"goposm/mapping"
"goposm/parser/pbf"
"goposm/stats"
"imposm3/cache"
"imposm3/element"
"imposm3/logging"
"imposm3/mapping"
"imposm3/parser/pbf"
"imposm3/stats"
"os"
"runtime"
"strconv"

View File

@ -2,7 +2,7 @@ package stats
import (
"fmt"
"goposm/logging"
"imposm3/logging"
"time"
)

View File

@ -1,14 +1,14 @@
package writer
import (
"goposm/cache"
"goposm/database"
"goposm/element"
"goposm/geom"
"goposm/geom/geos"
"goposm/mapping"
"goposm/proj"
"goposm/stats"
"imposm3/cache"
"imposm3/database"
"imposm3/element"
"imposm3/geom"
"imposm3/geom/geos"
"imposm3/mapping"
"imposm3/proj"
"imposm3/stats"
"log"
"sync"
)

View File

@ -2,14 +2,14 @@ package writer
import (
"fmt"
"goposm/cache"
"goposm/database"
"goposm/element"
"goposm/geom"
"goposm/geom/geos"
"goposm/mapping"
"goposm/proj"
"goposm/stats"
"imposm3/cache"
"imposm3/database"
"imposm3/element"
"imposm3/geom"
"imposm3/geom/geos"
"imposm3/mapping"
"imposm3/proj"
"imposm3/stats"
"log"
"sync"
)

View File

@ -1,14 +1,14 @@
package writer
import (
"goposm/cache"
"goposm/database"
"goposm/element"
"goposm/geom"
"goposm/geom/geos"
"goposm/mapping"
"goposm/proj"
"goposm/stats"
"imposm3/cache"
"imposm3/database"
"imposm3/element"
"imposm3/geom"
"imposm3/geom/geos"
"imposm3/mapping"
"imposm3/proj"
"imposm3/stats"
"log"
"sync"
)

View File

@ -1,13 +1,13 @@
package writer
import (
"goposm/cache"
"goposm/database"
"goposm/element"
"goposm/expire"
"goposm/geom/limit"
"goposm/mapping"
"goposm/stats"
"imposm3/cache"
"imposm3/database"
"imposm3/element"
"imposm3/expire"
"imposm3/geom/limit"
"imposm3/mapping"
"imposm3/stats"
"runtime"
"sync"
)