RasterDF2DB
- class geoanalytics.conversion.RasterDF2DB.RasterDF2DB(dataframe)[source]
Bases:
objectAbout this algorithm
- Description:
RasterDF2DB is a converter that takes a raster-format DataFrame (x, y, bands) and transforms it into various spatio-temporal database formats using DF2DB methods.
- Parameters:
dataframe (pandas.DataFrame): Input DataFrame with columns [x, y, band1, band2, …, bandN].
- Attributes:
df (DataFrame): A copy of the input DataFrame with renamed columns.
transactionDF (DataFrame): Transposed DataFrame used for database conversion.
Execution methods
import pandas as pd from geoanalytics.conversion import RasterDF2DB df = pd.read_csv('output.csv') converter = RasterDF2DB(dataframe=df) converter.prepareTransactionalDataframe() converter.convertToTransactionalDB(DBname='transactionDB.csv', condition='>=', thresholdValue=4000) converter.convertToTemporalDB(DBname='temporalDB.csv', condition='>=', thresholdValue=4000) converter.convertToUtilityDB(DBname='utilityDB.csv') converter.convertToGeoReferencedTransactionalDB(DBname='geoTransactionDB.csv', condition='>=', thresholdValue=4000) converter.convertToGeoReferencedTemporalDB(DBname='geoTemporalDB.csv', condition='>=', thresholdValue=4000) converter.convertToUncertainTransactionalDB(DBname='uncertainDB.csv', condition='>=', thresholdValue=4000) converter.convertToMultipleTimeSeries(DBname='multiTimeSeriesDB.csv', condition='>=', thresholdValue=4000, interval=2)
Credits
This implementation was created and revised under the guidance of Professor Rage Uday Kiran.
- convertToGeoReferencedTemporalDB(DBname: str, condition: str, thresholdValue: int | float)[source]
Converts to a geo-referenced temporal database format.
- Parameters:
DBname – Output file name.
condition – Filtering condition.
thresholdValue – Threshold value.
- convertToGeoReferencedTransactionalDB(DBname: str, condition: str, thresholdValue: int | float)[source]
Converts to a geo-referenced transactional database format.
- Parameters:
DBname – Output file name.
condition – Filtering condition.
thresholdValue – Threshold value.
- convertToMultipleTimeSeries(DBname: str, condition: str, thresholdValue: int | float, interval: int)[source]
Converts data into multiple time series format.
- Parameters:
DBname – Output file name.
condition – Filtering condition.
thresholdValue – Threshold value.
interval – Interval of time steps to be used.
- convertToTemporalDB(DBname: str, condition: str, thresholdValue: int | float)[source]
Converts to a temporal database format.
- Parameters:
DBname – Output file name.
condition – Filtering condition.
thresholdValue – Threshold value.
- convertToTransactionalDB(DBname: str, condition: str, thresholdValue: int | float)[source]
Converts the transactional DataFrame into a basic transactional database format.
- Parameters:
DBname – Output file name for the database.
condition – Filtering condition (e.g., ‘>=’).
thresholdValue – Value threshold to consider.
- convertToUncertainTransactionalDB(DBname: str, condition: str, thresholdValue: int | float)[source]
Converts to an uncertain transactional database format (for probabilistic scenarios).
- Parameters:
DBname – Output file name.
condition – Filtering condition.
thresholdValue – Threshold value.