Skip to main content

provides utilities to deal with large geospatial Datasets and provides functions for Fast computation of NDVI and MNDVI indces,

Project description

HighGeoX

This is official documaentation of HighGeoX The package has many useful functions for dealing with geospatial data, also few functions like computation of NDVI(Natural Density Vegetation Index), MNDVI(Modified Natural Density Vegetation Index) are integrated with dask to speed up it's computation.

Installation

This can installed using pip using the following command in both Windows and Linux OS

$ pip install HighGeoX

Usage

All Sorted File Names

The geospatial data file names are moslty represented by date and time. For few specific tasks like time series forecasting , it might be necessary to get all files in sequential form. This function returns list of all file names in sorted order.

Function

get_file_names(folder_path)

Parameters

  1. folder_path: Folder path where geospatial Images exist

Return Type

Ordered name list of Geospatial Images


Number of Bands

The functions finds number of bands in the image. Red, Green, Blue, Infrared etc.

Function

number_of_bands(filepath)

Parameters

  1. file path: Path of Image.

Return Type

Integer value, number of bands.


Numpy Array of the Image

The functions converts the file in numpy array format with all it's bands.

Function

numpy_image(filepath):

Parameters

  1. file path: Path of Image.

Return Type

Numpy Array.


Dataframe of the Image

Converts the geospatial file in pandas dataframe.

Function

dataframe_image(filepath)

Parameters

  1. file path: Path of Image.

Return Type

Pandas dataframe.


Min Max Scaling of Dataframe

This functions performs min-max scaling of the dataframe.

Function

min_max_scaled(df_raw)

Parameters

  1. df_raw: Input pandas dataframe.

Return Type

Numpy array representing scaled values.


Convert the numpy to dask array

This function converts numpy array to dask array with specified chunks of the same baMNDVIdth.

Function

numpy_to_dask_array(df,chunk_len)

Parameters

  1. df: Input dataframe
  2. chunk_len:specifies the chunk size

Return Type

Dask array.


One hot to label

Some of the geospatial data may be segmented (each pixel being classified to a label). Generally the open source labelled data is one hot encoded. This functions converts the it in labelled form.

Function

one_hot_to_label(file_path)

Parameters

  1. file path: Path of Image.

Return Type

Numpy array representing labelled data with only one band.


Ordered labels

Some of the labels of an image might not be following a sequential form. For eg there is bunch of images whose pixel labels are from 2,4, 7. To make it sequential this function would be helpful

Function

get_ordered_labels(y)

Parameters

  1. _y: Labelled numpy array.

Return Type

Ordered numpy array.


Normalized difference

This is a key functions used for NDVI and MMNDVI indices. With specifying band values as Red and Near Red Infrared bands we can find NDVI index , and by specifying Short Wave Infrared and Green bands whe can get MMNDVI index for any geospatial image.

Function

normalized_difference( b1, b2):

NDVI Computation (Returning list)

Functions here are used for finding NDVI indices of list of geospatial image

Without Dask

Function

find_ndvi_list(file_path_list)

Parameters

  1. file path_list: List of path of Images.

Return Type

List of NDVI index (numpy array) in the same order of values in input list.


With Dask

Function

find_ndvi_list_with_dask(worker_nodes,file_path_list)

Parameters

  1. file path_list: List of path of Images.
  2. worker_nodes: Number of dask worker nodes in a cluster

Return Type

List of NDVI index (numpy array) in the same order of values in input list.


NDVI Computation (Saving the values in folder)

Without Dask

Function

find_and_write_ndvi_list(file_path_list,destination_folder)

Parameters

  1. file path_list: List of path of Images.
  2. destination_folder: path where indices will be saved.

Return Type

None


With Dask

Function

find_and_write_ndvi_list_with_dask(worker_nodes,file_path_list,destination_folder)

Parameters

  1. file path_list: List of path of Images.
  2. worker_nodes: Number of dask worker nodes in a cluster
  3. destination_folder: path where indices will be saved.

Return Type

None

MNDVI Computation (Returning list)

Functions here are used for finding MNDVI (Natural Density Water Index) indices of list of geospatial image

Without Dask

Function

find_mndvi_list(file_path_list)

Parameters

  1. file path_list: List of path of Images.

Return Type

List of MNDVI index (numpy array) in the same order of values in input list.


With Dask

Function

find_mndvi_list_with_dask(worker_nodes,file_path_list)

Parameters

  1. file path_list: List of path of Images.
  2. worker_nodes: Number of dask worker nodes in a cluster

Return Type

List of MNDVI index (numpy array) in the same order of values in input list.


MNDVI Computation (Saving the values in folder)

Without Dask

Function

find_and_write_mndvi_list(file_path_list,destination_folder)

Parameters

  1. file path_list: List of path of Images.
  2. destination_folder: path where indices will be saved.

Return Type

None


With Dask

Function

find_and_write_mndvi_list_with_dask(worker_nodes,file_path_list,destination_folder)

Parameters

  1. file path_list: List of path of Images.
  2. worker_nodes: Number of dask worker nodes in a cluster
  3. destination_folder: path where indices will be saved.

Return Type

None

Contributing

The following are the core contributors:

  1. Deeksha Agarwal
  2. Pratyush Upadhyay

License

fasGeo was created by IITB-SCL. It is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

HighGeoX-0.1.4.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

HighGeoX-0.1.4-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file HighGeoX-0.1.4.tar.gz.

File metadata

  • Download URL: HighGeoX-0.1.4.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for HighGeoX-0.1.4.tar.gz
Algorithm Hash digest
SHA256 30b27fe95bfea44d607cf4ae1b37523b1aed801e34782e63296476f801c568e7
MD5 235725b9b467afa9d2799d674dfe3134
BLAKE2b-256 adb82233c2f48414635430f79ea36e97ca551b3e7fa7a5518d57b6f15086ba1b

See more details on using hashes here.

File details

Details for the file HighGeoX-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: HighGeoX-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for HighGeoX-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 11a7895779372a0189238e21ba715056c0e0d7c659b88a2878ccd89e09099a8d
MD5 8868c76754614903670cf8817f53f855
BLAKE2b-256 45eddabe615ca75a9c11e4d7a25293c1aecec6f24271eb6d72778e7443943b8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page