File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 16
16
- name : Install build deps and run test
17
17
shell : pwsh
18
18
run : |
19
- ./scripts/env.ps1
20
19
ls
21
- cargo run --example spatial_reference
20
+ ./scripts/env.ps1
21
+ cargo run
Original file line number Diff line number Diff line change
1
+ $gdal_home = Join-Path - Path $PSScriptRoot - ChildPath " gdal"
1
2
$gdal_bin = Join-Path - Path $PSScriptRoot - ChildPath " gdal\bin"
2
3
$gdal_apps = Join-Path - Path $PSScriptRoot - ChildPath " gdal\bin\gdal\apps"
3
- $gdal_home = Join-Path - Path $PSScriptRoot - ChildPath " gdal"
4
4
$proj_lib = Join-Path - Path $PSScriptRoot - ChildPath " gdal\bin\proj9\share"
5
5
$gdal_pc_path = Join-Path - Path $PSScriptRoot - ChildPath " gdal\gdal.pc"
6
6
@@ -48,4 +48,6 @@ Cflags: -I${includedir}/${name}
48
48
'@
49
49
50
50
# 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
Original file line number Diff line number Diff line change 1
1
fn main ( ) {
2
+ use gdal:: { Dataset , Metadata } ;
3
+ use std:: path:: Path ;
2
4
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:?}" ) ;
3
16
}
You can’t perform that action at this time.
0 commit comments