Skip to content

Commit 18eb7db

Browse files
committed
add log
1 parent 4916e9c commit 18eb7db

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

.github/workflows/gdal-env.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
- name: Install build deps and run test
1717
shell: pwsh
1818
run: |
19-
./scripts/env.ps1
2019
ls
21-
cargo run --example spatial_reference
20+
./scripts/env.ps1
21+
cargo run

scripts/env.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
$gdal_home=Join-Path -Path $PSScriptRoot -ChildPath "gdal"
12
$gdal_bin=Join-Path -Path $PSScriptRoot -ChildPath "gdal\bin"
23
$gdal_apps=Join-Path -Path $PSScriptRoot -ChildPath "gdal\bin\gdal\apps"
3-
$gdal_home=Join-Path -Path $PSScriptRoot -ChildPath "gdal"
44
$proj_lib=Join-Path -Path $PSScriptRoot -ChildPath "gdal\bin\proj9\share"
55
$gdal_pc_path=Join-Path -Path $PSScriptRoot -ChildPath "gdal\gdal.pc"
66

@@ -48,4 +48,6 @@ Cflags: -I${includedir}/${name}
4848
'@
4949

5050
# 5、write gdal.pc
51-
Set-Content -Path $gdal_pc_path -Value $gdal_content
51+
Set-Content -Path $gdal_pc_path -Value $gdal_content
52+
53+
Get-Content $gdal_pc_path

src/main.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
fn main() {
2+
use gdal::{Dataset, Metadata};
3+
use std::path::Path;
24

5+
let driver = gdal::DriverManager::get_driver_by_name("mem").unwrap();
6+
println!("driver description: {:?}", driver.description());
7+
8+
let path = Path::new("./fixtures/tinymarble.png");
9+
let dataset = Dataset::open(path).unwrap();
10+
println!("dataset description: {:?}", dataset.description());
11+
12+
let key = "INTERLEAVE";
13+
let domain = "IMAGE_STRUCTURE";
14+
let meta = dataset.metadata_item(key, domain);
15+
println!("domain: {domain:?} key: {key:?} -> value: {meta:?}");
316
}

0 commit comments

Comments
 (0)