MCPcopy Index your code
hub / github.com/WebODM/WebODM / read

Method read

app/classes/gcp.py:14–31  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12 self.read()
13
14 def read(self):
15 if self.exists():
16 with open(self.gcp_path, 'r') as f:
17 contents = f.read().strip()
18
19 lines = list(map(str.strip, contents.split('\n')))
20 if lines:
21 self.raw_srs = lines[0] # SRS
22
23 for line in lines[1:]:
24 if line != "" and line[0] != "#":
25 parts = line.split()
26 if len(parts) >= 6:
27 self.entries.append(line)
28 else:
29 logger.warning("Malformed GCP line: %s" % line)
30 else:
31 logger.warning("GCP file %s does not exist" % self.gcp_path)
32
33 def iter_entries(self):
34 for entry in self.entries:

Callers 15

__init__Method · 0.95
export_rasterFunction · 0.45
__str__Method · 0.45
delinkMethod · 0.45
test_core_pluginsMethod · 0.45
do_POSTMethod · 0.45
test_taskMethod · 0.45
test_taskMethod · 0.45
do_POSTMethod · 0.45
getMethod · 0.45
postMethod · 0.45

Calls 3

existsMethod · 0.95
appendMethod · 0.80
mapFunction · 0.50

Tested by 5

test_core_pluginsMethod · 0.36
do_POSTMethod · 0.36
test_taskMethod · 0.36
test_taskMethod · 0.36