Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

""" 

Some tools to work with databases 

""" 

from navipy.database import DataBase 

 

 

def copy(filename_in, filename_out): 

""" Copy database until in crashed or finish 

 

:param filename_in: Path to the input database 

:param filename_out: Path to the output database 

""" 

dbin = DataBase(filename_in, mode='r') 

dbout = DataBase(filename_out, mode='a') 

for i, posorient in dbin.get_posorients().iterrows(): 

print(posorient) 

try: 

image = dbin.read_image(posorient) 

except ValueError: 

break 

dbout.write_image(posorient, image)