models

package
v1.8.9 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

models/dynamic_raster.go

models/field.go

models/track.go

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB
View Source
var SupportedFieldTypes = map[string]FieldTypeInfo{

	"smallint": {
		TypeName:    "smallint",
		Category:    "integer",
		NeedLength:  false,
		NeedScale:   false,
		Description: "小整数 (-32768 到 32767)",
	},
	"integer": {
		TypeName:    "integer",
		Category:    "integer",
		NeedLength:  false,
		NeedScale:   false,
		Description: "整数 (-2147483648 到 2147483647)",
	},
	"bigint": {
		TypeName:    "bigint",
		Category:    "integer",
		NeedLength:  false,
		NeedScale:   false,
		Description: "大整数 (-9223372036854775808 到 9223372036854775807)",
	},
	"serial": {
		TypeName:    "serial",
		Category:    "integer",
		NeedLength:  false,
		NeedScale:   false,
		Description: "自增整数",
	},
	"bigserial": {
		TypeName:    "bigserial",
		Category:    "integer",
		NeedLength:  false,
		NeedScale:   false,
		Description: "自增大整数",
	},

	"real": {
		TypeName:    "real",
		Category:    "float",
		NeedLength:  false,
		NeedScale:   false,
		Description: "单精度浮点数 (6位小数精度)",
	},
	"double": {
		TypeName:    "double precision",
		Category:    "float",
		NeedLength:  false,
		NeedScale:   false,
		Description: "双精度浮点数 (15位小数精度)",
	},
	"numeric": {
		TypeName:    "numeric",
		Category:    "float",
		NeedLength:  true,
		NeedScale:   true,
		Description: "精确数值类型,需指定精度(precision)和小数位(scale)",
	},
	"decimal": {
		TypeName:    "decimal",
		Category:    "float",
		NeedLength:  true,
		NeedScale:   true,
		Description: "精确数值类型,等同于numeric",
	},

	"char": {
		TypeName:    "character",
		Category:    "string",
		NeedLength:  true,
		NeedScale:   false,
		Description: "定长字符串,需指定长度",
	},
	"varchar": {
		TypeName:    "character varying",
		Category:    "string",
		NeedLength:  true,
		NeedScale:   false,
		Description: "变长字符串,需指定最大长度",
	},
	"text": {
		TypeName:    "text",
		Category:    "string",
		NeedLength:  false,
		NeedScale:   false,
		Description: "无限长度文本",
	},

	"date": {
		TypeName:    "date",
		Category:    "datetime",
		NeedLength:  false,
		NeedScale:   false,
		Description: "日期 (年-月-日)",
	},
	"time": {
		TypeName:    "time without time zone",
		Category:    "datetime",
		NeedLength:  false,
		NeedScale:   false,
		Description: "时间 (时:分:秒)",
	},
	"timetz": {
		TypeName:    "time with time zone",
		Category:    "datetime",
		NeedLength:  false,
		NeedScale:   false,
		Description: "带时区的时间",
	},
	"timestamp": {
		TypeName:    "timestamp without time zone",
		Category:    "datetime",
		NeedLength:  false,
		NeedScale:   false,
		Description: "时间戳 (日期+时间)",
	},
	"timestamptz": {
		TypeName:    "timestamp with time zone",
		Category:    "datetime",
		NeedLength:  false,
		NeedScale:   false,
		Description: "带时区的时间戳",
	},

	"bytea": {
		TypeName:    "bytea",
		Category:    "binary",
		NeedLength:  false,
		NeedScale:   false,
		Description: "二进制数据",
	},

	"boolean": {
		TypeName:    "boolean",
		Category:    "boolean",
		NeedLength:  false,
		NeedScale:   false,
		Description: "布尔值 (true/false)",
	},

	"uuid": {
		TypeName:    "uuid",
		Category:    "string",
		NeedLength:  false,
		NeedScale:   false,
		Description: "UUID唯一标识符",
	},

	"int": {
		TypeName:    "integer",
		Category:    "integer",
		NeedLength:  false,
		NeedScale:   false,
		Description: "整数 (integer的别名)",
	},
	"float": {
		TypeName:    "double precision",
		Category:    "float",
		NeedLength:  false,
		NeedScale:   false,
		Description: "浮点数 (double precision的别名)",
	},
	"bytes": {
		TypeName:    "bytea",
		Category:    "binary",
		NeedLength:  false,
		NeedScale:   false,
		Description: "二进制数据 (bytea的别名)",
	},
}

SupportedFieldTypes 支持的字段类型列表

View Source
var TextureDB *gorm.DB

Functions

func GetDB added in v1.4.12

func GetDB() *gorm.DB

func InitDB

func InitDB()

func InitDatabase added in v1.4.12

func InitDatabase() error

InitDatabase 初始化SQLite数据库

func TileCacheTableName added in v1.8.7

func TileCacheTableName(serviceName string) string

TileCacheTableName 根据服务名生成安全的缓存表名

Types

type AnalysisParagraphConfig added in v1.3.10

type AnalysisParagraphConfig struct {
	SourceLayer string    `json:"source_layer"`
	Attributes  string    `json:"attributes"`
	Alignment   string    `json:"alignment"` // 对齐方式
	Style       TextStyle `json:"style"`     // 文本样式
	Indent      int       `json:"indent"`    // 缩进(单位:字符)
}

分析情况配置

type AreaType added in v1.1.21

type AreaType string

AreaType 面积计算类型

const (
	AreaTypePlanar    AreaType = "planar"    // 平面面积
	AreaTypeEllipsoid AreaType = "ellipsoid" // 椭球面积
)

type Asset

type Asset struct {
	Version      string `json:"version"`
	Generatetool string `json:"generatetool,omitempty"`
	GltfUpAxis   string `json:"gltfUpAxis,omitempty"`
}

Asset 资产信息

type AttColor

type AttColor struct {
	ID        int64  `gorm:"primary_key;autoIncrement"`
	LayerName string `gorm:"type:varchar(255)"`
	AttName   string `gorm:"type:varchar(255)"`
	Property  string `gorm:"type:varchar(255)"`
	Color     string `gorm:"type:varchar(255)"`
}

type BoundingVolume

type BoundingVolume struct {
	Sphere []float64 `json:"sphere,omitempty"`
	Box    []float64 `json:"box,omitempty"`
	Region []float64 `json:"region,omitempty"`
}

BoundingVolume 包围体

type CalcType added in v1.1.21

type CalcType string

CalcType 计算类型

const (
	CalcTypeArea      CalcType = "area"       // 面积
	CalcTypePerimeter CalcType = "perimeter"  // 周长
	CalcTypeCentroidX CalcType = "centroid_x" // 中心点X坐标(经度)
	CalcTypeCentroidY CalcType = "centroid_y" // 中心点Y坐标(纬度)
)

type CalculateExpression added in v1.1.20

type CalculateExpression struct {
	Type      string               `json:"type"`                // 类型: value, field, expression
	Value     interface{}          `json:"value,omitempty"`     // 直接赋值的值
	Field     string               `json:"field,omitempty"`     // 字段名
	Fields    []string             `json:"fields,omitempty"`    // 多字段组合(concat)
	Separator string               `json:"separator,omitempty"` // 字段组合分隔符
	Operator  string               `json:"operator,omitempty"`  // 运算符: +, -, *, /
	Left      *CalculateExpression `json:"left,omitempty"`      // 左操作数
	Right     *CalculateExpression `json:"right,omitempty"`     // 右操作数
}

CalculateExpression 计算表达式

type ChineseProperty

type ChineseProperty struct {
	ID        int64  `gorm:"primary_key;autoIncrement"`
	LayerName string `gorm:"type:varchar(255)"`

	CName string `gorm:"type:varchar(255)"`
	EName string `gorm:"type:varchar(255)"`
}

type Content

type Content struct {
	Uri string `json:"uri,omitempty"`
}

Content 内容

type ContentItem added in v1.3.10

type ContentItem struct {
	Type   string      `json:"type"`   // 类型:heading1, heading2, heading3, paragraph, analysis_paragraph, table, image
	Order  int         `json:"order"`  // 排序序号
	Config interface{} `json:"config"` // 具体配置,根据type不同而不同
}

type DirectoryNode added in v1.3.17

type DirectoryNode struct {
	Value    string           `json:"value"`
	Label    string           `json:"label"`
	Children []*DirectoryNode `json:"children,omitempty"`
}

DirectoryNode 目录树节点

type DynamicRaster added in v1.7.4

type DynamicRaster struct {
	ID          uint      `gorm:"primaryKey" json:"id"`
	Name        string    `gorm:"uniqueIndex;size:255;not null" json:"name"`    // 服务名称(唯一标识)
	ImagePath   string    `gorm:"size:1024;not null" json:"image_path"`         // 影像文件路径
	Description string    `gorm:"size:512" json:"description"`                  // 描述
	TileSize    int       `gorm:"default:256" json:"tile_size"`                 // 瓦片大小
	PoolSize    int       `gorm:"default:4" json:"pool_size"`                   // 连接池大小
	MinZoom     int       `gorm:"default:0" json:"min_zoom"`                    // 最小缩放级别
	MaxZoom     int       `gorm:"default:18" json:"max_zoom"`                   // 最大缩放级别
	Bounds      string    `gorm:"size:255" json:"bounds"`                       // 边界 "minLon,minLat,maxLon,maxLat"
	Center      string    `gorm:"size:128" json:"center"`                       // 中心点 "lon,lat"
	ServiceType string    `gorm:"size:32;default:'raster'" json:"service_type"` // 服务类型: raster/terrain
	Encoding    string    `gorm:"size:32;default:'mapbox'" json:"encoding"`     // 地形编码: mapbox/terrarium
	Status      int       `gorm:"default:0" json:"status"`                      // 状态: 0-未启动, 1-运行中, 2-错误
	ErrorMsg    string    `gorm:"size:512" json:"error_msg"`                    // 错误信息
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

DynamicRaster 动态栅格服务配置表

func (DynamicRaster) TableName added in v1.7.4

func (DynamicRaster) TableName() string

TableName 指定表名

type FieldCalculatorRequest added in v1.1.20

type FieldCalculatorRequest struct {
	TableName     string               `json:"table_name" binding:"required"`     // 表名
	TargetField   string               `json:"target_field" binding:"required"`   // 目标字段
	OperationType string               `json:"operation_type" binding:"required"` // 操作类型: assign, copy, concat, calculate, round
	Expression    *CalculateExpression `json:"expression,omitempty"`              // 计算表达式
	Condition     string               `json:"condition,omitempty"`               // 过滤条件 (WHERE子句)
	DecimalPlaces *int                 `json:"decimal_places,omitempty"`          // 小数位数 (用于round操作)
	ReplaceConfig *ReplaceConfig       `json:"replace_config,omitempty"`          // 替换配置 (用于replace操作)
}

FieldCalculatorRequest 字段计算器请求结构

type FieldCalculatorResponse added in v1.1.20

type FieldCalculatorResponse struct {
	TableName     string `json:"table_name"`
	TargetField   string `json:"target_field"`
	OperationType string `json:"operation_type"`
	AffectedRows  int64  `json:"affected_rows"`
	SQLStatement  string `json:"sql_statement"`
}

FieldCalculatorResponse 字段计算器响应

type FieldInfo

type FieldInfo struct {
	FieldName    string  `json:"field_name"`    // 字段名
	FieldType    string  `json:"field_type"`    // 简化的数据类型
	Length       int     `json:"length"`        // varchar类型的长度
	Precision    int     `json:"precision"`     // 数值精度
	Scale        int     `json:"scale"`         // 小数位数
	IsNullable   string  `json:"is_nullable"`   // 是否可为空 YES/NO
	DefaultValue *string `json:"default_value"` // 默认值
	Comment      string  `json:"comment"`       // 注释
	Position     int     `json:"position"`      // 字段位置
}

FieldInfo 字段信息结构

type FieldOperation

type FieldOperation struct {
	TableName    string `json:"table_name" binding:"required"`
	FieldName    string `json:"field_name" binding:"required"`
	FieldType    string `json:"field_type,omitempty"` // 扩展的字段类型
	Length       int    `json:"length,omitempty"`     // 字符串类型的长度
	Precision    int    `json:"precision,omitempty"`  // 数值类型的精度(总位数)
	Scale        int    `json:"scale,omitempty"`      // 数值类型的小数位数
	NewFieldName string `json:"new_field_name,omitempty"`
	DefaultValue string `json:"default_value,omitempty"`
	IsNullable   bool   `json:"is_nullable,omitempty"`
	Comment      string `json:"comment,omitempty"`
}

FieldOperation 字段操作的请求结构

type FieldRecord added in v1.3.9

type FieldRecord struct {
	TableName    string `gorm:"type:varchar(255)"`
	Type         string `gorm:"type:varchar(255)"`
	BZ           string `gorm:"type:varchar(255)"`
	ID           int64  `gorm:"primary_key;autoIncrement"`
	OldFieldName string `gorm:"type:varchar(255)"`
	OldFieldType string `gorm:"type:varchar(255)"`
	NewFieldName string `gorm:"type:varchar(255)"`
	NewFieldType string `gorm:"type:varchar(255)"`
}

type FieldTypeInfo added in v1.7.3

type FieldTypeInfo struct {
	TypeName    string `json:"type_name"`   // 类型名称
	Category    string `json:"category"`    // 类型分类: integer, float, string, datetime, binary, geometry
	NeedLength  bool   `json:"need_length"` // 是否需要长度参数
	NeedScale   bool   `json:"need_scale"`  // 是否需要精度/小数位参数
	Description string `json:"description"` // 类型描述
}

FieldTypeInfo 字段类型详细信息

type GeoPic

type GeoPic struct {
	Pic_bsm string `gorm:"primary_key;type:varchar(255)"`
	Url     string `gorm:"type:varchar(255)" json:"url"`
	BSM     string `gorm:"type:varchar(255)"`
	X       string `gorm:"type:varchar(255)"`
	Y       string `gorm:"type:varchar(255)"`
	Angel   string `gorm:"type:varchar(255)"`
	TBID    string `gorm:"type:varchar(255)"`
	Date    string `gorm:"type:varchar(255)"`
}

type GeoRecord

type GeoRecord struct {
	TableName    string `gorm:"type:varchar(255)"`
	Username     string `gorm:"type:varchar(255)"`
	Type         string `gorm:"type:varchar(255)"`
	Date         string `gorm:"type:varchar(255)"`
	BZ           string `gorm:"type:varchar(255)"`
	ID           int64  `gorm:"primary_key;autoIncrement"`
	GeoID        int32
	OldGeojson   datatypes.JSON `gorm:"type:jsonb"`
	NewGeojson   datatypes.JSON `gorm:"type:jsonb"`
	DelObjectIDs datatypes.JSON `gorm:"type:jsonb"`
}

type GeometryUpdateRequest added in v1.1.21

type GeometryUpdateRequest struct {
	TableName   string   `json:"table_name" binding:"required"`   // 表名
	TargetField string   `json:"target_field" binding:"required"` // 目标字段名
	GeomField   string   `json:"geom_field"`                      // 几何字段名(默认geom)
	CalcType    CalcType `json:"calc_type" binding:"required"`    // 计算类型
	AreaType    AreaType `json:"area_type,omitempty"`             // 面积类型(仅area时需要)
	WhereClause string   `json:"where_clause,omitempty"`          // 可选的WHERE条件
}

GeometryUpdateRequest 几何字段更新请求

type GeometryUpdateResponse added in v1.1.21

type GeometryUpdateResponse struct {
	TableName    string `json:"table_name"`
	TargetField  string `json:"target_field"`
	CalcType     string `json:"calc_type"`
	RowsAffected int64  `json:"rows_affected"` // 影响的行数
	Success      bool   `json:"success"`
	Message      string `json:"message"`
}

GeometryUpdateResponse 几何字段更新响应

type Heading1Config added in v1.3.10

type Heading1Config struct {
	Text      string    `json:"text"`      // 标题文本
	Alignment string    `json:"alignment"` // 对齐方式:left, center, right
	Style     TextStyle `json:"style"`     // 文本样式
}

Heading1Config 一级标题配置

type Heading2Config added in v1.3.10

type Heading2Config struct {
	Text      string    `json:"text"`
	Alignment string    `json:"alignment"`
	Style     TextStyle `json:"style"`
}

Heading2Config 二级标题配置

type Heading3Config added in v1.3.10

type Heading3Config struct {
	Text      string    `json:"text"`
	Alignment string    `json:"alignment"`
	Style     TextStyle `json:"style"`
}

Heading3Config 三级标题配置

type ImageConfig added in v1.3.10

type ImageConfig struct {
	SourceLayer string  `json:"source_layer"` // 图片使用图层
	Width       float64 `json:"width"`        // 宽度
	Alignment   string  `json:"alignment"`    // 对齐方式
	LegendType  string  `json:"legend_type"`  //图例样式,单图层使用(线、面、点、阴影线、双阴影线)
	Caption     string  `json:"caption"`      // 图片标题
}

ImageConfig 图片配置

type LayerHeader added in v1.2.11

type LayerHeader struct {
	ID      int64  `gorm:"primary_key;autoIncrement"`
	MXDName string `gorm:"type:varchar(255)"`
	MXDUid  string `gorm:"type:varchar(255)"`
}

type LayerMXD added in v1.2.11

type LayerMXD struct {
	ID          int64  `gorm:"primary_key;autoIncrement"`
	EN          string `gorm:"type:varchar(255)"`
	Main        string `gorm:"type:varchar(255)"`
	CN          string `gorm:"type:varchar(255)"`
	MXDName     string `gorm:"type:varchar(255)"`
	MXDUid      string `gorm:"type:varchar(255)"`
	LayerSortID int64
	Style       datatypes.JSON `gorm:"type:jsonb"`
}

配置表

type LoginUser

type LoginUser struct {
	ID        int64  `gorm:"primary_key;autoIncrement"`
	Username  string `gorm:"type:varchar(255)"`
	Password  string `gorm:"type:varchar(255)"`
	Name      string `gorm:"type:varchar(255)"`
	Phone     string `gorm:"type:varchar(255)"`
	Userunits string `gorm:"type:varchar(255)"`
	Location  string `gorm:"type:varchar(255)"`
	Post      string `gorm:"type:varchar(255)"`
	Token     string `gorm:"type:varchar(255)"`
	Grade     string `gorm:"type:varchar(255)"`
	Mac       string
	Date      string `gorm:"type:varchar(255)"`
	CentX     float64
	CentY     float64
	CentZ     float64
	InitX     float64
	InitY     float64
	InitZ     float64
}

type MySchema

type MySchema struct {
	ID          int64          `gorm:"primary_key;autoIncrement"`
	Main        string         `gorm:"type:varchar(255)"`
	CN          string         `gorm:"type:varchar(255)"`
	EN          string         `gorm:"type:varchar(255)"`
	Type        string         `gorm:"type:varchar(255)"`
	Opacity     string         `gorm:"type:varchar(254);default:1"`
	Color       string         `gorm:"type:varchar(255)"`
	LineWidth   string         `gorm:"type:varchar(55)"`
	FillType    string         `gorm:"type:varchar(255)"`
	LineColor   string         `gorm:"type:varchar(255)"`
	UpdatedDate string         `gorm:"type:varchar(255)"`
	TileSize    int64          `gorm:"default:256"`
	TextureSet  datatypes.JSON `gorm:"type:jsonb"`
	SymbolSet   datatypes.JSON `gorm:"type:jsonb"`
	Source      datatypes.JSON `gorm:"type:jsonb"`
	Userunits   string         `gorm:"type:varchar(255)"`
}

type NetMap added in v1.6.4

type NetMap struct {
	ID              uint       `gorm:"primaryKey" json:"id"`
	MapName         string     `gorm:"column:map_name;index" json:"mapName"`                      // 地图名称
	GroupName       string     `gorm:"column:group_name;index" json:"groupName"`                  // 分组名称
	MapType         string     `gorm:"column:map_type" json:"mapType"`                            // 地图类型
	Protocol        string     `gorm:"column:protocol" json:"protocol"`                           // 协议 (http/https)
	Hostname        string     `gorm:"column:hostname" json:"hostname"`                           // 主机名
	Port            int        `gorm:"column:port" json:"port"`                                   // 端口号
	Projection      string     `gorm:"column:projection" json:"projection"`                       // 投影方式
	ImageFormat     string     `gorm:"column:image_format" json:"imageFormat"`                    // 图片格式
	MinLevel        int        `gorm:"column:min_level" json:"minLevel"`                          // 最小缩放级别
	MaxLevel        int        `gorm:"column:max_level" json:"maxLevel"`                          // 最大缩放级别
	TileSize        int        `gorm:"column:tile_size" json:"tileSize"`                          // 最大缩放级别
	UrlPath         string     `gorm:"column:url_path" json:"urlPath"`                            // URL路径
	TileUrlTemplate string     `gorm:"column:tile_url_template;type:text" json:"tileUrlTemplate"` // 完整URL模板
	Status          int        `gorm:"column:status;default:1" json:"status"`                     // 状态:0禁用,1启用
	CreatedAt       time.Time  `gorm:"autoCreateTime" json:"createdAt"`
	UpdatedAt       time.Time  `gorm:"autoUpdateTime" json:"updatedAt"`
	DeletedAt       *time.Time `gorm:"index" json:"deletedAt"`
}

func (NetMap) TableName added in v1.6.4

func (NetMap) TableName() string

type ParagraphConfig added in v1.3.10

type ParagraphConfig struct {
	Text      string    `json:"text"`      // 正文内容
	Alignment string    `json:"alignment"` // 对齐方式
	Style     TextStyle `json:"style"`     // 文本样式
	Indent    int       `json:"indent"`    // 缩进(单位:字符)
}

ParagraphConfig 正文配置

type RasterRecord added in v1.8.5

type RasterRecord struct {
	ID         int64          `gorm:"primary_key;autoIncrement"`
	TaskID     string         `gorm:"type:varchar(200)"`
	SourcePath string         `gorm:"type:varchar(255)"` //栅格源路径
	OutputPath string         `gorm:"type:varchar(255)"` //栅格操作的输出路径,投影接口是直接修改原始数据则不填这项
	Status     int            //栅格操作运行状态 0 运行中 1 执行完成  2 执行失败
	TypeName   string         `gorm:"type:varchar(255)"` //栅格操作的类型
	Args       datatypes.JSON `gorm:"type:jsonb"`        //栅格操作的输入参数
}

func (RasterRecord) TableName added in v1.8.5

func (RasterRecord) TableName() string

type ReplaceConfig added in v1.5.2

type ReplaceConfig struct {
	Mode        string `json:"mode" binding:"required"` // 替换模式: "normal" 普通替换, "regex" 正则替换
	SearchValue string `json:"search_value"`            // 要查找的值(普通模式)或正则表达式(正则模式)
	ReplaceWith string `json:"replace_with"`            // 替换后的值
	GlobalFlag  bool   `json:"global_flag"`             // 是否全局替换(替换所有匹配项),默认true
	CaseIgnore  bool   `json:"case_ignore"`             // 是否忽略大小写,默认false
}

ReplaceConfig 字符串替换配置

type Report added in v1.3.9

type Report struct {
	ID         int64          `gorm:"primary_key;autoIncrement"`
	ReportName string         `gorm:"type:varchar(255)"`
	Layers     datatypes.JSON `gorm:"type:jsonb"`
	Content    datatypes.JSON `gorm:"type:jsonb"`
}

type Response

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

Response 通用响应结构

type SnapPointRequest added in v1.3.2

type SnapPointRequest struct {
	Point       []float64 `json:"point"`                  // 要捕捉的点 [x, y]
	MaxDistance float64   `json:"max_distance,omitempty"` // 最大捕捉距离(米),超过则返回原点
}

在 TrackResponse 后添加

type SnapPointResponse added in v1.3.2

type SnapPointResponse struct {
	Type         string    `json:"type"`                    // "snap_point"
	SnappedPoint []float64 `json:"snapped_point,omitempty"` // 捕捉到的最近点 [x, y]
	Distance     float64   `json:"distance,omitempty"`      // 距离(米)
	LineID       int       `json:"line_id,omitempty"`       // 所在线段ID
	Message      string    `json:"message,omitempty"`       // 错误信息
}

type SpatialRefSys added in v1.8.5

type SpatialRefSys struct {
	SRID      int    `gorm:"column:srid;primaryKey" json:"srid"`
	AuthName  string `gorm:"column:auth_name" json:"auth_name"`
	AuthSRID  int    `gorm:"column:auth_srid" json:"auth_srid"`
	SRText    string `gorm:"column:srtext" json:"srtext"`
	Proj4Text string `gorm:"column:proj4text" json:"proj4text"`
}

func (SpatialRefSys) TableName added in v1.8.5

func (SpatialRefSys) TableName() string

type Symbol added in v1.5.3

type Symbol struct {
	ID          uint   `gorm:"primaryKey" json:"id"`
	Name        string `gorm:"index;not null" json:"name"`
	MimeType    string `gorm:"not null" json:"mime_type"`
	Width       int    `gorm:"not null" json:"width"`
	Height      int    `gorm:"not null" json:"height"`
	ImageData   []byte `gorm:"type:BLOB" json:"image_data"`
	Description string `json:"description"`
	Category    string `gorm:"index" json:"category"` // 图标分类,如:poi、marker、arrow等

	CreatedAt int64 `gorm:"autoCreateTime" json:"created_at"`
	UpdatedAt int64 `gorm:"autoUpdateTime" json:"updated_at"`
}

func (Symbol) TableName added in v1.5.3

func (Symbol) TableName() string

type TableConfig added in v1.3.10

type TableConfig struct {
	SourceLayer string     `json:"source_layer"`
	Attributes  string     `json:"attributes"`
	Style       TableStyle `json:"style"`   // 表格样式
	Caption     string     `json:"caption"` // 表格标题
}

TableConfig 表格配置

type TableStructure

type TableStructure struct {
	TableName    string      `json:"table_name"`
	TableComment string      `json:"table_comment"`
	Fields       []FieldInfo `json:"fields"`
	FieldCount   int         `json:"field_count"`
}

TableStructure 表结构信息

type TableStyle added in v1.3.10

type TableStyle struct {
	BorderColor string    `json:"border_color"` // 边框颜色
	BorderWidth int       `json:"border_width"` // 边框宽度
	HeaderBg    string    `json:"header_bg"`    // 表头背景色
	HeaderStyle TextStyle `json:"header_style"` // 表头文本样式
	CellStyle   TextStyle `json:"cell_style"`   // 单元格文本样式
	Alignment   string    `json:"alignment"`    // 表格对齐方式
}

TableStyle 表格样式

type TempGeo

type TempGeo struct {
	BSM     string `gorm:"type:varchar(255);primary_key"`
	TBMJ    float64
	TBID    string `gorm:"type:varchar(255)"`
	MAC     string `gorm:"type:varchar(255)"`
	ZT      string `gorm:"type:varchar(255)"`
	Name    string `gorm:"type:varchar(255)"`
	Date    string `gorm:"type:varchar(255)"`
	Geojson []byte `gorm:"type:bytea"`
}

type TempLayHeader

type TempLayHeader struct {
	ID        int64  `gorm:"primary_key"`
	BSM       string `gorm:"type:varchar(255)"`
	Layername string `gorm:"type:varchar(255)"`
	MAC       string `gorm:"type:varchar(255)"`
	Progress  float64
	Date      string `gorm:"type:varchar(255)"`
}

type TempLayer

type TempLayer struct {
	ID        int64  `gorm:"primary_key;autoIncrement"`
	TBID      string `gorm:"type:varchar(255)"`
	Layername string `gorm:"type:varchar(255)"`
	BSM       string `gorm:"type:varchar(255)"`
	Name      string `gorm:"type:varchar(255)"`
	ZT        string `gorm:"type:varchar(255)"`
	MAC       string `gorm:"type:varchar(255)"`
	Geojson   []byte `gorm:"type:bytea"`
}

type TempLayerAttribute

type TempLayerAttribute struct {
	ID        int64  `gorm:"primary_key"`
	TBID      string `gorm:"type:varchar(255)"`
	QKSM      string `gorm:"type:varchar(255)"`
	Layername string `gorm:"type:varchar(255)"`
	B         string `gorm:"type:varchar(255)"`
	D         string `gorm:"type:varchar(255)"`
	N         string `gorm:"type:varchar(255)"`
	X         string `gorm:"type:varchar(255)"`
	BZ        string `gorm:"type:varchar(255)"`
	ZJR       []byte
	DCR       []byte
}

type TextStyle added in v1.3.10

type TextStyle struct {
	FontFamily string `json:"font_family"` // 字体
	FontSize   int    `json:"font_size"`   // 字号
	Bold       bool   `json:"bold"`        // 加粗
	Italic     bool   `json:"italic"`      // 斜体
	Underline  bool   `json:"underline"`   // 下划线
	Color      string `json:"color"`       // 颜色(十六进制)
}

TextStyle 文本样式

type Texture added in v1.4.11

type Texture struct {
	ID          uint   `gorm:"primaryKey" json:"id"`
	Name        string `gorm:"index;not null" json:"name"`
	MimeType    string `gorm:"not null" json:"mime_type"`
	Width       int    `gorm:"not null" json:"width"`
	Height      int    `gorm:"not null" json:"height"`
	ImageData   []byte `gorm:"type:BLOB" json:"image_data"`
	Description string `json:"description"`

	CreatedAt int64 `gorm:"autoCreateTime" json:"created_at"`
	UpdatedAt int64 `gorm:"autoUpdateTime" json:"updated_at"`
}

func (Texture) TableName added in v1.4.11

func (Texture) TableName() string

type Tile

type Tile struct {
	ZoomLevel  int64
	TileColumn int64
	TileRow    int64
	TileData   []byte
}

type Tile2

type Tile2 struct {
	BoundingVolume BoundingVolume `json:"boundingVolume"`
	Refine         string         `json:"refine,omitempty"`
	GeometricError interface{}    `json:"geometricError"` // 使用interface{}因为可能是int或float64
	Content        Content        `json:"content,omitempty"`
	Children       []Tile2        `json:"children,omitempty"` // 递归引用自身
}

Tile 瓦片节点 - 递归结构

type TileCache added in v1.8.7

type TileCache struct {
	Z        int    `gorm:"column:z;primaryKey" json:"z"`
	X        int    `gorm:"column:x;primaryKey" json:"x"`
	Y        int    `gorm:"column:y;primaryKey" json:"y"`
	TileData []byte `gorm:"column:tile_data;type:bytea" json:"-"`
	TileType string `gorm:"column:tile_type;size:20;primaryKey;default:'raster'" json:"tile_type"`
	Encoding string `gorm:"column:encoding;size:20;primaryKey;default:''" json:"encoding"`
}

TileCache 瓦片缓存记录

type TileSetJson

type TileSetJson struct {
	Asset struct {
		Version      string `json:"version"`
		Generatetool string `json:"generatetool"`
		GltfUpAxis   string `json:"gltfUpAxis"`
	} `json:"asset"`
	ExtensionsUsed []string `json:"extensionsUsed"`
	GeometricError float64  `json:"geometricError"`
	Refine         string   `json:"refine"`
	Root           struct {
		BoundingVolume struct {
			Sphere []float64 `json:"sphere"`
		} `json:"boundingVolume"`
		GeometricError float64 `json:"geometricError"`
		Children       []struct {
			BoundingVolume struct {
				Sphere []float64 `json:"sphere"`
			} `json:"boundingVolume"`
			GeometricError float64 `json:"geometricError"`
			Children       []struct {
				BoundingVolume struct {
					Sphere []float64 `json:"sphere"`
				} `json:"boundingVolume"`
				GeometricError int `json:"geometricError"`
				Content        struct {
					Uri string `json:"uri"`
				} `json:"content"`
			} `json:"children"`
		} `json:"children"`
	} `json:"root"`
}

type TilesByte

type TilesByte struct {
	Folder   string
	TileName string
	TileData []byte
}

type TilesHeader

type TilesHeader struct {
	Folder   string
	JsonName string
	TileJson []byte
}

type TilesJson

type TilesJson struct {
	Asset          Asset   `json:"asset"`
	GeometricError float64 `json:"geometricError"`
	Root           Tile2   `json:"root"`
}

TilesJson 3D Tiles 主结构

type TilesSet

type TilesSet struct {
	Name   string `gorm:"type:varchar(255);primary_key"`
	UpDown string `gorm:"type:varchar(255)"`
}

type TrackData added in v1.3.0

type TrackData struct {
	LayerNames []string                  `json:"layer_names"` // 需要追踪的图层
	Box        geojson.FeatureCollection `json:"box"`         // 当前视角范围
	StartPoint []float64                 `json:"start_point"` // 起始点 [x, y]
}

type TrackResponse added in v1.3.0

type TrackResponse struct {
	Type    string                     `json:"type"`              // "init", "path" 或 "complete"
	Lines   *geojson.FeatureCollection `json:"lines,omitempty"`   // 打断后的线段(init时返回)
	Path    *geojson.FeatureCollection `json:"path,omitempty"`    // 追踪路径
	Message string                     `json:"message,omitempty"` // 消息
}

type UpdateMessage

type UpdateMessage struct {
	ID          int64  `gorm:"primary_key;autoIncrement"`
	LayerNameEN string `gorm:"type:varchar(255)"`
	LayerNameCN string `gorm:"type:varchar(255)"`
	UpdatedUser string `gorm:"type:varchar(255)"`
	Date        string `gorm:"type:varchar(255)"`
	MSG         string `gorm:"type:varchar(255)"`
}

type WmtsSchema added in v1.8.3

type WmtsSchema struct {
	ID          int64          `gorm:"primary_key;autoIncrement"`
	LayerName   string         `gorm:"type:varchar(255);uniqueIndex;not null"` // 图层名称
	Opacity     float64        `gorm:"type:float;default:1.0"`                 // 透明度
	TileSize    int64          `gorm:"default:256"`                            // 瓦片大小
	ColorConfig datatypes.JSON `gorm:"type:jsonb"`                             // 颜色配置
	CreatedAt   time.Time      `gorm:"autoCreateTime"`
	UpdatedAt   time.Time      `gorm:"autoUpdateTime"`
}

func (WmtsSchema) TableName added in v1.8.3

func (WmtsSchema) TableName() string

type WmtsTileCache added in v1.8.3

type WmtsTileCache struct {
	ID   int64  `gorm:"primaryKey;autoIncrement"`
	X    int64  `gorm:"index:idx_xyz,priority:1;not null"`
	Y    int64  `gorm:"index:idx_xyz,priority:2;not null"`
	Z    int64  `gorm:"index:idx_xyz,priority:3;not null"`
	Byte []byte `gorm:"type:bytea"`
}

func (WmtsTileCache) TableName added in v1.8.3

func (WmtsTileCache) TableName(layerName string) string

TableName 动态设置表名

type ZDTPic

type ZDTPic struct {
	TBID string `gorm:"primary_key;type:varchar(255)"`
	Url  string `gorm:"type:varchar(255)" json:"url"`
	BSM  string `gorm:"type:varchar(255)"`
	Date string `gorm:"type:varchar(255)"`
}

Jump to

Keyboard shortcuts

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