![]() # Import Example Data # - # To get started, make sure your directory is set. "data", "spatial-vector-lidar", "usa", "usa-boundary-dissolved.shp"Ĭountry_boundary = gpd.read_file(country_path) # Set your home environment os.chdir(os.path.join(et.io.HOME, "earth-analytics")) # Open both files with GeoPandas If the data are not in the same CRS, be sure to use # the ``to_crs()`` function from GeoPandas to match the projects between the # two objects, as shown below. # Recall that the data must be in the same CRS in order to use the # ``clip_shp()`` function. Then, import the data files to # GeoDataFrames using GeoPandas. # Open Files with GeoPandas and Reproject the Data # - # Start by setting your working directory. Landsat_ext = plotting_extent(landsat_pre_cl)ĭata = et.data.get_data( "spatial-vector-lidar") os.chdir(os.path.join(et.io.HOME, "earth-analytics")) # Stack the landsat bands # This creates a numpy array with each "layer" representing a single band tif files (one per band) and import the ``landsat_qa`` layer which provides # the locations of cloudy and shadowed pixels in the scene. Create a stack from all of the # Landsat. # Get data and set your home working directoryĭata = et.data.get_data( "cold-springs-fire") The list for titles must contain the same number of # strings as there are bands in the stack. # Plot All Histograms in a Stack With Custom Titles and Colors # - # You can create histograms for each band with unique colors and titles by # first creating a list of colors and titles that will be provided to the # ep.hist() function. ![]() Landsat_path = glob(os.path.join( "data", "vignette-landsat", "*band*.tif"))Īrray_stack, meta_data = es.stack(landsat_path, nodata=- 9999) # Set working directory os.chdir(os.path.join(et.io.HOME, "earth-analytics")) # Stack the Landsat 8 bands # This creates a numpy array with each "layer" representing a single band # You can use the nodata parameter to mask nodata values # Get data for exampleĭata = et.data.get_data( "vignette-landsat") Then, create a stack from all # of the Landsat.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |