Run PROJ command with optional args. Parameters ---------- args : list Zero or more arguments. **kwargs : dict Passed to ``subprocess.run``. Returns ------- subprocess.CompletedProcess
(args=[], **kwargs)
| 88 | |
| 89 | |
| 90 | def run_proj_cmd(args=[], **kwargs): |
| 91 | """Run PROJ command with optional args. |
| 92 | |
| 93 | Parameters |
| 94 | ---------- |
| 95 | args : list |
| 96 | Zero or more arguments. |
| 97 | **kwargs : dict |
| 98 | Passed to ``subprocess.run``. |
| 99 | |
| 100 | Returns |
| 101 | ------- |
| 102 | subprocess.CompletedProcess |
| 103 | """ |
| 104 | args = [PROJ] + args |
| 105 | proc = subprocess.run(args, capture_output=True, env=PROJ_ENV, **kwargs) |
| 106 | proc.check_returncode() |
| 107 | return proc |
| 108 | |
| 109 | |
| 110 | def geojson2geom_array(file): |