kvos / CoastSat

Global shoreline mapping tool from satellite imagery
http://coastsat.space
GNU General Public License v3.0
696 stars 252 forks source link

Attribute Error #431

Closed rajeevreddy512 closed 11 months ago

rajeevreddy512 commented 1 year ago

metadata = SDS_download.retrieve_images(inputs) Number of images available between 2023-01-01 and 2023-06-01:

Downloading images: S2: 30 images Traceback (most recent call last):

Cell In[4], line 1 metadata = SDS_download.retrieve_images(inputs)

File ~\Desktop\CoastSat-master\CoastSat\SDS_download.py:376 in retrieve_images warp_image_to_target(fn_in,fn_out,fn_target,double_res=False,resampling_method='bilinear')

File ~\Desktop\CoastSat-master\CoastSat\SDS_download.py:835 in warp_image_to_target georef_target = np.array(im_target.GetGeoTransform())

AttributeError: 'NoneType' object has no attribute 'GetGeoTransform'

kvos commented 1 year ago

add input polygon, dates etc pls

rajeevreddy512 commented 1 year ago

%% 1. Initial settings

load modules

import os import numpy as np import pickle import warnings warnings.filterwarnings("ignore") import matplotlib.pyplot as plt from matplotlib import gridspec plt.ion() import pandas as pd from scipy import interpolate from scipy import stats from datetime import datetime, timedelta import pytz from CoastSat import SDS_download, SDS_preprocess, SDS_shoreline, SDS_tools, SDS_transects

region of interest (longitude, latitude in WGS84)

polygon = [[[80.432669, 15.803554], [80.426357, 15.806707], [80.337994, 15.742360], [80.333018, 15.744202], [80.396053, 15.785080]]]

can also be loaded from a .kml polygon

kml_polygon = os.path.join(os.getcwd(), 'examples', 'Suryalanka_polygon.kml')

polygon = SDS_tools.polygon_from_kml(kml_polygon)

convert polygon to a smallest rectangle (sides parallel to coordinate axes)

polygon = SDS_tools.smallest_rectangle(polygon)

date range

dates = ['2023-01-01', '2023-06-01']

satellite missions

sat_list = ['S2'] collection = 'C02' # choose Landsat collection 'C01' or 'C02'

name of the site

sitename = 'Suryalanka'

filepath where data will be stored

filepath_data = os.path.join(os.getcwd(), 'data')

put all the inputs into a dictionnary

inputs = { 'polygon': polygon, 'dates': dates, 'sat_list': sat_list, 'sitename': sitename, 'filepath': filepath_data, 'landsat_collection': collection }

before downloading the images, check how many images are available for your inputs

SDS_download.check_images_available(inputs);

kvos commented 1 year ago

it;'s working well on my end, try to clean up your folder and restart the downloads on a clean folder. 2023-01-10-05-14-26_S2

rajeevreddy512 commented 1 year ago

sir this was downloaded but S2 images are not downloaded.

On Fri, Jul 14, 2023 at 5:14 AM Kilian Vos @.***> wrote:

it;'s working well on my end, try to clean up your folder and restart the downloads on a clean folder. [image: 2023-01-10-05-14-26_S2] https://user-images.githubusercontent.com/7217258/253430895-b7a27127-2b3a-406f-a30e-dde45a21c7a5.jpg

— Reply to this email directly, view it on GitHub https://github.com/kvos/CoastSat/issues/431#issuecomment-1635061650, or unsubscribe https://github.com/notifications/unsubscribe-auth/A55FZV2ZGIU4EH7SJSKBKWTXQCB5NANCNFSM6AAAAAA2IVEJSU . You are receiving this because you authored the thread.Message ID: @.***>

rajeevreddy512 commented 1 year ago

dear Sir,

I hope this email finds you well. I am writing to seek assistance regarding an issue I encountered while using your Batch Shoreline Detection program. I have been experiencing difficulties with the program, specifically during the pansharpening process.

Upon running the program, I received an error message stating that the pansharpening of the image located at the following file path failed: C:\Users\USER\Desktop\CoastSat-master\data\Kavaratti\L9\ms\2021-12-28-05-30-30_L9_Kavaratti_ms.tif

Despite my efforts to troubleshoot the problem, I have been unable to find a resolution. I have checked the system resources to ensure sufficient computational power, confirmed the existence of the image file at the specified location, and verified the compatibility of the image format with the program's requirements. However, the program continues to be unresponsive.

I would greatly appreciate any guidance or assistance you can provide to help me resolve this issue. Could you kindly offer any specific recommendations or troubleshooting steps that I might have missed? Additionally, if there are any known issues or updates related to the pansharpening process, please let me know.

If there are any specific log files, error codes, or additional information that would be helpful for you to diagnose the problem, please inform me, and I will be glad to provide them.

Thank you very much for your time and consideration. I look forward to your guidance and assistance in resolving this matter.

Thanks & Regards G.Rajeev Reddy,

On Fri, Jul 14, 2023 at 10:44 AM Rajeev Reddy @.***> wrote:

sir this was downloaded but S2 images are not downloaded.

On Fri, Jul 14, 2023 at 5:14 AM Kilian Vos @.***> wrote:

it;'s working well on my end, try to clean up your folder and restart the downloads on a clean folder. [image: 2023-01-10-05-14-26_S2] https://user-images.githubusercontent.com/7217258/253430895-b7a27127-2b3a-406f-a30e-dde45a21c7a5.jpg

— Reply to this email directly, view it on GitHub https://github.com/kvos/CoastSat/issues/431#issuecomment-1635061650, or unsubscribe https://github.com/notifications/unsubscribe-auth/A55FZV2ZGIU4EH7SJSKBKWTXQCB5NANCNFSM6AAAAAA2IVEJSU . You are receiving this because you authored the thread.Message ID: @.***>