IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Python Discussion :

telecharger image landsat 8 par script


Sujet :

Python

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Femme Profil pro
    Étudiant
    Inscrit en
    Septembre 2018
    Messages
    44
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Allemagne

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Septembre 2018
    Messages : 44
    Par défaut telecharger image landsat 8 par script
    Bonjour :
    j'aimerai faire un script pour telecharger des produits landsat mais j arrive pas

    j'ai trouver c script pour telecharger sentinel 2 mais il m arche plus

    besoin d aide svp

    voila



    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    @author: maji
    """
     
    # connect to the API
    import sentinelsat
    from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt
    from datetime import date
    from collections import OrderedDict
    import panda as pd
     
    api = SentinelAPI("username", "mot de passe",https://scihub.copernicus.eu/dhus/#/home '')
     
    ### download single scene by known product id
    ### api.download(<product_id>)
     
    # search by polygon, time, and SciHub query keywords, polygone geojson en WGS84 obligatoire
    # possibilité de faire une recherche directement avec les corrdonnée d'un polygone ou d'un point
    footprint = geojson_to_wkt(read_geojson('test.geojson'))
    products = api.query(footprint,
                         date=("20160713", "20160722"),
                         platformname="sentinel-2",
                         cloudcoverpercentage=(0, 10))                     
                         # d'autres filtre sont disponibles et adaptés à chaque plateforme:
                         # date = ("NOW-2DAYS","NOW")
                         # producttype = "GRD",
                         # orbitdirection = "ascending",
                         # polarisationmode = "VV + VH",
                         # sensoroperationamode = "IW",
    print(products)
     
    # convert to Pandas DataFrame
    products_df = api.to_dataframe(products)
     
    # sort and limit to first 5 sorted products
    products_df_sorted = products_df.sort_values(['cloudcoverpercentage', 'ingestiondate'], ascending=[True, True])
    print(product_df_sorted)
    products_df_sorted = products_df_sorted.head(5)
     
    # download all results from the search
    api.download_all(products)
     
    # download sorted and reduced products
    api.download_all(products_df_sorted['id'])
     
    # GeoJSON FeatureCollection containing footprints and metadata of the scenes
    api.to_geojson(products)
     
    # GeoPandas GeoDataFrame with the metadata of the scenes and the footprints as geometries
    #api.to_geodataframe(products)
     
    # Get basic information about the product: its title, file size, MD5 sum, date, footprint and
    # its download url
    api.get_product_odata(<product_id>)
    # Get the product's full metadata available on the server
    api.get_product_odata(<product_id>, full=True)
    [23:15, 13/10/2018] Zik: # connect to the API
    from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt
    from datetime import date
     
    api = SentinelAPI('user', 'password', 'https://scihub.copernicus.eu/dhus')
     
    # download single scene by known product id
    api.download(<product_id>)
     
    # search by polygon, time, and SciHub query keywords
    footprint = geojson_to_wkt(read_geojson('map.geojson'))
    products = api.query(footprint,
                         date=('20151219', date(2015, 12, 29)),
                         platformname='Sentinel-2',
                         cloudcoverpercentage=(0, 30))
     
    # download all results from the search
    api.download_all(products)
     
    # GeoJSON FeatureCollection containing footprints and metadata of the scenes
    api.to_geojson(products)
     
    # GeoPandas GeoDataFrame with the metadata of the scenes and the footprints as geometries
    api.to_geodataframe(products)
     
    # Get basic information about the product: its title, file size, MD5 sum, date, footprint and
    # its download url
    api.get_product_odata(<product_id>)
     
    # Get the product's full metadata available on the server
    api.get_product_odata(<product_id>, full=True)
    svp c ou le problem j travaille avec pthon2 sur anaconda j ai instaler gdal et sentinelsat aussi

  2. #2
    Expert confirmé

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 307
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 307
    Par défaut
    Salut,

    D'abord toujours commencer par se dire que quelqu'un l'a déjà fait.

    Et c'est le cas: landsat-util

Discussions similaires

  1. formatage d'image par script ?
    Par hlcginfo dans le forum Débuter
    Réponses: 0
    Dernier message: 18/04/2008, 18h03
  2. Mettre en évidence image/lien pointée par curseur
    Par aokiseiichiro dans le forum Balisage (X)HTML et validation W3C
    Réponses: 1
    Dernier message: 21/01/2006, 12h37
  3. [ImageMagick] Générer deux images à partir du même script
    Par molesqualeux dans le forum Bibliothèques et frameworks
    Réponses: 1
    Dernier message: 07/01/2006, 01h42
  4. [MAPI] Envoi de courriels par scripts
    Par NicoNours dans le forum Windows
    Réponses: 3
    Dernier message: 26/05/2005, 12h01
  5. Afficher une image sans passer par les textures
    Par Black_Daimond dans le forum DirectX
    Réponses: 3
    Dernier message: 09/05/2003, 19h13

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo