or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

cloud-masking.mdcollection-operations.mdcompositing.mdexport-download.mdimage-processing.mdindex.mdinitialization.md

initialization.mddocs/

0

# Earth Engine Initialization

1

2

Initialize Google Earth Engine with high-volume endpoint and credential management, including support for service account authentication and environment variable configuration.

3

4

## Capabilities

5

6

### Initialize Function

7

8

Initialize Earth Engine with optional configuration for endpoint URL and authentication parameters.

9

10

```python { .api }

11

def Initialize(

12

opt_url: str = 'https://earthengine-highvolume.googleapis.com',

13

**kwargs

14

) -> None:

15

"""

16

Initialize Earth Engine.

17

18

Credentials will be read from the EE_SERVICE_ACC_PRIVATE_KEY environment

19

variable if it exists (useful for integrating with e.g. GitHub actions).

20

21

Parameters:

22

- opt_url (str): The Earth Engine endpoint to use. Defaults to the high

23

volume endpoint. See the Earth Engine docs for available endpoints.

24

- **kwargs: Additional keyword arguments passed to ee.Initialize()

25

26

Returns:

27

None

28

"""

29

```

30

31

**Usage Example:**

32

33

```python

34

import geedim

35

36

# Initialize with default high-volume endpoint

37

geedim.Initialize()

38

39

# Initialize with custom endpoint

40

geedim.Initialize(opt_url='https://earthengine.googleapis.com')

41

42

# Initialize with additional Earth Engine parameters

43

geedim.Initialize(project='my-project-id')

44

```

45

46

**Environment Variable Support:**

47

48

The function automatically detects service account credentials from the `EE_SERVICE_ACC_PRIVATE_KEY` environment variable, making it ideal for CI/CD pipelines and server deployments.

49

50

```python

51

import os

52

import geedim

53

54

# Set service account key via environment variable

55

os.environ['EE_SERVICE_ACC_PRIVATE_KEY'] = 'path/to/service-account.json'

56

geedim.Initialize()

57

```

58

59

**High-Volume Endpoint:**

60

61

By default, geedim uses the high-volume Earth Engine endpoint (`https://earthengine-highvolume.googleapis.com`) which provides better performance for bulk operations and exports compared to the standard endpoint.