pgmvt

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2025 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const HEMI_MAP_WIDTH = math.Pi * float64(6378137)
View Source
const PRECISION = 6

Variables

This section is empty.

Functions

func AddGDBDirectlyOptimized

func AddGDBDirectlyOptimized(DB *gorm.DB, gdbPath string, Main string, Color string, Opacity string, Userunits string, LineWidth string) []string

AddGDBDirectlyOptimized 优化版本:直接将GDB文件导入到PostGIS数据库

func AddGeoDirectly

func AddGeoDirectly(DB *gorm.DB, dirpath string, EN string, CN string, Main string, Color string, Opacity string, Userunits string, addType string, LineWidth string) string

func AddSHPDirectlyOptimized

func AddSHPDirectlyOptimized(DB *gorm.DB, shpPath string, EN, CN, Main string, Color string, Opacity string, Userunits string, LineWidth string) string

AddSHPDirectlyOptimized 优化版本:直接将SHP文件导入到PostGIS数据库

func Bounds

func Bounds(geo orb.Geometry) []tile

func ConvertGDBLayerToPGDirect

func ConvertGDBLayerToPGDirect(layer Gogeo.GDBLayerInfo, DB *gorm.DB, tableName string)

ConvertGDBLayerToPGDirect 直接将GDB图层数据写入PostgreSQL

func ConvertSHPDirectlyToPG

func ConvertSHPDirectlyToPG(shpfileFilePath string, DB *gorm.DB, tablename string) string

直接将SHP文件写入PostgreSQL数据库

func ConvertSHPLayerToPGDirect

func ConvertSHPLayerToPGDirect(layer Gogeo.SHPLayerInfo, DB *gorm.DB, tableName string)

ConvertSHPLayerToPGDirect 直接将SHP图层数据写入PostgreSQL

func DelMVT

func DelMVT(DB *gorm.DB, tablename string, geom orb.Geometry)

func Epsg3857_to_epsg4326

func Epsg3857_to_epsg4326(x float64, y float64) (float64, float64)

func Epsg4326_to_epsg3857

func Epsg4326_to_epsg3857(lon float64, lat float64) (float64, float64)

func GetPointTile

func GetPointTile(x float64, y float64) []tile

func GetTableColumns

func GetTableColumns(db *gorm.DB, tableName string) ([]string, error)

func IsEndWithNumber

func IsEndWithNumber(s string) bool

func KeepTile

func KeepTile(zoom_level int64, tiles []tile) []tile

func LonLatToTile

func LonLatToTile(lon, lat float64, zoom int64) (x, y int64)

func MakeMvt

func MakeMvt(x int, y int, z int, items interface{}, db *gorm.DB, TempModel interface{}) []byte

func MakeMvtNew

func MakeMvtNew(x int, y int, z int, tableName string, db *gorm.DB) []byte

func TileGenerate

func TileGenerate(xmin, ymin, xmax, ymax float64) []tile

func TileToLatLon

func TileToLatLon(z, x, y int) (topLeft, topRight, bottomLeft, bottomRight [2]float64)

func UpdateGDBDirectly

func UpdateGDBDirectly(DB *gorm.DB, gdbPath string, EN, CN, Main string, Color string, Opacity string, Userunits, AddType string, LineWidth string) []string

将gdb文件图层全部更新到数据库中

func UpdateSHPDirectly

func UpdateSHPDirectly(DB *gorm.DB, shpPath string, EN, CN, Main string, Color string, Opacity string, Userunits, AddType string, LineWidth string) []string

使用Gdal实现 UpdateSHPDirectly 将SHP文件直接更新到数据库中

func XyzLonLat

func XyzLonLat(x float64, y float64, z float64) []float64

Types

type MVTTile

type MVTTile struct {
	MVT []byte
}

type ProcessedFieldInfo

type ProcessedFieldInfo struct {
	OriginalName  string
	ProcessedName string
	DBType        string
}

ProcessedFieldInfo 处理后的字段信息

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL