본문으로 건너뛰기

연결, 전송과 내보내기

연결 URI와 설정을 관리하고 벡터 레이어를 데이터세트나 파일로 전송합니다. 준비, 취소, 게시와 복구 결과를 작업에 사용한 API에서 확인할 수 있습니다.

C++ 주제 그룹

.NET에서 사용하기

연결을 확인하고 데이터를 새 파일이나 대상 테이블로 전송합니다. 파일 출력과 데이터베이스 가져오기를 구분하고, 필드 정책과 대상 변경 결과를 함께 확인합니다.

호출 순서: 원본/대상 조사 → 필드·CRS 계획 → 실행 → 상태·Evidence·경고 판정.

Note

오류 반환만으로 대상이 원상복구됐다고 단정하지 않습니다. 변경 결과가 불명확하면 대상 상태부터 확인합니다.

개념과 사용 순서 · 관계와 처리 흐름 · .NET 시작하기

C# 실행 예제

아래는 SDK 샘플의 실제 코드 영역입니다. 초기화·오류 처리·해제를 포함한 전체 흐름은 사용 가이드에서 확인하세요.

// The outcome says how far the transfer got (Execution), what happened to
// the target (Evidence) and how many features were written; Warning
// collects what went wrong without undoing the result. A handler that asks
// to stop after the files were published cannot undo the export: the call
// succeeds and the warning says so. The recovery report lists the published
// files.
private static bool Outcome(glsVectorDataSource roads, Paths p)
{
    glsVectorTransferOutcome outcome;
    glsStatus status;
    using (Mappings fields = AllFields(roads))
    {
        status = glsVectorTransferService.Export(roads, glsVectorExportFormat.GeoJson,
            Path.Combine(p.Folder, "roads.geojson"), Options("roads", fields),
            progress => progress.Phase != glsTransferPhase.Complete, out outcome);
        outcome = OrDefault(outcome);
    }
    if (!status.IsOk)
    {
        return Failed(status);
    }
    bool committedReport = outcome.RecoveryJson.Contains("\"state\":\"Committed\"");
    Console.WriteLine("[sample] stop asked after publication: {0}, {1}, {2} features", outcome.Execution,
        outcome.Evidence, outcome.FeatureCount);
    Console.WriteLine("[sample] warning:{0}", outcome.Warning);
    Console.WriteLine("[sample] recovery report says Committed: {0}", YesNo(committedReport));
    return (outcome.Execution == glsTransferExecution.Completed
            && outcome.Evidence == glsTransferEvidence.Committed && outcome.FeatureCount == 8
            && outcome.Warning == " Progress callback failed or canceled after publication committed."
            && committedReport)
        || Unexpected("expected a committed export with a warning");
}

연결 목록, URI, 물리적 식별

연결 문자열을 분석하고 읽기 전용으로 테이블을 나열합니다. 원본과 대상이 같은 저장소인지 판단할 때는 URI 문자열 대신 요청 범위에 맞는 식별 결과를 비교합니다.

glsConnectionCatalogService

glsConnectionIdentity

glsConnectionUriService

glsIdentityComparison

glsIdentityScope

연결 설정과 변경 계획

설정 로드 결과와 파일 게시 상태를 확인합니다. 연결 원본을 변경할 때는 사용 임대와 변경 계획을 사용하고 결과에서 롤백 또는 커밋을 확인합니다.

glsConnectionMutationOutcome

glsConnectionMutationPlan

glsConnectionMutationResult

glsConnectionMutationService

glsConnectionSettingsService

glsConnectionSettingsStore

glsConnectionUsageLease

glsSettingsLoadState

glsSettingsSaveState

데이터세트로 벡터 전송

필드 매핑, 대상 CRS, 생성·교체·추가 모드와 FID 정책을 설정합니다. 데이터베이스 가져오기는 양쪽 테이블의 스냅샷을 만든 뒤 다시 검사합니다.

glsBulkImportFieldMapping

glsBulkImportOptions

glsBulkImportProgress

glsBulkImportProgressHandler

glsBulkImportResult

glsVectorTransferFidMode

glsVectorTransferFidPolicy

glsVectorTransferFieldMapping

glsVectorTransferMode

glsVectorTransferOptions

glsVectorTransferResult

glsVectorTransferSnapshot

필드 정책과 파일 게시

형식별 이름과 유형 제약을 검사하고 원본 너비를 조사합니다. 준비된 파일은 대상이 변경되지 않았을 때 게시하며 부분 복구 시 게시 보고서를 읽습니다.

glsExportArtifactKind

glsExportFieldIssue

glsExportFieldOptions

glsExportFieldPlan

glsExportFieldPolicy

glsExportPlanService

glsExportPublication

glsGeoJsonMergeSource

glsVectorExportFormat

서비스 호출과 진행 결과

내보내기, 병합 및 가져오기는 동기 호출입니다. 진행 콜백은 호출 스레드에서 실행합니다. 대상에 남은 변경은 실행 단계와 별도로 결과의 Evidence에서 확인합니다.

glsTransferEvidence

glsTransferExecution

glsTransferPhase

glsTransferProgress

glsTransferProgressHandler

glsVectorTransferOutcome

glsVectorTransferService