Package: eoplatform
An Earth Observation PlatformEarth Observation made easy.Report Bug|Request FeatureAbouteoplatformis a Python package that aims to simplify Remote Sensing Earth Observation by providing actionable information on a wide swath of RS platforms and provide a simple API for downloading and visualizing RS imagery. Made for scientists, educators, and hobbiests alike.Easy access to information on RS platformsmetadatamodule for extracting platform metadatasupports.txtand.xmlfilescompositesmodules for creating and learning about 91 RS band compositesComing soon:Data downloadingLandsat 8Sentinel-2Raster toolsRaster IO functionsInstallationeoplatformcan be installed by runningpip install eoplatform. It requires Python 3.8 or above to run.eoplatformdevelopment is ongoing -upgrade to the latest version by running:pip install eoplatform -UInstall the latest dev version with:pip install git+https://github.com/mtralka/EOPlatform/eoplatformUsageeoplatformis accessible through the command line (CLI) and as a module import.Querying information...through CLINAMEis any supported composite or platform (case-insensitive)Usage:eoplatforminfo[OPTIONS]NAME

Arguments:NAME[required]Options:-b,--only-bands/-nd,--no-description[default:True]--helpShowthismessageandexit.EX:Show all information onlandsat8eoplatforminfolandsat8Show onlylandsat8bandseoplatforminfolandsat8-bShow information on compositeNDVIeoplatforminfondvi...through importsYou can search through theeoplatformmoduleimporteoplatformaseopeop.info("Landsat8")# case insensitiveeop.info("NDVI)Or import your exact platform/compositefromeoplatform.platformsimportlandsat8fromeoplatform.compositesimportNDVIlandsat8.info()# OR print(landsat8)landsat8.bands.info()landsat8.bands.RED.info()NDVI.info()# or print(NDVI)Band compositesImportable througheoplatforms.compositesor searchable (shown above) fromeoplatform.info()Seeimplemented composite data dirfor the exact implemented composites (inspired byawesome spectral indices)Composite informationfromeoplatform.compositesimportNDVI# DVI, etcNDVI.info()Creating compositeComposites bands must be passed in as keyword arguments assigned to NumPy arrays.fromeoplatform.compositesimportNDVIred_array:np.ndarray=...nir_array:np.ndarray=...ndvi:np.ndarray=NDVI.create(NIR=nir_array,RED=red_array)Metadata extractionSupports.txtand.xmlfiles throughextract_XML_metadataandextract_TXT_metadata.fromeoplatform.metadataimportextract_XML_metadatafile_path:str=...target_attributes:List[str]=...values:Dict[str,str]=extract_XML_metadata(file_path,target_attributes)Adding platforms / compositesPlatforms and composites are auto-generated from/data/(composites,platforms). To add platforms or composites, simply create a new json file in the desired directory.PlatformPlatforms must have:abbreviation:strname:strExample platform JSONStandard key with value:"abbreviation":"L8",//snipKey with value and metadata:"altitude":{"meta":{"unit":"km"},"value":705}//snipBands standard for Platform keybandsPlatform key forbandsmust be a list of following thebandstandard. EX:"bands":[{"abbreviation":"CAER","description":"","name":"Coastal Aerosol","number":1,"resolution":"30","sensor":"OLI","wavelength":"0.433-0.453"},//snip]Band standard for el inbandsEach element tobandsis aband. Each band must have:number:intname:strabbreviation:strCompositesComposites must have:abbreviation:strformula:strname:strreference:strtype:str# matching CompositeTypebands:List[str]Example JSON Composite{"abbreviation":"ARI","bands":["GREEN","VRE1"],"description":"","formula":"(1 / GREEN) - (1 / VRE1)","name":"Anthocyanin Reflectance Index","reference":"https://doi.org/10.1562/0031-8655(2001)074%3C0038:OPANEO%3E2.0.CO;2","type":"vegetation"}Composite TypesPossible values for compositetypekeyVEGETATIONBURNWATERSNOWDROUGHTURBANKERNELNONEFor both platforms and composites, all other attributes will be dynamically rendered and shown ininfoRoadmapSee theopen issuesfor a list of proposed features (and known issues).download supportContributingContributions are welcome. Currently,eoplatformis undergoing rapid development and contribution opportunities may be scarce.If you have suggestions for adding or removing features, feel free toopen an issueto discuss it, or directly create a pull request with the proposed changes.Create individual PR for each suggestion.Use pre-commit hooks -pre-commit installCode style isblack,mypy --strictLicenseDistributed under the GNU GPL-3.0 License. SeeLICENSEfor more information.Built WithRichTyperNumpyawesome spectral indicesAuthorsMatthew Tralka