Documentation
¶
Overview ¶
service/file_service.go
texture_service.go
services/tile_cache_service.go
views/tile_server_manager.go
services/track_service.go
Index ¶
- func GetImg(ImgMap []ImgMap, LayerName string) []byte
- func GetSpatialRefByEPSG(epsg int) (string, error)
- func InitTileCacheService(db *gorm.DB)
- func ParseBounds(boundsStr string) (minLon, minLat, maxLon, maxLat float64, err error)
- func ParseCenter(centerStr string) (lon, lat float64, err error)
- type AddBandRequest
- type AllBandsInfoResponse
- type ApplyFilterRequest
- type AutoAdjustRequest
- type AutoColorBalanceRequest
- type BandHistogramResponse
- type BandInfoResponse
- type BandMathRequest
- type BandOperationResponse
- type BandStatisticsResponse
- type BatchColorBalanceRequest
- type BatchColorTaskResponse
- type BatchExpressionRequest
- type BatchExpressionResponse
- type BlockCalculateRequest
- type CLAHERequest
- type CalcOperationResponse
- type CalculateIndexRequest
- type ClipRequest
- type ClipResponse
- type ColorAdjustRequest
- type ColorBalanceRequest
- type ColorPipelineRequest
- type ColorStatisticsResponse
- type ColorTaskResponse
- type ConditionalReplaceRequest
- type ConvertBandTypeRequest
- type CurvePointDTO
- type CurvesAdjustRequest
- type DefineProjectionRequest
- type DefineProjectionWithGeoTransformRequest
- type DeleteNoDataRequest
- type DocumentBuilder
- func (db *DocumentBuilder) AddAnalysisParagraphConfig(config models.AnalysisParagraphConfig) *DocumentBuilder
- func (db *DocumentBuilder) AddContentItem(item models.ContentItem) error
- func (db *DocumentBuilder) AddContentItems(items []models.ContentItem) error
- func (db *DocumentBuilder) AddHeading1(config models.Heading1Config) *DocumentBuilder
- func (db *DocumentBuilder) AddHeading2(config models.Heading2Config) *DocumentBuilder
- func (db *DocumentBuilder) AddHeading3(config models.Heading3Config) *DocumentBuilder
- func (db *DocumentBuilder) AddImage(config models.ImageConfig, Img []byte) error
- func (db *DocumentBuilder) AddParagraph(config models.ParagraphConfig) *DocumentBuilder
- func (db *DocumentBuilder) AddTable(config models.TableConfig) error
- func (db *DocumentBuilder) Close() error
- func (db *DocumentBuilder) GetDocument() *document.Document
- func (db *DocumentBuilder) Save(filename string) error
- func (db *DocumentBuilder) SaveAndClose(filename string) error
- type DodgingBalanceRequest
- type Edge
- type ExpressionRequest
- type ExpressionWithConditionRequest
- type FileController
- type FileNode
- type FileService
- type GetBandHistogramRequest
- type GetBandStatisticsRequest
- type GetColorStatisticsRequest
- type GradientBlendRequest
- type Graph
- type HistogramEqualizeRequest
- type HistogramMatchRequest
- type ImgMap
- type IndexCalculateRequest
- type Item
- type LayerSymbolSetting
- type LayerTextureSetting
- type LevelsAdjustRequest
- type LinearRegressionBalanceRequest
- type MeanStdMatchRequest
- type MergeBandsRequest
- type MomentMatchRequest
- type MosaicPreviewRequest
- type MosaicPreviewResponse
- type MosaicRequest
- type MosaicResponse
- type Node
- type NormalizeBandRequest
- type PaletteEntryResponse
- type PaletteInfoResponse
- type PaletteToRGBRequest
- type PipelineStep
- type PresetColorRequest
- type PriorityQueue
- type ProjectionInfo
- type ProjectionResponse
- type QueryRasterTasksRequest
- type QueryRasterTasksResponse
- type RGBToPaletteRequest
- type RasterService
- func (s *RasterService) GetAllBandMetadata(sourcePath string, bandIndex int) (map[string]string, error)
- func (s *RasterService) GetAllBandsInfo(sourcePath string) (*AllBandsInfoResponse, error)
- func (s *RasterService) GetBandDescription(sourcePath string, bandIndex int) (string, error)
- func (s *RasterService) GetBandHistogram(req *GetBandHistogramRequest) (*BandHistogramResponse, error)
- func (s *RasterService) GetBandInfo(sourcePath string, bandIndex int) (*BandInfoResponse, error)
- func (s *RasterService) GetBandMetadata(sourcePath string, bandIndex int, key string) (string, error)
- func (s *RasterService) GetBandScaleOffset(sourcePath string, bandIndex int) (scale, offset float64, err error)
- func (s *RasterService) GetBandStatistics(req *GetBandStatisticsRequest) (*BandStatisticsResponse, error)
- func (s *RasterService) GetBandUnitType(sourcePath string, bandIndex int) (string, error)
- func (s *RasterService) GetColorStatistics(req *GetColorStatisticsRequest) (*ColorStatisticsResponse, error)
- func (s *RasterService) GetMosaicPreview(req *MosaicPreviewRequest) (*MosaicPreviewResponse, error)
- func (s *RasterService) GetPaletteInfo(sourcePath string, bandIndex int) (*PaletteInfoResponse, error)
- func (s *RasterService) GetProjectionInfo(sourcePath string) (*ProjectionInfo, error)
- func (s *RasterService) GetResamplePreview(req *ResamplePreviewRequest) (*ResamplePreviewResponse, error)
- func (s *RasterService) GetTaskList(page, pageSize int, status *int, taskID string) (*QueryRasterTasksResponse, error)
- func (s *RasterService) GetTaskStatus(taskID string) (*models.RasterRecord, error)
- func (s *RasterService) StartAddBandTask(req *AddBandRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartApplyFilterTask(req *ApplyFilterRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartAutoColorBalanceTask(req *AutoColorBalanceRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartAutoContrastTask(req *AutoAdjustRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartAutoLevelsTask(req *AutoAdjustRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartAutoWhiteBalanceTask(req *AutoAdjustRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartBandMathTask(req *BandMathRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartBatchColorBalanceTask(req *BatchColorBalanceRequest) (*BatchColorTaskResponse, error)
- func (s *RasterService) StartBatchExpressionTask(req *BatchExpressionRequest) (*BatchExpressionResponse, error)
- func (s *RasterService) StartBlockCalculateTask(req *BlockCalculateRequest) (*CalcOperationResponse, error)
- func (s *RasterService) StartBrightnessTask(req *SingleColorAdjustRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartCLAHETask(req *CLAHERequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartCalculateIndexTask(req *CalculateIndexRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartClipTask(req *ClipRequest) (*ClipResponse, error)
- func (s *RasterService) StartColorAdjustTask(req *ColorAdjustRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartColorBalanceTask(req *ColorBalanceRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartColorPipelineTask(req *ColorPipelineRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartConditionalReplaceTask(req *ConditionalReplaceRequest) (*CalcOperationResponse, error)
- func (s *RasterService) StartContrastTask(req *SingleColorAdjustRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartConvertBandTypeTask(req *ConvertBandTypeRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartCurvesTask(req *CurvesAdjustRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartDefineProjectionTask(req *DefineProjectionRequest) (*ProjectionResponse, error)
- func (s *RasterService) StartDefineProjectionWithGeoTransformTask(req *DefineProjectionWithGeoTransformRequest) (*ProjectionResponse, error)
- func (s *RasterService) StartDodgingBalanceTask(req *DodgingBalanceRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartEVITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
- func (s *RasterService) StartExpressionTask(req *ExpressionRequest) (*CalcOperationResponse, error)
- func (s *RasterService) StartExpressionWithConditionTask(req *ExpressionWithConditionRequest) (*CalcOperationResponse, error)
- func (s *RasterService) StartGammaTask(req *SingleColorAdjustRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartGradientBlendTask(req *GradientBlendRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartHistogramEqualizeTask(req *HistogramEqualizeRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartHistogramMatchTask(req *HistogramMatchRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartHueTask(req *SingleColorAdjustRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartLAITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
- func (s *RasterService) StartLevelsTask(req *LevelsAdjustRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartLinearRegressionBalanceTask(req *LinearRegressionBalanceRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartMNDWITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
- func (s *RasterService) StartMeanStdMatchTask(req *MeanStdMatchRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartMergeBandsTask(req *MergeBandsRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartMomentMatchTask(req *MomentMatchRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartMosaicTask(req *MosaicRequest) (*MosaicResponse, error)
- func (s *RasterService) StartNDBITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
- func (s *RasterService) StartNDSITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
- func (s *RasterService) StartNDVITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
- func (s *RasterService) StartNDWITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
- func (s *RasterService) StartNormalizeBandTask(req *NormalizeBandRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartPaletteToRGBTask(req *PaletteToRGBRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartPresetColorTask(req *PresetColorRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartRGBToPaletteTask(req *RGBToPaletteRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartReclassifyTask(req *ReclassifyRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartRemoveBandTask(req *RemoveBandRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartReorderBandsTask(req *ReorderBandsRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartReprojectTask(req *ReprojectRequest) (*ProjectionResponse, error)
- func (s *RasterService) StartResampleTask(req *ResampleRequest) (*ResampleResponse, error)
- func (s *RasterService) StartSAVITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
- func (s *RasterService) StartSCurveTask(req *SCurveRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartSaturationTask(req *SingleColorAdjustRequest) (*ColorTaskResponse, error)
- func (s *RasterService) StartSetBandDescriptionTask(req *SetBandDescriptionRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartSetBandMetadataTask(req *SetBandMetadataRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartSetColorInterpTask(req *SetColorInterpRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartSetNoDataTask(req *SetNoDataRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartSetPaletteTask(req *SetPaletteRequest) (*BandOperationResponse, error)
- func (s *RasterService) StartWallisFilterTask(req *WallisFilterRequest) (*ColorTaskResponse, error)
- func (s *RasterService) ValidateExpression(req *ValidateExpressionRequest) (*ValidateExpressionResponse, error)
- type ReclassifyRequest
- type ReclassifyRule
- type ReferenceRegionDTO
- type RemoveBandRequest
- type ReorderBandsRequest
- type ReplaceCondition
- type ReprojectRequest
- type ResamplePreviewRequest
- type ResamplePreviewResponse
- type ResampleRequest
- type ResampleResponse
- type SCurveRequest
- type SetBandDescriptionRequest
- type SetBandMetadataRequest
- type SetColorInterpRequest
- type SetNoDataRequest
- type SetPaletteRequest
- type SingleColorAdjustRequest
- type SplitResult
- type SymbolDetail
- type SymbolListItem
- type SymbolService
- func (s *SymbolService) BatchUpload(files []*multipart.FileHeader, category string) ([]models.Symbol, []error)
- func (s *SymbolService) Delete(id uint) error
- func (s *SymbolService) GetByID(id uint) (*SymbolDetail, error)
- func (s *SymbolService) GetCategories() ([]string, error)
- func (s *SymbolService) GetImageData(id uint) ([]byte, string, error)
- func (s *SymbolService) GetLayerSymbol(layerName string) (*LayerSymbolSetting, error)
- func (s *SymbolService) GetUsedSymbols(host string) ([]SymbolListItem, error)
- func (s *SymbolService) List(page, pageSize int, category string) ([]SymbolListItem, int64, error)
- func (s *SymbolService) Search(query string, page, pageSize int, host string, category string) ([]SymbolListItem, int64, error)
- func (s *SymbolService) SetLayerSymbol(layerName string, setting LayerSymbolSetting) error
- func (s *SymbolService) Update(id uint, name, description, category string) error
- func (s *SymbolService) Upload(req *SymbolUploadRequest) (*models.Symbol, error)
- type SymbolSet
- type SymbolUploadRequest
- type TextureListItem
- type TextureService
- func (s *TextureService) ConvertToPNG(file *multipart.FileHeader) ([]byte, error)
- func (s *TextureService) Delete(id uint) error
- func (s *TextureService) GetByID(id uint) (*models.Texture, error)
- func (s *TextureService) GetImageData(id uint) ([]byte, error)
- func (s *TextureService) GetLayerTexture(layerName string) (*LayerTextureSetting, error)
- func (s *TextureService) GetRawImage(id uint) (image.Image, error)
- func (s *TextureService) GetUsedTextures(host string) ([]TextureListItem, error)
- func (s *TextureService) List(page, pageSize int) ([]TextureListItem, int64, error)
- func (s *TextureService) Search(query string, page, pageSize int, host string) ([]TextureListItem, int64, error)
- func (s *TextureService) SetLayerTexture(layerName string, textureSets LayerTextureSetting) error
- func (s *TextureService) Upload(req *UploadRequest) (*models.Texture, error)
- type TextureSet
- type TileCacheService
- func (s *TileCacheService) ClearCache(serviceName string) error
- func (s *TileCacheService) DropCacheTable(serviceName string) error
- func (s *TileCacheService) EnsureCacheTable(serviceName string) error
- func (s *TileCacheService) GetCachedTile(serviceName string, z, x, y int, tileType, encoding string) ([]byte, bool, error)
- func (s *TileCacheService) SetCachedTile(serviceName string, z, x, y int, tileType, encoding string, data []byte) error
- type TileServerManager
- func (m *TileServerManager) AddService(raster *models.DynamicRaster) error
- func (m *TileServerManager) CloseAll()
- func (m *TileServerManager) DeleteService(name string) error
- func (m *TileServerManager) GetServer(name string) (*Gogeo.TileServer, *models.DynamicRaster, error)
- func (m *TileServerManager) GetServiceConfig(name string) (*models.DynamicRaster, error)
- func (m *TileServerManager) ListRunningServices() []string
- func (m *TileServerManager) ListServices() ([]models.DynamicRaster, error)
- func (m *TileServerManager) LoadAllServices()
- func (m *TileServerManager) RefreshService(name string) error
- func (m *TileServerManager) StartServer(name string) error
- func (m *TileServerManager) StopServer(name string)
- func (m *TileServerManager) UpdateService(name string, updates map[string]interface{}) error
- type TrackService
- func (s *TrackService) CalculateShortestPath(ctx context.Context, linesGeoJSON *geojson.FeatureCollection, ...) (*geojson.FeatureCollection, error)
- func (s *TrackService) FindNearestPointOnLines(ctx context.Context, linesGeoJSON *geojson.FeatureCollection, ...) (snappedPoint []float64, distance float64, lineID int, err error)
- func (s *TrackService) GetAndBreakGeometries(ctx context.Context, layerNames []string, bbox geojson.FeatureCollection) (*geojson.FeatureCollection, error)
- type UploadRequest
- type ValidateExpressionRequest
- type ValidateExpressionResponse
- type WallisFilterRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSpatialRefByEPSG ¶ added in v1.8.6
func InitTileCacheService ¶ added in v1.8.7
InitTileCacheService 初始化缓存服务(在应用启动时调用)
func ParseBounds ¶ added in v1.7.4
ParseBounds 解析边界字符串
func ParseCenter ¶ added in v1.7.4
ParseCenter 解析中心点字符串
Types ¶
type AddBandRequest ¶ added in v1.8.5
type AddBandRequest struct {
SourcePath string `json:"source_path" binding:"required"`
DataType int `json:"data_type"`
ColorInterp int `json:"color_interp"`
NoDataValue float64 `json:"nodata_value"`
OutputName string `json:"output_name"`
}
AddBandRequest 添加波段请求
type AllBandsInfoResponse ¶ added in v1.8.5
type AllBandsInfoResponse struct {
BandCount int `json:"band_count"`
Bands []BandInfoResponse `json:"bands"`
}
AllBandsInfoResponse 所有波段信息响应
type ApplyFilterRequest ¶ added in v1.8.5
type ApplyFilterRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
FilterType int `json:"filter_type"` // 0-均值,1-中值,2-高斯,3-Sobel,4-拉普拉斯,5-最小,6-最大
KernelSize int `json:"kernel_size"` // 必须为奇数
OutputName string `json:"output_name"`
}
ApplyFilterRequest 应用滤波请求
type AutoAdjustRequest ¶ added in v1.8.5
type AutoAdjustRequest struct {
SourcePath string `json:"source_path" binding:"required"`
ClipPercent float64 `json:"clip_percent"` // 用于自动色阶
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
AutoAdjustRequest 自动调整请求
type AutoColorBalanceRequest ¶ added in v1.8.5
type AutoColorBalanceRequest struct {
SourcePath string `json:"source_path" binding:"required"`
ReferencePath string `json:"reference_path" binding:"required"`
OverlapRegion *ReferenceRegionDTO `json:"overlap_region"`
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
AutoColorBalanceRequest 自动匀色请求
type BandHistogramResponse ¶ added in v1.8.5
type BandHistogramResponse struct {
BandIndex int `json:"band_index"`
Buckets int `json:"buckets"`
Min float64 `json:"min"`
Max float64 `json:"max"`
Histogram []uint64 `json:"histogram"`
}
BandHistogramResponse 波段直方图响应
type BandInfoResponse ¶ added in v1.8.5
type BandInfoResponse struct {
BandIndex int `json:"band_index"`
DataType string `json:"data_type"`
ColorInterp string `json:"color_interp"`
NoDataValue float64 `json:"nodata_value"`
HasNoData bool `json:"has_nodata"`
MinValue float64 `json:"min_value"`
MaxValue float64 `json:"max_value"`
HasStats bool `json:"has_stats"`
}
BandInfoResponse 波段信息响应
type BandMathRequest ¶ added in v1.8.5
type BandMathRequest struct {
SourcePath string `json:"source_path" binding:"required"`
Band1 int `json:"band1" binding:"required,min=1"`
Band2 int `json:"band2"` // 为0时使用标量运算
Scalar float64 `json:"scalar"` // 标量值
Operation int `json:"operation"` // 0-加,1-减,2-乘,3-除,4-最小,5-最大,6-幂
OutputName string `json:"output_name"`
}
BandMathRequest 波段运算请求
type BandOperationResponse ¶ added in v1.8.5
type BandOperationResponse struct {
TaskID string `json:"task_id"`
OutputPath string `json:"output_path"`
Message string `json:"message"`
}
BandOperationResponse 波段操作响应
type BandStatisticsResponse ¶ added in v1.8.5
type BandStatisticsResponse struct {
Min float64 `json:"min"`
Max float64 `json:"max"`
Mean float64 `json:"mean"`
Stddev float64 `json:"stddev"`
Histogram []int `json:"histogram"`
}
BandStatisticsResponse 波段统计响应
type BatchColorBalanceRequest ¶ added in v1.8.5
type BatchColorBalanceRequest struct {
SourcePaths []string `json:"source_paths" binding:"required,min=1"`
ReferencePath string `json:"reference_path" binding:"required"`
Method int `json:"method"`
Strength float64 `json:"strength"`
OverlapRegion *ReferenceRegionDTO `json:"overlap_region"`
OutputFormat string `json:"output_format"`
}
BatchColorBalanceRequest 批量匀色请求
type BatchColorTaskResponse ¶ added in v1.8.5
type BatchColorTaskResponse struct {
TaskID string `json:"task_id"`
OutputPaths []string `json:"output_paths"`
Message string `json:"message"`
}
BatchColorTaskResponse 批量任务响应
type BatchExpressionRequest ¶ added in v1.8.5
type BatchExpressionRequest struct {
SourcePath string `json:"source_path" binding:"required"`
Expressions []string `json:"expressions" binding:"required,min=1"`
OutputName string `json:"output_name"`
}
BatchExpressionRequest 批量表达式请求
type BatchExpressionResponse ¶ added in v1.8.5
type BatchExpressionResponse struct {
TaskID string `json:"task_id"`
OutputPaths []string `json:"output_paths"`
Message string `json:"message"`
}
BatchExpressionResponse 批量表达式响应
type BlockCalculateRequest ¶ added in v1.8.5
type BlockCalculateRequest struct {
SourcePath string `json:"source_path" binding:"required"`
Expression string `json:"expression" binding:"required"`
BlockWidth int `json:"block_width"`
BlockHeight int `json:"block_height"`
OutputName string `json:"output_name"`
}
BlockCalculateRequest 分块计算请求
type CLAHERequest ¶ added in v1.8.5
type CLAHERequest struct {
SourcePath string `json:"source_path" binding:"required"`
TileSize int `json:"tile_size"` // 默认8
ClipLimit float64 `json:"clip_limit"` // 默认2.0
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
CLAHERequest CLAHE均衡化请求
type CalcOperationResponse ¶ added in v1.8.5
type CalcOperationResponse struct {
TaskID string `json:"task_id"`
OutputPath string `json:"output_path"`
Message string `json:"message"`
}
CalcOperationResponse 计算操作响应
type CalculateIndexRequest ¶ added in v1.8.5
type CalculateIndexRequest struct {
SourcePath string `json:"source_path" binding:"required"`
IndexType string `json:"index_type" binding:"required"` // NDVI, NDWI, EVI
NIRBand int `json:"nir_band"`
RedBand int `json:"red_band"`
GreenBand int `json:"green_band"`
BlueBand int `json:"blue_band"`
OutputName string `json:"output_name"`
}
CalculateIndexRequest 计算指数请求
type ClipRequest ¶ added in v1.8.5
type ClipRequest struct {
SourcePath string `json:"source_path" binding:"required"`
NameField string `json:"name_field"`
JPEGQuality int `json:"jpeg_quality"`
BufferDist float64 `json:"buffer_dist"`
ImageFormat string `json:"image_format"`
LayerName string `json:"layer_name" binding:"required"`
}
ClipRequest 裁剪请求参数
type ClipResponse ¶ added in v1.8.5
type ClipResponse struct {
TaskID string `json:"task_id"`
OutputPath string `json:"output_path"`
Message string `json:"message"`
}
ClipResponse 裁剪响应
type ColorAdjustRequest ¶ added in v1.8.5
type ColorAdjustRequest struct {
SourcePath string `json:"source_path" binding:"required"`
Brightness float64 `json:"brightness"` // [-1.0, 1.0]
Contrast float64 `json:"contrast"` // [-1.0, 1.0]
Saturation float64 `json:"saturation"` // [-1.0, 1.0]
Gamma float64 `json:"gamma"` // [0.1, 10.0]
Hue float64 `json:"hue"` // [-180, 180]
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
ColorAdjustRequest 综合调色请求
type ColorBalanceRequest ¶ added in v1.8.5
type ColorBalanceRequest struct {
SourcePath string `json:"source_path" binding:"required"`
ReferencePath string `json:"reference_path"`
Method int `json:"method" binding:"required"` // 0-直方图匹配,1-均值标准差,2-Wallis,3-矩匹配,4-线性回归,5-Dodging
Strength float64 `json:"strength"`
OverlapRegion *ReferenceRegionDTO `json:"overlap_region"`
WallisC float64 `json:"wallis_c"`
WallisB float64 `json:"wallis_b"`
TargetMean float64 `json:"target_mean"`
TargetStd float64 `json:"target_std"`
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
ColorBalanceRequest 通用匀色请求
type ColorPipelineRequest ¶ added in v1.8.5
type ColorPipelineRequest struct {
SourcePath string `json:"source_path" binding:"required"`
Steps []PipelineStep `json:"steps" binding:"required,min=1"`
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
ColorPipelineRequest 调色管道请求
type ColorStatisticsResponse ¶ added in v1.8.5
type ColorStatisticsResponse struct {
MeanR float64 `json:"mean_r"`
MeanG float64 `json:"mean_g"`
MeanB float64 `json:"mean_b"`
StdR float64 `json:"std_r"`
StdG float64 `json:"std_g"`
StdB float64 `json:"std_b"`
MinR float64 `json:"min_r"`
MinG float64 `json:"min_g"`
MinB float64 `json:"min_b"`
MaxR float64 `json:"max_r"`
MaxG float64 `json:"max_g"`
MaxB float64 `json:"max_b"`
}
ColorStatisticsResponse 颜色统计响应
type ColorTaskResponse ¶ added in v1.8.5
type ColorTaskResponse struct {
TaskID string `json:"task_id"`
OutputPath string `json:"output_path"`
Message string `json:"message"`
}
ColorTaskResponse 调色任务响应
type ConditionalReplaceRequest ¶ added in v1.8.5
type ConditionalReplaceRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
Conditions []ReplaceCondition `json:"conditions" binding:"required,min=1"`
OutputName string `json:"output_name"`
}
ConditionalReplaceRequest 条件替换请求
type ConvertBandTypeRequest ¶ added in v1.8.5
type ConvertBandTypeRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
NewType int `json:"new_type" binding:"required"`
OutputName string `json:"output_name"`
}
ConvertBandTypeRequest 转换波段数据类型请求
type CurvePointDTO ¶ added in v1.8.5
type CurvePointDTO struct {
Input float64 `json:"input"` // [0, 255]
Output float64 `json:"output"` // [0, 255]
}
CurvePointDTO 曲线控制点
type CurvesAdjustRequest ¶ added in v1.8.5
type CurvesAdjustRequest struct {
SourcePath string `json:"source_path" binding:"required"`
Points []CurvePointDTO `json:"points" binding:"required,min=2"`
Channel int `json:"channel"` // 0=全部, 1=R, 2=G, 3=B
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
CurvesAdjustRequest 曲线调整请求
type DefineProjectionRequest ¶ added in v1.8.5
type DefineProjectionRequest struct {
SourcePath string `json:"source_path" binding:"required"` // 源文件路径
EPSG int `json:"epsg" binding:"required"` // EPSG代码
InPlace bool `json:"in_place"` // 是否直接修改原文件,默认false生成新文件
OutputName string `json:"output_name"` // 输出文件名(不含扩展名)
}
DefineProjectionRequest 定义投影请求
type DefineProjectionWithGeoTransformRequest ¶ added in v1.8.5
type DefineProjectionWithGeoTransformRequest struct {
SourcePath string `json:"source_path" binding:"required"` // 源文件路径
EPSG int `json:"epsg" binding:"required"` // EPSG代码
GeoTransform [6]float64 `json:"geo_transform" binding:"required"` // 地理变换参数
InPlace bool `json:"in_place"` // 是否直接修改原文件
OutputName string `json:"output_name"` // 输出文件名
}
DefineProjectionWithGeoTransformRequest 定义投影并设置地理变换请求
type DeleteNoDataRequest ¶ added in v1.8.5
type DeleteNoDataRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
InPlace bool `json:"in_place"`
OutputName string `json:"output_name"`
}
DeleteNoDataRequest 删除NoData请求
type DocumentBuilder ¶ added in v1.3.10
type DocumentBuilder struct {
Geo *geojson.FeatureCollection
IMGMap []ImgMap
// contains filtered or unexported fields
}
DocumentBuilder Word文档构建器
func NewDocumentBuilderFromBytes ¶ added in v1.3.10
func NewDocumentBuilderFromBytes(data []byte) (*DocumentBuilder, error)
在 services 包中添加
func NewDocumentBuilderFromFile ¶ added in v1.3.10
func NewDocumentBuilderFromFile(filename string) (*DocumentBuilder, error)
NewDocumentBuilderFromFile 从现有文件创建文档构建器
func (*DocumentBuilder) AddAnalysisParagraphConfig ¶ added in v1.3.10
func (db *DocumentBuilder) AddAnalysisParagraphConfig(config models.AnalysisParagraphConfig) *DocumentBuilder
AddParagraph 插入正文
func (*DocumentBuilder) AddContentItem ¶ added in v1.3.10
func (db *DocumentBuilder) AddContentItem(item models.ContentItem) error
AddContentItem 根据ContentItem配置添加单个内容
func (*DocumentBuilder) AddContentItems ¶ added in v1.3.10
func (db *DocumentBuilder) AddContentItems(items []models.ContentItem) error
AddContentItems 批量添加内容
func (*DocumentBuilder) AddHeading1 ¶ added in v1.3.10
func (db *DocumentBuilder) AddHeading1(config models.Heading1Config) *DocumentBuilder
AddHeading1 插入1级标题
func (*DocumentBuilder) AddHeading2 ¶ added in v1.3.10
func (db *DocumentBuilder) AddHeading2(config models.Heading2Config) *DocumentBuilder
AddHeading2 插入2级标题
func (*DocumentBuilder) AddHeading3 ¶ added in v1.3.10
func (db *DocumentBuilder) AddHeading3(config models.Heading3Config) *DocumentBuilder
AddHeading3 插入3级标题
func (*DocumentBuilder) AddImage ¶ added in v1.3.10
func (db *DocumentBuilder) AddImage(config models.ImageConfig, Img []byte) error
AddImage 插入图片
func (*DocumentBuilder) AddParagraph ¶ added in v1.3.10
func (db *DocumentBuilder) AddParagraph(config models.ParagraphConfig) *DocumentBuilder
AddParagraph 插入正文
func (*DocumentBuilder) AddTable ¶ added in v1.3.10
func (db *DocumentBuilder) AddTable(config models.TableConfig) error
AddTable 插入表格
func (*DocumentBuilder) Close ¶ added in v1.3.10
func (db *DocumentBuilder) Close() error
Close 关闭文档
func (*DocumentBuilder) GetDocument ¶ added in v1.3.10
func (db *DocumentBuilder) GetDocument() *document.Document
GetDocument 获取底层文档对象
func (*DocumentBuilder) Save ¶ added in v1.3.10
func (db *DocumentBuilder) Save(filename string) error
Save 保存文档
func (*DocumentBuilder) SaveAndClose ¶ added in v1.3.10
func (db *DocumentBuilder) SaveAndClose(filename string) error
SaveAndClose 保存并关闭文档
type DodgingBalanceRequest ¶ added in v1.8.5
type DodgingBalanceRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BlockSize int `json:"block_size"` // 默认128
Strength float64 `json:"strength"` // [0, 1]
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
DodgingBalanceRequest Dodging匀光请求
type ExpressionRequest ¶ added in v1.8.5
type ExpressionRequest struct {
SourcePath string `json:"source_path" binding:"required"`
Expression string `json:"expression" binding:"required"`
OutputName string `json:"output_name"`
TargetBand int `json:"target_band"` // 写入目标波段(0表示创建新文件)
}
ExpressionRequest 表达式计算请求
type ExpressionWithConditionRequest ¶ added in v1.8.5
type ExpressionWithConditionRequest struct {
SourcePath string `json:"source_path" binding:"required"`
Expression string `json:"expression" binding:"required"`
Condition string `json:"condition"`
NoDataValue float64 `json:"nodata_value"`
OutputName string `json:"output_name"`
TargetBand int `json:"target_band"` // >0: 写入源数据集的指定波段后导出; 0: 创建单波段新文件
SetNoData bool `json:"set_nodata"` // 是否将nodata_value设为波段NoData元数据
}
type FileController ¶ added in v1.3.4
type FileController struct {
// contains filtered or unexported fields
}
func NewFileController ¶ added in v1.3.4
func NewFileController(fileService *FileService) *FileController
func (*FileController) GetDirectoryContent ¶ added in v1.3.4
func (c *FileController) GetDirectoryContent(ctx *gin.Context)
GetDirectoryContent 获取目录内容(懒加载)
func (*FileController) GetRootPath ¶ added in v1.3.4
func (c *FileController) GetRootPath(ctx *gin.Context)
GetRootPath 获取根目录路径
type FileService ¶ added in v1.3.4
type FileService struct {
RootPath string // 限制访问的根目录
}
func NewFileService ¶ added in v1.3.4
func NewFileService(rootPath string) *FileService
func (*FileService) GetDirectoryContent ¶ added in v1.3.4
func (s *FileService) GetDirectoryContent(requestPath string) ([]FileNode, error)
GetDirectoryContent 获取指定目录下的直接子项(非递归)
func (*FileService) GetRootPath ¶ added in v1.3.4
func (s *FileService) GetRootPath() string
GetRootPath 获取根目录信息
type GetBandHistogramRequest ¶ added in v1.8.5
type GetBandHistogramRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
Buckets int `json:"buckets"`
Min float64 `json:"min"`
Max float64 `json:"max"`
}
GetBandHistogramRequest 获取直方图请求
type GetBandStatisticsRequest ¶ added in v1.8.5
type GetBandStatisticsRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required"`
Region *ReferenceRegionDTO `json:"region"`
}
GetBandStatisticsRequest 获取波段统计请求
type GetColorStatisticsRequest ¶ added in v1.8.5
type GetColorStatisticsRequest struct {
SourcePath string `json:"source_path" binding:"required"`
Region *ReferenceRegionDTO `json:"region"` // 可选区域
}
GetColorStatisticsRequest 获取颜色统计请求
type GradientBlendRequest ¶ added in v1.8.5
type GradientBlendRequest struct {
SourcePath1 string `json:"source_path1" binding:"required"`
SourcePath2 string `json:"source_path2" binding:"required"`
OverlapRegion ReferenceRegionDTO `json:"overlap_region" binding:"required"`
BlendWidth int `json:"blend_width"`
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
GradientBlendRequest 渐变融合请求
type HistogramEqualizeRequest ¶ added in v1.8.5
type HistogramEqualizeRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index"` // 0=全部波段
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
HistogramEqualizeRequest 直方图均衡化请求
type HistogramMatchRequest ¶ added in v1.8.5
type HistogramMatchRequest struct {
SourcePath string `json:"source_path" binding:"required"`
ReferencePath string `json:"reference_path" binding:"required"`
SrcRegion *ReferenceRegionDTO `json:"src_region"`
RefRegion *ReferenceRegionDTO `json:"ref_region"`
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
HistogramMatchRequest 直方图匹配请求
type IndexCalculateRequest ¶ added in v1.8.5
type IndexCalculateRequest struct {
SourcePath string `json:"source_path" binding:"required"`
NIRBand int `json:"nir_band"`
RedBand int `json:"red_band"`
GreenBand int `json:"green_band"`
BlueBand int `json:"blue_band"`
SWIRBand int `json:"swir_band"`
LFactor float64 `json:"l_factor"` // SAVI的L参数
OutputName string `json:"output_name"`
}
IndexCalculateRequest 遥感指数计算通用请求
type LayerSymbolSetting ¶ added in v1.5.3
type LayerSymbolSetting struct {
LayerName string `json:"layer_name"`
AttName string `json:"att_name"`
SymbolSets []SymbolSet `json:"symbol_sets"`
}
LayerSymbolSetting 图层图标设置
type LayerTextureSetting ¶ added in v1.4.12
type LayerTextureSetting struct {
LayerName string `json:"layer_name"`
AttName string `json:"attribute_name"`
TextureSets []TextureSet `json:"texture_sets"`
}
type LevelsAdjustRequest ¶ added in v1.8.5
type LevelsAdjustRequest struct {
SourcePath string `json:"source_path" binding:"required"`
InputMin float64 `json:"input_min"`
InputMax float64 `json:"input_max"`
OutputMin float64 `json:"output_min"`
OutputMax float64 `json:"output_max"`
Midtone float64 `json:"midtone"` // [0.1, 9.9], 1.0为不变
BandIndex int `json:"band_index"` // 0=全部波段
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
LevelsAdjustRequest 色阶调整请求
type LinearRegressionBalanceRequest ¶ added in v1.8.5
type LinearRegressionBalanceRequest struct {
SourcePath string `json:"source_path" binding:"required"`
ReferencePath string `json:"reference_path" binding:"required"`
OverlapRegion ReferenceRegionDTO `json:"overlap_region" binding:"required"`
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
LinearRegressionBalanceRequest 线性回归匀色请求
type MeanStdMatchRequest ¶ added in v1.8.5
type MeanStdMatchRequest struct {
SourcePath string `json:"source_path" binding:"required"`
TargetMeanR float64 `json:"target_mean_r"`
TargetMeanG float64 `json:"target_mean_g"`
TargetMeanB float64 `json:"target_mean_b"`
TargetStdR float64 `json:"target_std_r"`
TargetStdG float64 `json:"target_std_g"`
TargetStdB float64 `json:"target_std_b"`
Region *ReferenceRegionDTO `json:"region"`
Strength float64 `json:"strength"` // [0, 1]
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
MeanStdMatchRequest 均值-标准差匹配请求
type MergeBandsRequest ¶ added in v1.8.5
type MergeBandsRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndices []int `json:"band_indices" binding:"required,min=1"`
OutputName string `json:"output_name"`
}
MergeBandsRequest 合并波段请求
type MomentMatchRequest ¶ added in v1.8.5
type MomentMatchRequest struct {
SourcePath string `json:"source_path" binding:"required"`
ReferencePath string `json:"reference_path" binding:"required"`
SrcRegion *ReferenceRegionDTO `json:"src_region"`
RefRegion *ReferenceRegionDTO `json:"ref_region"`
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
MomentMatchRequest 矩匹配请求
type MosaicPreviewRequest ¶ added in v1.8.5
type MosaicPreviewRequest struct {
SourcePaths []string `json:"source_paths" binding:"required,min=2"`
ForceBandMatch bool `json:"force_band_match"`
}
MosaicPreviewRequest 镶嵌预览请求
type MosaicPreviewResponse ¶ added in v1.8.5
type MosaicPreviewResponse struct {
MinX float64 `json:"min_x"`
MinY float64 `json:"min_y"`
MaxX float64 `json:"max_x"`
MaxY float64 `json:"max_y"`
ResX float64 `json:"res_x"`
ResY float64 `json:"res_y"`
Width int `json:"width"`
Height int `json:"height"`
BandCount int `json:"band_count"`
DataType string `json:"data_type"`
Projection string `json:"projection"`
EstimatedSize int64 `json:"estimated_size"` // 预估大小(字节)
}
MosaicPreviewResponse 镶嵌预览响应
type MosaicRequest ¶ added in v1.8.5
type MosaicRequest struct {
SourcePaths []string `json:"source_paths" binding:"required,min=2"` // 输入文件路径列表
OutputName string `json:"output_name"` // 输出文件名
OutputFormat string `json:"output_format"` // 输出格式: GTiff, JPEG, PNG
ResampleMethod int `json:"resample_method"` // 重采样方法: 0-最近邻,1-双线性,2-三次卷积
ForceBandMatch bool `json:"force_band_match"` // 强制波段匹配
NoDataValue float64 `json:"nodata_value"` // NoData值
HasNoData bool `json:"has_nodata"` // 是否设置NoData
Priorities []int `json:"priorities"` // 优先级(可选)
}
MosaicRequest 镶嵌请求参数
type MosaicResponse ¶ added in v1.8.5
type MosaicResponse struct {
TaskID string `json:"task_id"`
OutputPath string `json:"output_path"`
Message string `json:"message"`
}
MosaicResponse 镶嵌响应
type NormalizeBandRequest ¶ added in v1.8.5
type NormalizeBandRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
NewMin float64 `json:"new_min"`
NewMax float64 `json:"new_max"`
OutputName string `json:"output_name"`
}
NormalizeBandRequest 归一化波段请求
type PaletteEntryResponse ¶ added in v1.8.5
type PaletteEntryResponse struct {
Index int `json:"index"`
R int16 `json:"r"`
G int16 `json:"g"`
B int16 `json:"b"`
A int16 `json:"a"`
}
PaletteEntryResponse 调色板条目响应
type PaletteInfoResponse ¶ added in v1.8.5
type PaletteInfoResponse struct {
BandIndex int `json:"band_index"`
EntryCount int `json:"entry_count"`
InterpType string `json:"interp_type"`
Entries []PaletteEntryResponse `json:"entries"`
}
PaletteInfoResponse 调色板信息响应
type PaletteToRGBRequest ¶ added in v1.8.5
type PaletteToRGBRequest struct {
SourcePath string `json:"source_path" binding:"required"`
OutputName string `json:"output_name"`
}
PaletteToRGBRequest 调色板转RGB请求
type PipelineStep ¶ added in v1.8.5
type PipelineStep struct {
Operation string `json:"operation"` // brightness, contrast, saturation, gamma, hue, auto_levels, auto_white_balance, clahe
Params map[string]interface{} `json:"params"`
}
PipelineStep 管道步骤
type PresetColorRequest ¶ added in v1.8.5
type PresetColorRequest struct {
SourcePath string `json:"source_path" binding:"required"`
PresetName string `json:"preset_name" binding:"required"` // vivid, soft, high_contrast, warm, cool, black_white, sepia
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
PresetColorRequest 预设调色请求
type PriorityQueue ¶ added in v1.3.2
type PriorityQueue []*Item
func (PriorityQueue) Len ¶ added in v1.3.2
func (pq PriorityQueue) Len() int
func (PriorityQueue) Less ¶ added in v1.3.2
func (pq PriorityQueue) Less(i, j int) bool
func (*PriorityQueue) Pop ¶ added in v1.3.2
func (pq *PriorityQueue) Pop() interface{}
func (*PriorityQueue) Push ¶ added in v1.3.2
func (pq *PriorityQueue) Push(x interface{})
func (PriorityQueue) Swap ¶ added in v1.3.2
func (pq PriorityQueue) Swap(i, j int)
type ProjectionInfo ¶ added in v1.8.5
type ProjectionInfo struct {
Width int `json:"width"`
Height int `json:"height"`
BandCount int `json:"band_count"`
Projection string `json:"projection"`
GeoTransform [6]float64 `json:"geo_transform"`
HasGeoInfo bool `json:"has_geo_info"`
Bounds [4]float64 `json:"bounds"` // minX, minY, maxX, maxY
}
ProjectionInfo 投影信息
type ProjectionResponse ¶ added in v1.8.5
type ProjectionResponse struct {
TaskID string `json:"task_id"`
OutputPath string `json:"output_path"`
Message string `json:"message"`
}
ProjectionResponse 投影操作响应
type QueryRasterTasksRequest ¶ added in v1.8.6
type QueryRasterTasksRequest struct {
Page int `json:"page"`
PageSize int `json:"pageSize"`
Status *int `json:"status"` // 可选,按状态筛选
TaskID string `json:"taskId"` // 可选,按任务ID筛选
}
分页查询请求参数
type QueryRasterTasksResponse ¶ added in v1.8.6
type QueryRasterTasksResponse struct {
Total int64 `json:"total"`
Page int `json:"page"`
PageSize int `json:"page_size"`
List []models.RasterRecord `json:"list"`
}
分页查询响应数据
type RGBToPaletteRequest ¶ added in v1.8.5
type RGBToPaletteRequest struct {
SourcePath string `json:"source_path" binding:"required"`
ColorCount int `json:"color_count" binding:"required,min=1,max=256"`
OutputName string `json:"output_name"`
}
RGBToPaletteRequest RGB转调色板请求
type RasterService ¶ added in v1.8.5
type RasterService struct {
}
RasterService 栅格裁剪服务
func (*RasterService) GetAllBandMetadata ¶ added in v1.8.5
func (s *RasterService) GetAllBandMetadata(sourcePath string, bandIndex int) (map[string]string, error)
GetAllBandMetadata 获取波段所有元数据
func (*RasterService) GetAllBandsInfo ¶ added in v1.8.5
func (s *RasterService) GetAllBandsInfo(sourcePath string) (*AllBandsInfoResponse, error)
GetAllBandsInfo 获取所有波段信息
func (*RasterService) GetBandDescription ¶ added in v1.8.5
func (s *RasterService) GetBandDescription(sourcePath string, bandIndex int) (string, error)
GetBandDescription 获取波段描述
func (*RasterService) GetBandHistogram ¶ added in v1.8.5
func (s *RasterService) GetBandHistogram(req *GetBandHistogramRequest) (*BandHistogramResponse, error)
GetBandHistogram 获取波段直方图
func (*RasterService) GetBandInfo ¶ added in v1.8.5
func (s *RasterService) GetBandInfo(sourcePath string, bandIndex int) (*BandInfoResponse, error)
GetBandInfo 获取单个波段信息
func (*RasterService) GetBandMetadata ¶ added in v1.8.5
func (s *RasterService) GetBandMetadata(sourcePath string, bandIndex int, key string) (string, error)
GetBandMetadata 获取波段元数据
func (*RasterService) GetBandScaleOffset ¶ added in v1.8.5
func (s *RasterService) GetBandScaleOffset(sourcePath string, bandIndex int) (scale, offset float64, err error)
GetBandScaleOffset 获取波段缩放和偏移
func (*RasterService) GetBandStatistics ¶ added in v1.8.5
func (s *RasterService) GetBandStatistics(req *GetBandStatisticsRequest) (*BandStatisticsResponse, error)
GetBandStatistics 获取波段统计信息(同步)- 续
func (*RasterService) GetBandUnitType ¶ added in v1.8.5
func (s *RasterService) GetBandUnitType(sourcePath string, bandIndex int) (string, error)
GetBandUnitType 获取波段单位类型
func (*RasterService) GetColorStatistics ¶ added in v1.8.5
func (s *RasterService) GetColorStatistics(req *GetColorStatisticsRequest) (*ColorStatisticsResponse, error)
GetColorStatistics 获取颜色统计信息(同步)
func (*RasterService) GetMosaicPreview ¶ added in v1.8.5
func (s *RasterService) GetMosaicPreview(req *MosaicPreviewRequest) (*MosaicPreviewResponse, error)
GetMosaicPreview 获取镶嵌预览信息
func (*RasterService) GetPaletteInfo ¶ added in v1.8.5
func (s *RasterService) GetPaletteInfo(sourcePath string, bandIndex int) (*PaletteInfoResponse, error)
GetPaletteInfo 获取调色板信息
func (*RasterService) GetProjectionInfo ¶ added in v1.8.5
func (s *RasterService) GetProjectionInfo(sourcePath string) (*ProjectionInfo, error)
GetProjectionInfo 获取栅格投影信息
func (*RasterService) GetResamplePreview ¶ added in v1.8.6
func (s *RasterService) GetResamplePreview(req *ResamplePreviewRequest) (*ResamplePreviewResponse, error)
GetResamplePreview 获取重采样预览信息
func (*RasterService) GetTaskList ¶ added in v1.8.6
func (s *RasterService) GetTaskList(page, pageSize int, status *int, taskID string) (*QueryRasterTasksResponse, error)
Service 层方法
func (*RasterService) GetTaskStatus ¶ added in v1.8.5
func (s *RasterService) GetTaskStatus(taskID string) (*models.RasterRecord, error)
GetTaskStatus 查询任务状态
func (*RasterService) StartAddBandTask ¶ added in v1.8.5
func (s *RasterService) StartAddBandTask(req *AddBandRequest) (*BandOperationResponse, error)
StartAddBandTask 启动添加波段任务
func (*RasterService) StartApplyFilterTask ¶ added in v1.8.5
func (s *RasterService) StartApplyFilterTask(req *ApplyFilterRequest) (*BandOperationResponse, error)
StartApplyFilterTask 启动应用滤波任务
func (*RasterService) StartAutoColorBalanceTask ¶ added in v1.8.5
func (s *RasterService) StartAutoColorBalanceTask(req *AutoColorBalanceRequest) (*ColorTaskResponse, error)
StartAutoColorBalanceTask - 续
func (*RasterService) StartAutoContrastTask ¶ added in v1.8.5
func (s *RasterService) StartAutoContrastTask(req *AutoAdjustRequest) (*ColorTaskResponse, error)
StartAutoContrastTask 启动自动对比度任务
func (*RasterService) StartAutoLevelsTask ¶ added in v1.8.5
func (s *RasterService) StartAutoLevelsTask(req *AutoAdjustRequest) (*ColorTaskResponse, error)
StartAutoLevelsTask 启动自动色阶任务
func (*RasterService) StartAutoWhiteBalanceTask ¶ added in v1.8.5
func (s *RasterService) StartAutoWhiteBalanceTask(req *AutoAdjustRequest) (*ColorTaskResponse, error)
StartAutoWhiteBalanceTask 启动自动白平衡任务
func (*RasterService) StartBandMathTask ¶ added in v1.8.5
func (s *RasterService) StartBandMathTask(req *BandMathRequest) (*BandOperationResponse, error)
StartBandMathTask 启动波段运算任务
func (*RasterService) StartBatchColorBalanceTask ¶ added in v1.8.5
func (s *RasterService) StartBatchColorBalanceTask(req *BatchColorBalanceRequest) (*BatchColorTaskResponse, error)
StartBatchColorBalanceTask 启动批量匀色任务
func (*RasterService) StartBatchExpressionTask ¶ added in v1.8.5
func (s *RasterService) StartBatchExpressionTask(req *BatchExpressionRequest) (*BatchExpressionResponse, error)
StartBatchExpressionTask 启动批量表达式计算任务
func (*RasterService) StartBlockCalculateTask ¶ added in v1.8.5
func (s *RasterService) StartBlockCalculateTask(req *BlockCalculateRequest) (*CalcOperationResponse, error)
StartBlockCalculateTask 启动分块计算任务(大影像)
func (*RasterService) StartBrightnessTask ¶ added in v1.8.5
func (s *RasterService) StartBrightnessTask(req *SingleColorAdjustRequest) (*ColorTaskResponse, error)
StartBrightnessTask 启动亮度调整任务
func (*RasterService) StartCLAHETask ¶ added in v1.8.5
func (s *RasterService) StartCLAHETask(req *CLAHERequest) (*ColorTaskResponse, error)
StartCLAHETask 启动CLAHE均衡化任务
func (*RasterService) StartCalculateIndexTask ¶ added in v1.8.5
func (s *RasterService) StartCalculateIndexTask(req *CalculateIndexRequest) (*BandOperationResponse, error)
StartCalculateIndexTask 启动计算指数任务
func (*RasterService) StartClipTask ¶ added in v1.8.5
func (s *RasterService) StartClipTask(req *ClipRequest) (*ClipResponse, error)
StartClipTask 启动异步裁剪任务
func (*RasterService) StartColorAdjustTask ¶ added in v1.8.5
func (s *RasterService) StartColorAdjustTask(req *ColorAdjustRequest) (*ColorTaskResponse, error)
StartColorAdjustTask 启动综合调色任务
func (*RasterService) StartColorBalanceTask ¶ added in v1.8.5
func (s *RasterService) StartColorBalanceTask(req *ColorBalanceRequest) (*ColorTaskResponse, error)
StartColorBalanceTask 启动通用匀色任务
func (*RasterService) StartColorPipelineTask ¶ added in v1.8.5
func (s *RasterService) StartColorPipelineTask(req *ColorPipelineRequest) (*ColorTaskResponse, error)
StartColorPipelineTask 启动调色管道任务
func (*RasterService) StartConditionalReplaceTask ¶ added in v1.8.5
func (s *RasterService) StartConditionalReplaceTask(req *ConditionalReplaceRequest) (*CalcOperationResponse, error)
StartConditionalReplaceTask 启动条件替换任务
func (*RasterService) StartContrastTask ¶ added in v1.8.5
func (s *RasterService) StartContrastTask(req *SingleColorAdjustRequest) (*ColorTaskResponse, error)
StartContrastTask 启动对比度调整任务
func (*RasterService) StartConvertBandTypeTask ¶ added in v1.8.5
func (s *RasterService) StartConvertBandTypeTask(req *ConvertBandTypeRequest) (*BandOperationResponse, error)
ConvertBandDataType 转换波段数据类型
func (*RasterService) StartCurvesTask ¶ added in v1.8.5
func (s *RasterService) StartCurvesTask(req *CurvesAdjustRequest) (*ColorTaskResponse, error)
StartCurvesTask 启动曲线调整任务
func (*RasterService) StartDefineProjectionTask ¶ added in v1.8.5
func (s *RasterService) StartDefineProjectionTask(req *DefineProjectionRequest) (*ProjectionResponse, error)
StartDefineProjectionTask 启动定义投影任务
func (*RasterService) StartDefineProjectionWithGeoTransformTask ¶ added in v1.8.5
func (s *RasterService) StartDefineProjectionWithGeoTransformTask(req *DefineProjectionWithGeoTransformRequest) (*ProjectionResponse, error)
StartDefineProjectionWithGeoTransformTask 启动定义投影+地理变换任务
func (*RasterService) StartDodgingBalanceTask ¶ added in v1.8.5
func (s *RasterService) StartDodgingBalanceTask(req *DodgingBalanceRequest) (*ColorTaskResponse, error)
StartDodgingBalanceTask - 续
func (*RasterService) StartEVITask ¶ added in v1.8.5
func (s *RasterService) StartEVITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
StartEVITask 启动EVI计算任务
func (*RasterService) StartExpressionTask ¶ added in v1.8.5
func (s *RasterService) StartExpressionTask(req *ExpressionRequest) (*CalcOperationResponse, error)
StartExpressionTask 启动表达式计算任务
func (*RasterService) StartExpressionWithConditionTask ¶ added in v1.8.5
func (s *RasterService) StartExpressionWithConditionTask(req *ExpressionWithConditionRequest) (*CalcOperationResponse, error)
StartExpressionWithConditionTask 启动条件表达式计算任务
func (*RasterService) StartGammaTask ¶ added in v1.8.5
func (s *RasterService) StartGammaTask(req *SingleColorAdjustRequest) (*ColorTaskResponse, error)
StartGammaTask 启动Gamma校正任务
func (*RasterService) StartGradientBlendTask ¶ added in v1.8.5
func (s *RasterService) StartGradientBlendTask(req *GradientBlendRequest) (*ColorTaskResponse, error)
StartGradientBlendTask 启动渐变融合任务
func (*RasterService) StartHistogramEqualizeTask ¶ added in v1.8.5
func (s *RasterService) StartHistogramEqualizeTask(req *HistogramEqualizeRequest) (*ColorTaskResponse, error)
StartHistogramEqualizeTask 启动直方图均衡化任务
func (*RasterService) StartHistogramMatchTask ¶ added in v1.8.5
func (s *RasterService) StartHistogramMatchTask(req *HistogramMatchRequest) (*ColorTaskResponse, error)
StartHistogramMatchTask 启动直方图匹配任务
func (*RasterService) StartHueTask ¶ added in v1.8.5
func (s *RasterService) StartHueTask(req *SingleColorAdjustRequest) (*ColorTaskResponse, error)
StartHueTask 启动色相调整任务
func (*RasterService) StartLAITask ¶ added in v1.8.5
func (s *RasterService) StartLAITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
StartLAITask 启动LAI计算任务
func (*RasterService) StartLevelsTask ¶ added in v1.8.5
func (s *RasterService) StartLevelsTask(req *LevelsAdjustRequest) (*ColorTaskResponse, error)
StartLevelsTask 启动色阶调整任务
func (*RasterService) StartLinearRegressionBalanceTask ¶ added in v1.8.5
func (s *RasterService) StartLinearRegressionBalanceTask(req *LinearRegressionBalanceRequest) (*ColorTaskResponse, error)
StartLinearRegressionBalanceTask 启动线性回归匀色任务
func (*RasterService) StartMNDWITask ¶ added in v1.8.5
func (s *RasterService) StartMNDWITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
StartMNDWITask 启动MNDWI计算任务
func (*RasterService) StartMeanStdMatchTask ¶ added in v1.8.5
func (s *RasterService) StartMeanStdMatchTask(req *MeanStdMatchRequest) (*ColorTaskResponse, error)
StartMeanStdMatchTask 启动均值-标准差匹配任务
func (*RasterService) StartMergeBandsTask ¶ added in v1.8.5
func (s *RasterService) StartMergeBandsTask(req *MergeBandsRequest) (*BandOperationResponse, error)
StartMergeBandsTask 启动合并波段任务
func (*RasterService) StartMomentMatchTask ¶ added in v1.8.5
func (s *RasterService) StartMomentMatchTask(req *MomentMatchRequest) (*ColorTaskResponse, error)
StartMomentMatchTask 启动矩匹配任务
func (*RasterService) StartMosaicTask ¶ added in v1.8.5
func (s *RasterService) StartMosaicTask(req *MosaicRequest) (*MosaicResponse, error)
StartMosaicTask 启动异步镶嵌任务
func (*RasterService) StartNDBITask ¶ added in v1.8.5
func (s *RasterService) StartNDBITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
StartNDBITask 启动NDBI计算任务
func (*RasterService) StartNDSITask ¶ added in v1.8.5
func (s *RasterService) StartNDSITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
StartNDSITask 启动NDSI计算任务
func (*RasterService) StartNDVITask ¶ added in v1.8.5
func (s *RasterService) StartNDVITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
StartNDVITask 启动NDVI计算任务
func (*RasterService) StartNDWITask ¶ added in v1.8.5
func (s *RasterService) StartNDWITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
StartNDWITask 启动NDWI计算任务
func (*RasterService) StartNormalizeBandTask ¶ added in v1.8.5
func (s *RasterService) StartNormalizeBandTask(req *NormalizeBandRequest) (*BandOperationResponse, error)
StartNormalizeBandTask 启动归一化波段任务
func (*RasterService) StartPaletteToRGBTask ¶ added in v1.8.5
func (s *RasterService) StartPaletteToRGBTask(req *PaletteToRGBRequest) (*BandOperationResponse, error)
StartPaletteToRGBTask 启动调色板转RGB任务
func (*RasterService) StartPresetColorTask ¶ added in v1.8.5
func (s *RasterService) StartPresetColorTask(req *PresetColorRequest) (*ColorTaskResponse, error)
StartPresetColorTask 启动预设调色任务
func (*RasterService) StartRGBToPaletteTask ¶ added in v1.8.5
func (s *RasterService) StartRGBToPaletteTask(req *RGBToPaletteRequest) (*BandOperationResponse, error)
StartRGBToPaletteTask 启动RGB转调色板任务
func (*RasterService) StartReclassifyTask ¶ added in v1.8.5
func (s *RasterService) StartReclassifyTask(req *ReclassifyRequest) (*BandOperationResponse, error)
StartReclassifyTask 启动重分类任务
func (*RasterService) StartRemoveBandTask ¶ added in v1.8.5
func (s *RasterService) StartRemoveBandTask(req *RemoveBandRequest) (*BandOperationResponse, error)
StartRemoveBandTask 启动删除波段任务
func (*RasterService) StartReorderBandsTask ¶ added in v1.8.5
func (s *RasterService) StartReorderBandsTask(req *ReorderBandsRequest) (*BandOperationResponse, error)
StartReorderBandsTask 启动重排波段任务
func (*RasterService) StartReprojectTask ¶ added in v1.8.5
func (s *RasterService) StartReprojectTask(req *ReprojectRequest) (*ProjectionResponse, error)
StartReprojectTask 启动重投影任务
func (*RasterService) StartResampleTask ¶ added in v1.8.6
func (s *RasterService) StartResampleTask(req *ResampleRequest) (*ResampleResponse, error)
StartResampleTask 启动重采样任务
func (*RasterService) StartSAVITask ¶ added in v1.8.5
func (s *RasterService) StartSAVITask(req *IndexCalculateRequest) (*CalcOperationResponse, error)
StartSAVITask 启动SAVI计算任务
func (*RasterService) StartSCurveTask ¶ added in v1.8.5
func (s *RasterService) StartSCurveTask(req *SCurveRequest) (*ColorTaskResponse, error)
StartSCurveTask 启动S曲线对比度任务
func (*RasterService) StartSaturationTask ¶ added in v1.8.5
func (s *RasterService) StartSaturationTask(req *SingleColorAdjustRequest) (*ColorTaskResponse, error)
StartSaturationTask 启动饱和度调整任务
func (*RasterService) StartSetBandDescriptionTask ¶ added in v1.8.5
func (s *RasterService) StartSetBandDescriptionTask(req *SetBandDescriptionRequest) (*BandOperationResponse, error)
StartSetBandDescriptionTask 启动设置波段描述任务
func (*RasterService) StartSetBandMetadataTask ¶ added in v1.8.5
func (s *RasterService) StartSetBandMetadataTask(req *SetBandMetadataRequest) (*BandOperationResponse, error)
StartSetBandMetadataTask 启动设置波段元数据任务
func (*RasterService) StartSetColorInterpTask ¶ added in v1.8.5
func (s *RasterService) StartSetColorInterpTask(req *SetColorInterpRequest) (*BandOperationResponse, error)
StartSetColorInterpTask 启动设置颜色解释任务
func (*RasterService) StartSetNoDataTask ¶ added in v1.8.5
func (s *RasterService) StartSetNoDataTask(req *SetNoDataRequest) (*BandOperationResponse, error)
StartSetNoDataTask 启动设置NoData任务
func (*RasterService) StartSetPaletteTask ¶ added in v1.8.5
func (s *RasterService) StartSetPaletteTask(req *SetPaletteRequest) (*BandOperationResponse, error)
StartSetPaletteTask 启动设置调色板任务
func (*RasterService) StartWallisFilterTask ¶ added in v1.8.5
func (s *RasterService) StartWallisFilterTask(req *WallisFilterRequest) (*ColorTaskResponse, error)
StartWallisFilterTask 启动Wallis滤波任务
func (*RasterService) ValidateExpression ¶ added in v1.8.5
func (s *RasterService) ValidateExpression(req *ValidateExpressionRequest) (*ValidateExpressionResponse, error)
ValidateExpression 验证表达式
type ReclassifyRequest ¶ added in v1.8.5
type ReclassifyRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
Rules []ReclassifyRule `json:"rules" binding:"required,min=1"`
DefaultValue float64 `json:"default_value"`
OutputName string `json:"output_name"`
}
ReclassifyRequest 重分类请求
type ReclassifyRule ¶ added in v1.8.5
type ReclassifyRule struct {
MinValue float64 `json:"min_value"`
MaxValue float64 `json:"max_value"`
NewValue float64 `json:"new_value"`
}
ReclassifyRule 重分类规则
type ReferenceRegionDTO ¶ added in v1.8.5
type ReferenceRegionDTO struct {
X int `json:"x"`
Y int `json:"y"`
Width int `json:"width"`
Height int `json:"height"`
}
ReferenceRegionDTO 参考区域
type RemoveBandRequest ¶ added in v1.8.5
type RemoveBandRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
OutputName string `json:"output_name"`
}
RemoveBandRequest 删除波段请求
type ReorderBandsRequest ¶ added in v1.8.5
type ReorderBandsRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandOrder []int `json:"band_order" binding:"required,min=1"`
OutputName string `json:"output_name"`
}
ReorderBandsRequest 重排波段请求
type ReplaceCondition ¶ added in v1.8.5
type ReplaceCondition struct {
MinValue float64 `json:"min_value"`
MaxValue float64 `json:"max_value"`
NewValue float64 `json:"new_value"`
IncludeMin bool `json:"include_min"`
IncludeMax bool `json:"include_max"`
}
ReplaceCondition 替换条件
type ReprojectRequest ¶ added in v1.8.5
type ReprojectRequest struct {
SourcePath string `json:"source_path" binding:"required"` // 源文件路径
SrcEPSG int `json:"src_epsg"` // 源EPSG代码(0表示自动检测)
DstEPSG int `json:"dst_epsg" binding:"required"` // 目标EPSG代码
OutputName string `json:"output_name"` // 输出文件名
OutputFormat string `json:"output_format"` // 输出格式:GTiff, JP2OpenJPEG等
ResampleMethod int `json:"resample_method"` // 重采样方法:0-最近邻,1-双线性,2-三次卷积,3-三次样条,4-Lanczos
}
ReprojectRequest 重投影请求
type ResamplePreviewRequest ¶ added in v1.8.6
type ResamplePreviewRequest struct {
SourcePath string `json:"source_path" binding:"required"`
ResampleMethod int `json:"resample_method"`
TargetResX float64 `json:"target_res_x"`
TargetResY float64 `json:"target_res_y"`
ScaleFactor float64 `json:"scale_factor"`
TargetWidth int `json:"target_width"`
TargetHeight int `json:"target_height"`
}
ResamplePreviewRequest 重采样预览请求
type ResamplePreviewResponse ¶ added in v1.8.6
type ResamplePreviewResponse struct {
OriginalWidth int `json:"original_width"`
OriginalHeight int `json:"original_height"`
OriginalResX float64 `json:"original_res_x"`
OriginalResY float64 `json:"original_res_y"`
TargetWidth int `json:"target_width"`
TargetHeight int `json:"target_height"`
TargetResX float64 `json:"target_res_x"`
TargetResY float64 `json:"target_res_y"`
BandCount int `json:"band_count"`
EstimatedSize int64 `json:"estimated_size"` // 预估大小(字节)
}
ResamplePreviewResponse 重采样预览响应
type ResampleRequest ¶ added in v1.8.6
type ResampleRequest struct {
SourcePath string `json:"source_path" binding:"required"` // 源文件路径
OutputName string `json:"output_name"` // 输出文件名
OutputFormat string `json:"output_format"` // 输出格式: GTiff, JPEG, PNG
ResampleMethod int `json:"resample_method"` // 重采样方法: 0-最近邻,1-双线性,2-三次卷积,3-三次样条,4-Lanczos
TargetResX float64 `json:"target_res_x"` // 目标X分辨率(与ScaleFactor/TargetSize三选一)
TargetResY float64 `json:"target_res_y"` // 目标Y分辨率
ScaleFactor float64 `json:"scale_factor"` // 缩放因子(>1放大,<1缩小)
TargetWidth int `json:"target_width"` // 目标宽度
TargetHeight int `json:"target_height"` // 目标高度
NoDataValue float64 `json:"nodata_value"` // NoData值
HasNoData bool `json:"has_nodata"` // 是否设置NoData
}
ResampleRequest 重采样请求参数
type ResampleResponse ¶ added in v1.8.6
type ResampleResponse struct {
TaskID string `json:"task_id"`
OutputPath string `json:"output_path"`
Message string `json:"message"`
}
ResampleResponse 重采样响应
type SCurveRequest ¶ added in v1.8.5
type SCurveRequest struct {
SourcePath string `json:"source_path" binding:"required"`
Strength float64 `json:"strength"` // 强度
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
SCurveRequest S曲线对比度请求
type SetBandDescriptionRequest ¶ added in v1.8.5
type SetBandDescriptionRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
Description string `json:"description" binding:"required"`
InPlace bool `json:"in_place"`
OutputName string `json:"output_name"`
}
SetBandDescriptionRequest 设置波段描述请求
type SetBandMetadataRequest ¶ added in v1.8.5
type SetBandMetadataRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
Key string `json:"key" binding:"required"`
Value string `json:"value" binding:"required"`
InPlace bool `json:"in_place"`
OutputName string `json:"output_name"`
}
SetBandMetadataRequest 设置波段元数据请求
type SetColorInterpRequest ¶ added in v1.8.5
type SetColorInterpRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
ColorInterp int `json:"color_interp" binding:"min=0,max=13"`
InPlace bool `json:"in_place"`
OutputName string `json:"output_name"`
}
SetColorInterpRequest 设置颜色解释请求
type SetNoDataRequest ¶ added in v1.8.5
type SetNoDataRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
NoDataValue float64 `json:"nodata_value"`
InPlace bool `json:"in_place"`
OutputName string `json:"output_name"`
}
SetNoDataRequest 设置NoData请求
type SetPaletteRequest ¶ added in v1.8.5
type SetPaletteRequest struct {
SourcePath string `json:"source_path" binding:"required"`
BandIndex int `json:"band_index" binding:"required,min=1"`
PaletteType string `json:"palette_type"` // grayscale, rainbow, heatmap, custom
CustomColors []PaletteEntryResponse `json:"custom_colors"` // 自定义颜色
InPlace bool `json:"in_place"`
OutputName string `json:"output_name"`
}
SetPaletteRequest 设置调色板请求
type SingleColorAdjustRequest ¶ added in v1.8.5
type SingleColorAdjustRequest struct {
SourcePath string `json:"source_path" binding:"required"`
Value float64 `json:"value" binding:"required"`
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
SingleColorAdjustRequest 单项调色请求
type SplitResult ¶ added in v1.3.2
type SplitResult struct {
Feature *geojson.Feature
SplitPoint orb.Point
SegmentIndex int // 在哪个线段上打断
T float64 // 投影参数 (0-1),表示在该 segment 上的位置
}
SplitResult 存储线段打断的结果
type SymbolDetail ¶ added in v1.5.3
type SymbolDetail struct {
ID uint `json:"id"`
Name string `json:"name"`
MimeType string `json:"mime_type"`
Width int `json:"width"`
Height int `json:"height"`
Description string `json:"description"`
Category string `json:"category"`
ImageBase64 string `json:"image_base64"`
ImageURL string `json:"image_url"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
SymbolDetail 详情(含Base64图片数据)
type SymbolListItem ¶ added in v1.5.3
type SymbolListItem struct {
ID uint `json:"id"`
Name string `json:"name"`
MimeType string `json:"mime_type"`
Width int `json:"width"`
Height int `json:"height"`
Description string `json:"description"`
Category string `json:"category"`
ImageURL string `json:"image_url"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
SymbolListItem 列表项(不含图片数据)
type SymbolService ¶ added in v1.5.3
type SymbolService struct {
// contains filtered or unexported fields
}
func NewSymbolService ¶ added in v1.5.3
func NewSymbolService() *SymbolService
func (*SymbolService) BatchUpload ¶ added in v1.5.3
func (s *SymbolService) BatchUpload(files []*multipart.FileHeader, category string) ([]models.Symbol, []error)
BatchUpload 批量上传图标
func (*SymbolService) Delete ¶ added in v1.5.3
func (s *SymbolService) Delete(id uint) error
Delete 删除图标
func (*SymbolService) GetByID ¶ added in v1.5.3
func (s *SymbolService) GetByID(id uint) (*SymbolDetail, error)
GetByID 根据ID获取图标详情
func (*SymbolService) GetCategories ¶ added in v1.5.3
func (s *SymbolService) GetCategories() ([]string, error)
GetCategories 获取所有图标分类
func (*SymbolService) GetImageData ¶ added in v1.5.3
func (s *SymbolService) GetImageData(id uint) ([]byte, string, error)
GetImageData 获取原始图片数据
func (*SymbolService) GetLayerSymbol ¶ added in v1.5.3
func (s *SymbolService) GetLayerSymbol(layerName string) (*LayerSymbolSetting, error)
GetLayerSymbol 获取图层图标设置
func (*SymbolService) GetUsedSymbols ¶ added in v1.5.3
func (s *SymbolService) GetUsedSymbols(host string) ([]SymbolListItem, error)
GetUsedSymbols 获取所有已配置使用的图标
func (*SymbolService) List ¶ added in v1.5.3
func (s *SymbolService) List(page, pageSize int, category string) ([]SymbolListItem, int64, error)
List 获取图标列表(分页)
func (*SymbolService) Search ¶ added in v1.5.3
func (s *SymbolService) Search(query string, page, pageSize int, host string, category string) ([]SymbolListItem, int64, error)
Search 搜索图标
func (*SymbolService) SetLayerSymbol ¶ added in v1.5.3
func (s *SymbolService) SetLayerSymbol(layerName string, setting LayerSymbolSetting) error
SetLayerSymbol 设置图层图标
func (*SymbolService) Update ¶ added in v1.5.3
func (s *SymbolService) Update(id uint, name, description, category string) error
Update 更新图标信息
func (*SymbolService) Upload ¶ added in v1.5.3
func (s *SymbolService) Upload(req *SymbolUploadRequest) (*models.Symbol, error)
Upload 上传图标
type SymbolSet ¶ added in v1.5.3
type SymbolSet struct {
AttValue string `json:"att_value"`
SymbolID string `json:"symbol_id"`
SymbolName string `json:"symbol_name"`
Scale float64 `json:"scale,omitempty"` // 图标缩放比例
Rotation float64 `json:"rotation,omitempty"` // 图标旋转角度
OffsetX float64 `json:"offset_x,omitempty"` // X偏移
OffsetY float64 `json:"offset_y,omitempty"` // Y偏移
}
type SymbolUploadRequest ¶ added in v1.5.3
type SymbolUploadRequest struct {
Name string
Description string
Category string
File *multipart.FileHeader
}
SymbolUploadRequest 上传请求参数
type TextureListItem ¶ added in v1.4.11
type TextureListItem struct {
ID uint `json:"id"`
Name string `json:"name"`
MimeType string `json:"mime_type"`
Width int `json:"width"`
Height int `json:"height"`
Description string `json:"description"`
Url string `json:"url"`
}
TextureListItem 列表项(不包含图片数据)
type TextureService ¶ added in v1.4.11
type TextureService struct{}
func NewTextureService ¶ added in v1.4.11
func NewTextureService() *TextureService
func (*TextureService) ConvertToPNG ¶ added in v1.6.1
func (s *TextureService) ConvertToPNG(file *multipart.FileHeader) ([]byte, error)
func (*TextureService) Delete ¶ added in v1.4.11
func (s *TextureService) Delete(id uint) error
Delete 删除纹理
func (*TextureService) GetByID ¶ added in v1.4.11
func (s *TextureService) GetByID(id uint) (*models.Texture, error)
GetByID 根据ID获取纹理(包含图片数据)
func (*TextureService) GetImageData ¶ added in v1.4.11
func (s *TextureService) GetImageData(id uint) ([]byte, error)
GetImageData 获取原始图片数据
func (*TextureService) GetLayerTexture ¶ added in v1.4.13
func (s *TextureService) GetLayerTexture(layerName string) (*LayerTextureSetting, error)
GetLayerTexture 获取图层纹理设置
func (*TextureService) GetRawImage ¶ added in v1.4.11
func (s *TextureService) GetRawImage(id uint) (image.Image, error)
GetRawImage 获取可直接显示的图片(返回PNG解码后的image.Image)
func (*TextureService) GetUsedTextures ¶ added in v1.4.13
func (s *TextureService) GetUsedTextures(host string) ([]TextureListItem, error)
GetUsedTextures 获取所有已配置的纹理(从MySchema表的TextureSet中提取并去重)
func (*TextureService) List ¶ added in v1.4.11
func (s *TextureService) List(page, pageSize int) ([]TextureListItem, int64, error)
List 获取纹理列表(不包含图片数据)
func (*TextureService) Search ¶ added in v1.4.15
func (s *TextureService) Search(query string, page, pageSize int, host string) ([]TextureListItem, int64, error)
Search 搜索纹理(支持ID、名称、描述的模糊匹配)
func (*TextureService) SetLayerTexture ¶ added in v1.4.12
func (s *TextureService) SetLayerTexture(layerName string, textureSets LayerTextureSetting) error
func (*TextureService) Upload ¶ added in v1.4.11
func (s *TextureService) Upload(req *UploadRequest) (*models.Texture, error)
Upload 上传纹理图片
type TextureSet ¶ added in v1.4.12
type TileCacheService ¶ added in v1.8.7
type TileCacheService struct {
// contains filtered or unexported fields
}
TileCacheService 瓦片缓存服务
func GetTileCacheService ¶ added in v1.8.7
func GetTileCacheService() *TileCacheService
GetTileCacheService 获取缓存服务单例
func (*TileCacheService) ClearCache ¶ added in v1.8.7
func (s *TileCacheService) ClearCache(serviceName string) error
ClearCache 清空某个服务的缓存(刷新服务时调用)
func (*TileCacheService) DropCacheTable ¶ added in v1.8.7
func (s *TileCacheService) DropCacheTable(serviceName string) error
DropCacheTable 删除缓存表(服务删除时调用)
func (*TileCacheService) EnsureCacheTable ¶ added in v1.8.7
func (s *TileCacheService) EnsureCacheTable(serviceName string) error
EnsureCacheTable 确保缓存表存在(服务启动时调用)
func (*TileCacheService) GetCachedTile ¶ added in v1.8.7
func (s *TileCacheService) GetCachedTile(serviceName string, z, x, y int, tileType, encoding string) ([]byte, bool, error)
GetCachedTile 从缓存获取瓦片 返回: tileData, found, error
func (*TileCacheService) SetCachedTile ¶ added in v1.8.7
func (s *TileCacheService) SetCachedTile(serviceName string, z, x, y int, tileType, encoding string, data []byte) error
SetCachedTile 写入缓存
type TileServerManager ¶ added in v1.7.4
type TileServerManager struct {
// contains filtered or unexported fields
}
TileServerManager 瓦片服务管理器
func GetTileServerManager ¶ added in v1.7.4
func GetTileServerManager() *TileServerManager
GetTileServerManager 获取单例管理器
func InitTileServerManager ¶ added in v1.7.4
func InitTileServerManager(db *gorm.DB) *TileServerManager
InitTileServerManager 初始化管理器(在程序启动时调用)
func (*TileServerManager) AddService ¶ added in v1.7.4
func (m *TileServerManager) AddService(raster *models.DynamicRaster) error
AddService 添加新的服务配置
func (*TileServerManager) CloseAll ¶ added in v1.7.4
func (m *TileServerManager) CloseAll()
CloseAll 关闭所有服务
func (*TileServerManager) DeleteService ¶ added in v1.7.4
func (m *TileServerManager) DeleteService(name string) error
DeleteService 删除服务
func (*TileServerManager) GetServer ¶ added in v1.7.4
func (m *TileServerManager) GetServer(name string) (*Gogeo.TileServer, *models.DynamicRaster, error)
GetServer 获取服务实例
func (*TileServerManager) GetServiceConfig ¶ added in v1.7.4
func (m *TileServerManager) GetServiceConfig(name string) (*models.DynamicRaster, error)
GetServiceConfig 获取服务配置
func (*TileServerManager) ListRunningServices ¶ added in v1.7.4
func (m *TileServerManager) ListRunningServices() []string
ListRunningServices 列出运行中的服务
func (*TileServerManager) ListServices ¶ added in v1.7.4
func (m *TileServerManager) ListServices() ([]models.DynamicRaster, error)
ListServices 列出所有服务
func (*TileServerManager) LoadAllServices ¶ added in v1.7.4
func (m *TileServerManager) LoadAllServices()
LoadAllServices 从数据库加载所有服务配置并启动
func (*TileServerManager) RefreshService ¶ added in v1.7.4
func (m *TileServerManager) RefreshService(name string) error
RefreshService 刷新服务(重新加载)
func (*TileServerManager) StartServer ¶ added in v1.7.4
func (m *TileServerManager) StartServer(name string) error
StartServer 启动服务
func (*TileServerManager) StopServer ¶ added in v1.7.4
func (m *TileServerManager) StopServer(name string)
StopServer 停止服务
func (*TileServerManager) UpdateService ¶ added in v1.7.4
func (m *TileServerManager) UpdateService(name string, updates map[string]interface{}) error
UpdateService 更新服务配置
type TrackService ¶
type TrackService struct{}
func NewTrackService ¶
func NewTrackService() *TrackService
func (*TrackService) CalculateShortestPath ¶
func (s *TrackService) CalculateShortestPath( ctx context.Context, linesGeoJSON *geojson.FeatureCollection, startPoint []float64, endPoint []float64, ) (*geojson.FeatureCollection, error)
func (*TrackService) FindNearestPointOnLines ¶ added in v1.3.2
func (s *TrackService) FindNearestPointOnLines( ctx context.Context, linesGeoJSON *geojson.FeatureCollection, targetPoint []float64, maxDistance float64, ) (snappedPoint []float64, distance float64, lineID int, err error)
FindNearestPointOnLines 修改签名,添加 maxDistance 参数
func (*TrackService) GetAndBreakGeometries ¶
func (s *TrackService) GetAndBreakGeometries( ctx context.Context, layerNames []string, bbox geojson.FeatureCollection, ) (*geojson.FeatureCollection, error)
type UploadRequest ¶ added in v1.4.11
type UploadRequest struct {
Name string
Description string
File *multipart.FileHeader
}
UploadRequest 上传请求参数
type ValidateExpressionRequest ¶ added in v1.8.5
type ValidateExpressionRequest struct {
SourcePath string `json:"source_path" binding:"required"`
Expression string `json:"expression" binding:"required"`
}
ValidateExpressionRequest 验证表达式请求
type ValidateExpressionResponse ¶ added in v1.8.5
type ValidateExpressionResponse struct {
Valid bool `json:"valid"`
Message string `json:"message"`
}
ValidateExpressionResponse 验证表达式响应
type WallisFilterRequest ¶ added in v1.8.5
type WallisFilterRequest struct {
SourcePath string `json:"source_path" binding:"required"`
TargetMean float64 `json:"target_mean"`
TargetStd float64 `json:"target_std"`
C float64 `json:"c"` // 对比度参数 [0, 1]
B float64 `json:"b"` // 亮度参数 [0, 1]
WindowSize int `json:"window_size"` // 默认31
OutputName string `json:"output_name"`
OutputFormat string `json:"output_format"`
}
WallisFilterRequest Wallis滤波请求