views

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: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownLayer

func DownLayer(tablename string) string

矢量数据导出接口

func ExampleImport added in v1.1.15

func ExampleImport(filePath string, ip string) error

从文件恢复表数据

func ExportTable added in v1.1.15

func ExportTable(tableName string, outputDir string) (string, error)

导出表数据到文件

func ExportTableToFile added in v1.1.15

func ExportTableToFile(tableName string, outputDir string) (string, error)

ExportTableToFile 将指定表的数据导出为静态文件 tableName: 要导出的表名 outputDir: 输出目录 返回: 生成的文件路径和错误信息

func GDBToLayer

func GDBToLayer(tablename string, gdbs []string, addType string) bool

func GetAtt

func GetAtt(TableName string, QZ string) []string

func GetCEMap

func GetCEMap(LayerName string) map[string]string

func GetGeo

func GetGeo(jsonData getData) geojson.FeatureCollection

func GetRGBToDEM

func GetRGBToDEM(lon float64, lat float64, ResultTiles []models.Tile, maxZoom int64) float64

func GetSingleGeo

func GetSingleGeo(TBID string) *geojson.FeatureCollection

func GetTempGeoList

func GetTempGeoList(jsonData map[string]interface{}) geojson.FeatureCollection

func GetTempLayers

func GetTempLayers(layernameSlice []string) []*geojson.Feature

func GetTilesPoints

func GetTilesPoints(geo string, area float64) ([][]float64, float64)

func ImportTableFromFile added in v1.1.15

func ImportTableFromFile(filePath string, targetDB *gorm.DB) error

ImportTableFromFile 从静态文件恢复表数据到数据库 filePath: 备份文件路径 targetDB: 目标数据库连接 返回: 错误信息

func MakeGeoIndex

func MakeGeoIndex(TableName string)

func MakeZList

func MakeZList(coords [][]float64, T *Tin2.TIN3D) [][]float64

func QSBG

func QSBG(bsm string, outDir string, mygeojson *geojson.FeatureCollection)

数据导出

func UpdateConfigSingle

func UpdateConfigSingle(jsonData UpdateData) bool

func UpdateDB

func UpdateDB(TableName string, DB *gorm.DB, DeviceDB *gorm.DB) bool

func UpdateDeviceSingle

func UpdateDeviceSingle(jsonData UpdateData) bool

Types

type Att

type Att struct {
	Text  string `json:"text"`
	Value string `json:"value"`
}

type AutoData

type AutoData struct {
	Line      geojson.FeatureCollection `json:"Line"`
	Layer     string
	TempLayer []string
}

type CEData

type CEData struct {
	LayerName string
	CEMap     []CEMap
}

type CEMap

type CEMap struct {
	CName string
	EName string
}

中文字段映射配置

type CMap

type CMap struct {
	Property string
	Color    string
}

颜色配置

type CaptureData

type CaptureData struct {
	Distance float64 `gorm:"column:distance"`
	GeoJSON  []byte  `gorm:"column:geojson"`
}

type CaptureType

type CaptureType struct {
	Point     []float64
	Layer     string
	TempLayer []string
}

type ChineseProperty

type ChineseProperty struct {
	ID        int64  `gorm:"primary_key"`
	LayerName string `gorm:"type:varchar(255)"`
	CName     string `gorm:"type:varchar(255)"`
	EName     string `gorm:"type:varchar(255)"`
}

type CleanResult added in v1.1.18

type CleanResult struct {
	LayerName    string `json:"layer_name"`    // 图层/表名
	TotalCount   int    `json:"total_count"`   // 清理前总配置数
	ValidCount   int    `json:"valid_count"`   // 有效配置数
	DeletedCount int    `json:"deleted_count"` // 删除的配置数
	Message      string `json:"message"`       // 结果消息
}

CleanResult 清理结果结构

func CleanColorMapForTable added in v1.1.18

func CleanColorMapForTable(db *gorm.DB, layerName string) (*CleanResult, error)

type ColorData

type ColorData struct {
	LayerName string
	AttName   string
	ColorMap  []CMap
}

func GetColor

func GetColor(LayerName string) []ColorData

获取配置表

type ColumnIfo

type ColumnIfo struct {
	ColumnName             string `gorm:"column:column_name"`
	DataType               string `gorm:"column:data_type"`
	CharacterMaximumLength string `gorm:"column:character_maximum_length"`
}

type DeviceData

type DeviceData struct {
	IP         string
	DeviceName string
}

获取当前能更新的设备

type DissolverType

type DissolverType struct {
	ZD       []string `json:"ZD"`
	MainTBID string   `json:"MainTBID"`
}

图斑合并

type FillData

type FillData struct {
	SJMList [][]float64
	Geojson geojson.FeatureCollection
}

type Geometries

type Geometries struct {
	Geometry []map[string]interface{} `json:"geometries"`
}

func PGBytesToGeojson

func PGBytesToGeojson(geomData Transformer.GeometryData) Geometries

查询的geojson转换

type GeometryPoint

type GeometryPoint struct {
	Coordinates []float64 `json:"coordinates"`
	Type        string    `json:"type"`
}

type LayerSchema

type LayerSchema struct {
	ID        int64
	Main      string
	CN        string
	EN        string
	LineWidth string
	Date      string
	Type      string
	Opacity   string
	Color     string    `json:"Color"`
	ColorSet  ColorData `json:"ColorSet"`
}

表名获取

type OutData

type OutData struct {
	Tablename string
	Attribute string
	Geojson   geojson.FeatureCollection
}

导出相交的矢量

type PaginatedResult

type PaginatedResult struct {
	Data       []map[string]interface{} `json:"data"`
	Total      int64                    `json:"total"`
	Page       int                      `json:"page"`
	PageSize   int                      `json:"pageSize"`
	TotalPages int                      `json:"totalPages"`
}

type Point

type Point struct {
	X float64 `json:"x" binding:"required"` // X坐标(经度),必填字段,使用JSON标签和验证标签
	Y float64 `json:"y" binding:"required"` // Y坐标(纬度),必填字段,使用JSON标签和验证标签
}

type Res

type Res struct {
	ColumnName string
}

type SearchData

type SearchData struct {
	IntersectList []SearchDataChilden
	Geojson       geojson.FeatureCollection
}

type SearchDataChilden

type SearchDataChilden struct {
	TableName   string
	TableNameCN string
	Attribute   string
}

type Statistic

type Statistic struct {
	TableName     string
	TableEN       string
	Attribute     string
	GroupedResult []methods.Result
}

type SurveyData

type SurveyData struct {
	MainData models.TempLayerAttribute
	PicList  []models.GeoPic
	ZDTUrl   string
}

type TableBackupData added in v1.1.15

type TableBackupData struct {
	TableName    string                   `json:"table_name"`
	Schema       models.MySchema          `json:"my_schema"`    // my_schema表中的记录
	TableData    []map[string]interface{} `json:"table_data"`   // 几何表数据
	AttColors    []models.AttColor        `json:"att_color"`    // 属性颜色配置
	ChineseProps []models.ChineseProperty `json:"chinese_prop"` // 中文属性配置
	Columns      []ColumnIfo              `json:"columns"`      // 表结构信息
	BackupTime   string                   `json:"backup_time"`  // 备份时间
}

TableBackupData 表备份数据结构

type TempLayerGeo

type TempLayerGeo struct {
	ID int64 `gorm:"primary_key"`

	Geojson geojson.Feature
}

type TempWay

type TempWay struct {
	TempGeo   []models.TempGeo
	TempLayer []models.TempLayer
}

type TilesXYZ

type TilesXYZ struct {
	Dbname string  `json:"Dbname"`
	DX     float64 `json:"DX"`
	DY     float64 `json:"DY"`
	DZ     float64 `json:"DZ"`
}

type UpdateData

type UpdateData struct {
	IP        string
	TableName string
}

更新设备

type UserController

type UserController struct {
	// contains filtered or unexported fields
}

func (*UserController) AddField

func (uc *UserController) AddField(c *gin.Context)

添加字段

func (*UserController) AddGeoToSchema

func (uc *UserController) AddGeoToSchema(c *gin.Context)

func (*UserController) AddSchema

func (uc *UserController) AddSchema(c *gin.Context)

func (*UserController) AddUpdateCESet

func (uc *UserController) AddUpdateCESet(c *gin.Context)

func (*UserController) AddUpdateColorSet

func (uc *UserController) AddUpdateColorSet(c *gin.Context)

func (*UserController) AppendLayer

func (uc *UserController) AppendLayer(c *gin.Context)

func (*UserController) Area

func (uc *UserController) Area(c *gin.Context)

func (*UserController) AutoPolygon

func (uc *UserController) AutoPolygon(c *gin.Context)

func (*UserController) BackUpRecord

func (uc *UserController) BackUpRecord(c *gin.Context)

还原图形

func (*UserController) Capture

func (uc *UserController) Capture(c *gin.Context)

图形捕捉

func (*UserController) ChangeGeoToSchema

func (uc *UserController) ChangeGeoToSchema(c *gin.Context)

func (*UserController) ChangeSchema

func (uc *UserController) ChangeSchema(c *gin.Context)

修改图层信息

func (*UserController) DelGeoToSchema

func (uc *UserController) DelGeoToSchema(c *gin.Context)

func (*UserController) DelSchema

func (uc *UserController) DelSchema(c *gin.Context)

func (*UserController) DelTempGeo

func (uc *UserController) DelTempGeo(c *gin.Context)

删除临时数据

func (*UserController) DelTempLayer

func (uc *UserController) DelTempLayer(c *gin.Context)

删除临时数据

func (*UserController) DeleteField

func (uc *UserController) DeleteField(c *gin.Context)

删除字段保持不变

func (*UserController) Dem

func (uc *UserController) Dem(c *gin.Context)

func (*UserController) DissolverGeo

func (uc *UserController) DissolverGeo(c *gin.Context)

func (*UserController) DownloadOfflineLayer added in v1.1.15

func (uc *UserController) DownloadOfflineLayer(c *gin.Context)

数据导出

func (*UserController) DownloadTempGeo

func (uc *UserController) DownloadTempGeo(c *gin.Context)

func (*UserController) DownloadTempGeoALL

func (uc *UserController) DownloadTempGeoALL(c *gin.Context)

数据批量导出

func (*UserController) DownloadTempLayer

func (uc *UserController) DownloadTempLayer(c *gin.Context)

图层数据导出

func (*UserController) FontGet

func (uc *UserController) FontGet(c *gin.Context)

字体接口

func (*UserController) GeodesicArea

func (uc *UserController) GeodesicArea(c *gin.Context)

func (*UserController) GetAllDeviceName

func (uc *UserController) GetAllDeviceName(c *gin.Context)

func (*UserController) GetCESet

func (uc *UserController) GetCESet(c *gin.Context)

func (*UserController) GetChangeRecord

func (uc *UserController) GetChangeRecord(c *gin.Context)

获取修改记录

func (*UserController) GetColorSet

func (uc *UserController) GetColorSet(c *gin.Context)

func (*UserController) GetDeviceName

func (uc *UserController) GetDeviceName(c *gin.Context)

func (*UserController) GetExcavationFillVolume

func (uc *UserController) GetExcavationFillVolume(c *gin.Context)

func (*UserController) GetFieldInfo

func (fc *UserController) GetFieldInfo(c *gin.Context)

GetFieldInfo 获取单个字段信息接口

func (*UserController) GetGeoFromSchema

func (uc *UserController) GetGeoFromSchema(c *gin.Context)

func (*UserController) GetHeightFromDEM

func (uc *UserController) GetHeightFromDEM(c *gin.Context)

func (*UserController) GetLayerExtent added in v1.1.17

func (uc *UserController) GetLayerExtent(c *gin.Context)

获取图层的范围 - 返回GeoJSON格式

func (*UserController) GetRasterName

func (uc *UserController) GetRasterName(c *gin.Context)

func (*UserController) GetReatoreFile added in v1.1.15

func (uc *UserController) GetReatoreFile(c *gin.Context)

GetReatoreFile 读取固定路径中的tar文件,并返回为[]string格式数据

func (*UserController) GetSchema

func (uc *UserController) GetSchema(c *gin.Context)

func (*UserController) GetSchemaByUnits

func (uc *UserController) GetSchemaByUnits(c *gin.Context)

func (*UserController) GetTableAttributes

func (uc *UserController) GetTableAttributes(c *gin.Context)

获取图层的字段

func (*UserController) GetTilesName

func (uc *UserController) GetTilesName(c *gin.Context)

获取3dtiles文件名称接口

func (*UserController) GetUpdateMSG

func (uc *UserController) GetUpdateMSG(c *gin.Context)

获取更新消息

func (*UserController) InTempGeo

func (uc *UserController) InTempGeo(c *gin.Context)

func (*UserController) InTempLayer

func (uc *UserController) InTempLayer(c *gin.Context)

临时数据导入

func (*UserController) ModifyField

func (uc *UserController) ModifyField(c *gin.Context)

修改字段

func (*UserController) MsgUpload

func (uc *UserController) MsgUpload(c *gin.Context)

举证信息上传

func (*UserController) OutIntersect

func (uc *UserController) OutIntersect(c *gin.Context)

func (*UserController) OutLayer

func (uc *UserController) OutLayer(c *gin.Context)

func (*UserController) OutMVT

func (uc *UserController) OutMVT(c *gin.Context)

func (*UserController) PicDel

func (uc *UserController) PicDel(c *gin.Context)

举证照片删除

func (*UserController) PicUpload

func (uc *UserController) PicUpload(c *gin.Context)

举证照片上传

func (*UserController) QSReport

func (uc *UserController) QSReport(c *gin.Context)

func (*UserController) Raster

func (uc *UserController) Raster(c *gin.Context)

func (*UserController) RestoreOfflineLayer added in v1.1.15

func (uc *UserController) RestoreOfflineLayer(c *gin.Context)

数据回复

func (*UserController) SchemaToExcel

func (uc *UserController) SchemaToExcel(c *gin.Context)

func (*UserController) SearchGeoFromSchema

func (uc *UserController) SearchGeoFromSchema(c *gin.Context)

func (*UserController) ShowSingleGeo

func (uc *UserController) ShowSingleGeo(c *gin.Context)

临时数据单图斑获取

func (*UserController) ShowSingleGeoByXY

func (uc *UserController) ShowSingleGeoByXY(c *gin.Context)

坐标传入数据查询

func (*UserController) ShowTempGeo

func (uc *UserController) ShowTempGeo(c *gin.Context)

func (*UserController) ShowTempGeoList

func (uc *UserController) ShowTempGeoList(c *gin.Context)

func (*UserController) ShowTempLayer

func (uc *UserController) ShowTempLayer(c *gin.Context)

临时数据获取

func (*UserController) ShowTempLayerHeader

func (uc *UserController) ShowTempLayerHeader(c *gin.Context)

临时表单数据获取

func (*UserController) SpaceIntersect

func (uc *UserController) SpaceIntersect(c *gin.Context)

func (*UserController) SplitGeo

func (uc *UserController) SplitGeo(c *gin.Context)

图斑分割

func (*UserController) SurveyDataGet

func (uc *UserController) SurveyDataGet(c *gin.Context)

图斑信息回显

func (*UserController) TileSetGet

func (uc *UserController) TileSetGet(c *gin.Context)

获取头文件接口

func (*UserController) Tiles3DJson

func (uc *UserController) Tiles3DJson(c *gin.Context)

获取3dtilejson接口

func (*UserController) UpdateDevice

func (uc *UserController) UpdateDevice(c *gin.Context)

func (*UserController) UpdateLayer

func (uc *UserController) UpdateLayer(c *gin.Context)

func (*UserController) ZDTUpload

func (uc *UserController) ZDTUpload(c *gin.Context)

保存宗地图接口

type ZDList

type ZDList struct {
	Line geojson.FeatureCollection `json:"Line"`
	TBID string                    `json:"TBID"`
}

Jump to

Keyboard shortcuts

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