code: remove unused functions/conversions
parent
8d8694976c
commit
3ac986a498
|
@ -14,12 +14,6 @@ import (
|
|||
"github.com/omniscale/imposm3/element"
|
||||
)
|
||||
|
||||
type byInt64 []int64
|
||||
|
||||
func (a byInt64) Len() int { return len(a) }
|
||||
func (a byInt64) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
||||
func (a byInt64) Less(i, j int) bool { return a[i] < a[j] }
|
||||
|
||||
type DiffCache struct {
|
||||
Dir string
|
||||
Coords *CoordsRefIndex // Stores which ways a coord references
|
||||
|
|
|
@ -27,14 +27,6 @@ func (t *simpleColumnType) GeneralizeSql(colSpec *ColumnSpec, spec *GeneralizedT
|
|||
return "\"" + colSpec.Name + "\""
|
||||
}
|
||||
|
||||
type hstoreColumnType struct {
|
||||
simpleColumnType
|
||||
}
|
||||
|
||||
func (t *hstoreColumnType) PrepareInsertSql(i int, spec *TableSpec) string {
|
||||
return fmt.Sprintf("$%d::hstore", i)
|
||||
}
|
||||
|
||||
type geometryType struct {
|
||||
name string
|
||||
}
|
||||
|
|
|
@ -54,12 +54,6 @@ type tileKey struct {
|
|||
Y uint32
|
||||
}
|
||||
|
||||
type tile struct {
|
||||
x uint32
|
||||
y uint32
|
||||
z uint32
|
||||
}
|
||||
|
||||
func NewTileList(zoom int, out string) *TileList {
|
||||
return &TileList{
|
||||
tiles: make(map[tileKey]struct{}),
|
||||
|
|
|
@ -19,11 +19,6 @@ type object struct {
|
|||
Properties map[string]interface{} `json:"properties"`
|
||||
}
|
||||
|
||||
type geometry struct {
|
||||
Type string `json:"type"`
|
||||
Coordinates []interface{} `json:"coordinates"`
|
||||
}
|
||||
|
||||
type Point struct {
|
||||
Long float64
|
||||
Lat float64
|
||||
|
@ -72,11 +67,6 @@ func newLineStringFromCoords(coords []interface{}) (LineString, error) {
|
|||
|
||||
type Polygon []LineString
|
||||
|
||||
type polygonFeature struct {
|
||||
polygon Polygon
|
||||
properties map[string]string
|
||||
}
|
||||
|
||||
type Feature struct {
|
||||
Polygon Polygon
|
||||
Properties map[string]string
|
||||
|
|
|
@ -409,15 +409,3 @@ func MakeSuffixReplace(columnName string, columnType ColumnType, column config.C
|
|||
|
||||
return suffixReplace, nil
|
||||
}
|
||||
|
||||
func asHex(b []byte) string {
|
||||
digits := "0123456789ABCDEF"
|
||||
buf := make([]byte, 0, len(b)*2)
|
||||
n := len(b)
|
||||
|
||||
for i := 0; i < n; i++ {
|
||||
c := b[i]
|
||||
buf = append(buf, digits[c>>4], digits[c&0xF])
|
||||
}
|
||||
return string(buf)
|
||||
}
|
||||
|
|
|
@ -366,14 +366,14 @@ func (m *Mapping) addFilters(filters tableElementFilters) {
|
|||
log.Print("warn: exclude_tags filter is deprecated and will be removed. See require and reject filter.")
|
||||
for _, filterKeyVal := range *t.Filters.ExcludeTags {
|
||||
// Convert `exclude_tags`` filter to `reject` filter !
|
||||
keyname := string(filterKeyVal[0])
|
||||
keyname := filterKeyVal[0]
|
||||
vararr := []config.OrderedValue{
|
||||
{
|
||||
Value: config.Value(filterKeyVal[1]),
|
||||
Order: 1,
|
||||
},
|
||||
}
|
||||
filters[name] = append(filters[name], makeFiltersFunction(name, false, true, string(keyname), vararr))
|
||||
filters[name] = append(filters[name], makeFiltersFunction(name, false, true, keyname, vararr))
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,14 +7,6 @@ import (
|
|||
|
||||
const coord_factor float64 = 11930464.7083 // ((2<<31)-1)/360.0
|
||||
|
||||
func coordToInt(coord float64) uint32 {
|
||||
return uint32((coord + 180.0) * coord_factor)
|
||||
}
|
||||
|
||||
func intToCoord(coord uint32) float64 {
|
||||
return float64((float64(coord) / coord_factor) - 180.0)
|
||||
}
|
||||
|
||||
func readDenseNodes(
|
||||
dense *osmpbf.DenseNodes,
|
||||
block *osmpbf.PrimitiveBlock,
|
||||
|
|
Loading…
Reference in New Issue