레이어, 지도 좌표와 데이터셋 서비스
레이어의 속성과 범례를 읽고 스타일이나 필드 스키마를 변경합니다. 좌표 입력을 변환하거나 지도와 워크스페이스에 데이터셋을 추가할 수 있습니다.
.NET에서 사용하기
레이어 속성, 스키마, 범위와 데이터셋 추가를 애플리케이션 흐름에서 처리합니다. 개별 레이어 표현은 레이어 설정 서비스, 워크스페이스의 데이터 추가는 지도 데이터셋 서비스를 선택합니다.
호출 순서: 현재 레이어/데이터 상태 조회 → 요청 구성 → 서비스 호출 → 결과와 경고 확인.
Note
서비스 결과 객체와 원본 레이어의 수명을 구별합니다. 취소가 모든 제공자 읽기를 즉시 중단한다고 가정하지 않습니다.
개념과 사용 순서 · 관계와 처리 흐름 · .NET 시작하기
C# 실행 예제
아래는 SDK 샘플의 실제 코드 영역입니다. 초기화·오류 처리·해제를 포함한 전체 흐름은 사용 가이드에서 확인하세요.
// AddDataset opens the dataset and, with addDefaultLayers, adds one map layer
// per data source. Without options the dataset is opened writable, so the
// shipped file is added with ReadOnly = true.
private static bool AddDataset(glsWorkspace workspace, string file)
{
var options = new glsOpenOptions { ReadOnly = true };
int index;
glsStatus status = workspace.AddDataset(GpkgUri(file), options, true, true, out index);
if (!status.IsOk)
{
Console.WriteLine("[sample] add dataset failed: {0}", status.Message);
return false;
}
Console.WriteLine("[sample] added read-only: {0}, dataset index {1}, datasets {2}",
Path.GetFileName(file), index, workspace.DatasetCount);
return true;
}
지도 좌표와 입력 오류
지도 X·Y, WGS84 경위도, MGRS 입력을 구분합니다. 변환 상태와 함께 오류 도메인, 원인, 입력 번호를 확인할 수 있습니다.
glsMapCoordinateService
- glsMapCoordinateService
- GetMgrsCapability(glsSpatialReference, glsCoordinateTransformOptions, out bool)
- ResolveInput(glsSpatialReference, glsMapCoordinateInputMode, string, out glsMapPoint)
- ResolveInput(glsSpatialReference, glsMapCoordinateInputMode, string, glsCoordinateTransformOptions, out glsMapPoint)
- FromWgs84(glsSpatialReference, glsMapPoint, out glsMapPoint)
- FromWgs84(glsSpatialReference, glsMapPoint, glsCoordinateTransformOptions, out glsMapPoint)
- ToWgs84(glsSpatialReference, glsMapPoint, out glsMapPoint)
- ToWgs84(glsSpatialReference, glsMapPoint, glsCoordinateTransformOptions, out glsMapPoint)
- GetCapabilities(glsSpatialReference, out glsMapCoordinateCapabilities)
- GetCapabilities(glsSpatialReference, glsCoordinateTransformOptions, out glsMapCoordinateCapabilities)
glsMapCoordinateCapabilities
glsMapCoordinateInputMode
glsMapCoordinateError
- glsMapCoordinateError
- None
- EmptyInput
- InvalidNumber
- WrongArity
- NonFinite
- LongitudeOutOfRange
- LatitudeOutOfRange
- InvalidMgrs
- CrsUnavailable
- CrsInvalid
- TransformUnavailable
- TransformFailed
레이어 이름, 속성과 스타일
레이어 이름을 제안하고 속성 또는 범례 스냅샷을 읽습니다. 설정 적용 결과는 실패 상태와 적용된 변경을 함께 보고합니다.
glsLayerNamingService
- glsLayerNamingService
- SuggestRename(glsMapView, string, string)
- SuggestUniqueName(glsMapView, string, string, string)
glsLayerServices
- glsLayerServices
- CaptureProperties(glsMapLayer)
- CaptureLegend(glsMapLayer)
- BuildLegend(string, string, glsGeometryType)
- ReplaceLegendSymbols(string, string, int, string, string)
- ApplyOutput(glsMapView, string, glsLayerOutputRequest)
- ApplyRenderer(glsMapView, string, string, bool, string)
- ApplyLabel(glsMapView, string, string, string)
- ApplyFeatureStyle(glsMapView, string, string, string)
- ApplyRangeRaster(glsMapView, string, glsRangeRasterRequest)
- ApplyRangeRasterRendering(glsMapView, string, glsRangeRasterRequest)
- ApplyRangeRasterRenderingV2(glsMapView, string, glsRangeRasterRequest, glsRasterCyclicSettings)
- ApplyTerrainElevationRendering(glsMapView, string, string, string)
- ApplyValueRaster(glsMapView, string, glsValueRasterRequest)
- ApplyVectorTileVisibility(glsMapView, string, string)
- RasterLegendCapacity
glsLayerOutputRequest
- glsLayerOutputRequest
- glsLayerOutputRequest()
- CrsWkt
- Epsg
- CrsAction
- Extent
- ExtentAction
- ZIndex
- MaxScale
- MinScale
- Opacity
- Selectable
- Visible
- Name
- Mask
glsLayerOutputMask
glsLayerValueAction
glsLayerApplyResult
glsRangeRasterRequest
- glsRangeRasterRequest
- glsRangeRasterRequest()
- ExpectedSectionJson
- Hillshade
- ColorMode
- Stops
- Clamp
- NoDataColor
- NoDataValue
glsValueRasterRequest
glsRasterHillshadeSettings
- glsRasterHillshadeSettings
- glsRasterHillshadeSettings()
- ValueOffset
- ValueScale
- CustomMetresPerUnit
- Strength
- ZFactor
- AltitudeDegrees
- AzimuthDegrees
- EdgePolicy
- ValueTransform
- VerticalUnit
- Mode
음영 기복 미리 보기
실제 레이어의 설정을 바꾸지 않고 별도 이미지로 시험합니다. 요청 ID와 상태를 확인한 뒤 준비된 픽셀을 복사합니다.
glsRasterHillshadePreviewSession
- glsRasterHillshadePreviewSession
- Create(glsMapView, string)
- Submit(glsRangeRasterRequest, int, int)
- SubmitV2(glsRangeRasterRequest, glsRasterCyclicSettings, int, int)
- Poll()
- SubmitTerrain(string, int, int)
- CopyPixels(ulong)
- Cancel()
- Dispose()
- ~glsRasterHillshadePreviewSession()
glsRasterHillshadePreviewResult
- glsRasterHillshadePreviewResult
- glsRasterHillshadePreviewResult()
- Message
- Height
- Width
- State
- RequestId
필드 값, 스키마와 공간 범위
필드의 고유 값이나 수치 범위를 조사합니다. 스키마 변경 계획과 소스 범위 메타데이터 갱신은 소유 스레드에서 실행합니다.
glsLayerFieldValues
- glsLayerFieldValues
- Collect(glsVectorDataSource, int, long, glsLayerValueOrder, glsFeatureIdSpace, bool, glsDataset, string, bool, CancellationToken)
glsLayerFieldValuesResult
- glsLayerFieldValuesResult
- glsLayerFieldValuesResult()
- Maximum
- Minimum
- HasNumeric
- UsedSql
- Truncated
- Complete
- Scanned
- Values
glsLayerValueOrder
glsLayerSchemaPlan
- glsLayerSchemaPlan
- ReadCapabilities(glsMapView, string)
- Prepare(glsMapView, string, glsLayerFieldChange[])
- Apply(glsMapView, int)
- Dispose()
- ~glsLayerSchemaPlan()
glsLayerFieldChange
- glsLayerFieldChange
- glsLayerFieldChange()
- AlterFlags
- ExpectedField
- Field
- OriginalName
- FieldIndex
- Kind
glsLayerFieldChangeKind
glsLayerFieldCapabilities
glsLayerFieldChangeResult
glsLayerFieldChangeState
glsLayerSchemaApplyResult
- glsLayerSchemaApplyResult
- glsLayerSchemaApplyResult()
- Changes
- RefreshRequired
- FailedChangeIndex
- CompletedChanges
- AppliedSteps
- Status
glsLayerExtentService
- glsLayerExtentService
- Compute(glsMapView, string, bool, int)
- UpdateMetadata(glsMapView, string, glsEnvelope, int)
지도와 워크스페이스의 데이터셋
같은 URI의 데이터셋을 재사용하거나 기존 연결을 교체합니다. GeoJSON은 별도 작업으로 메모리에 읽은 뒤 워크스페이스에 전달할 수 있습니다.
glsMapDatasetService
- glsMapDatasetService
- AddSource(glsWorkspace, int, string, bool, bool, double, out glsMapDatasetResult)
- Execute(glsWorkspace, string, glsMapDatasetMode, glsOpenOptions, string, out glsMapDatasetResult)
- PrepareGeoJson(string, glsOpenOptions, glsGeoJsonLoadProgressHandler, CancellationToken, out glsPreparedMapDataset)
- ExecutePrepared(glsWorkspace, glsPreparedMapDataset, glsMapDatasetMode, string, out glsMapDatasetResult)
- AddPreparedDataset(glsWorkspace, glsPreparedMapDataset, bool, bool, out int)
glsMapDatasetMode
glsMapDatasetResult
- glsMapDatasetResult
- glsMapDatasetResult()
- Layers
- Warning
- FitSucceeded
- FitAttempted
- Mode
- DatasetIndex
- ReusedDataset
- MutationApplied