Package: eotile
🛰️ EOTileEOTile is a tile grid management tool that provide quick and easy methods to grab tile ids or information about its footprint.
There are four grid systems currently supported :The one used byLandsat 8The one used bySentinel 2The standard forDEMtilesThe specific one used by many SRTM providers gathering 5x5 tiles⏬ InstallationInstall the package using pip:pipinstalleotile🔲 Usage📟 Through the CLIeotile[input][output]You caninputthese elements : a file, a tile id, a location, a wkt polygon, a bboxTo options (Optional):-to_file FILE_PATHWrite tiles to ageographyfile-to_wktOutput the geometry of matching tiles with wkt format on standard output-to_bboxOutput the bounding box of matching tiles on standard output-to_tile_idOutput the id(s) of matching tiles on standard output-to_locationOutput the location of the centroid of matching tiles on standard outputTiles selection :-no_l8output S2 tiles and not the L8 ones-no_s2output L8 tiles and not the S2 ones-s2_overlapUse S2 tiles with overlap-demUse elevation tiles as well-srtm5x5Use specific 5x5 SRTM tiles as wellOther options :-epsgSpecify the epsg of the input if not WGS84-logger_file LOGGER_FILE_PATHRedirect information from standard output to a file-location_type {city, county, state, country}If needed, specify the location type that is requested-threshold THRESHOLDFor large polygons at high resolution, you might want
to simplify them using a threshold (0 to 1)-min_overlap MIN_OVERLAPMinimum percentage of overlap to consider a tile (0 to 1)🐍 Through the python moduleGetting Started :# Import the modulefromeotileimporteotile_module# Create tile lists[S2_Tiles,L8_Tiles,DEM_Tiles,SRTM5x5_Tiles]=eotile_module.main("Spain",no_s2=True)# Replace Spain with whatever string you might need (a file, a tile id, a location, a wkt polygon, a bbox)# Returned elements are GeoPandas Dataframes :print(S2_Tiles.id)# Iter over the Dataframe :fortileinL8_Tiles.iterrows():print(tile[1].geometry.wkt)You can also use the advanced quicksearch# Import the modulefromeotile.eotile_moduleimportquick_search# Create the GeoPandas DataFrame of L8 Tiles corresponding to this S2 Tile idgdf=quick_search("31TCJ","tile_id","L8")>>idgeometry0198029POLYGON((0.8468244.02364,0.8463844.02370,...1199029POLYGON((-0.6982344.02364,-0.6986644.02370...2199030POLYGON((-0.8657942.55300,-1.1329642.59191...3198030POLYGON((0.6792742.55300,0.4121042.59191,...Note: quick_search uses OGR for a quicker result. This requires a proper installation of GDAL components🔖 ExamplesUsing a locationeotile"Metropolitan France"-threshold1-to_tile_idUsing a BBOXeotile"0.49593622377, 43.326246335, 1.7661878622, 44.246370915"-no_l8-logger_filetest.log(This line will produce an output under the test.log file)Using a wkteotile'POLYGON ((0.8468214953196805 44.02363566574142, 0.84638 44.0237, 0.8590044453705752 44.06127355906579, 0.8712896362539795 44.09783741052559, 1.325549447552162 45.44983010010615, 1.338016257992888 45.48693449754356, 1.35047 45.524, 1.350948946138455 45.52393017672913, 3.65866 45.1875, 3.644501621308357 45.14977803391441, 3.111537654412643 43.72980975068511, 3.09866 43.6955, 0.8468214953196805 44.02363566574142))'-to_location-no_s2Using S2 tile idseotile"31TCJ, 31TCE"-to_filedata/TLS_tiles.shpUsing a fileeotiletests/test_data/illinois.shp-no_l8-vvv👁️‍🗨️ Data sources & LicensesSRTM 5x5Vector grid of Specific SRTM 5x5 degree tiles
See issue #39 to downloadDEMSeeDEM_Union_source🆘 Help and TroubleshootSeehttps://www.gaia-gis.it/fossil/libspatialite/tktview/760ef1affb822806191393ac3f208fc9d8647758Note that the number of Tiles of S2 without overlap and with overlap is not the same. The difference apparently lies in the Geodesic line break north and south corners.S2 without overlap: 56686 TilesS2 with ouverlap:   56984 Tiles