Пример #1
0
latitude_extents = (min(extents['latitude'].values),
                    max(extents['latitude'].values))
longitude_extents = (min(extents['longitude'].values),
                     max(extents['longitude'].values))
time_extents = (min(extents['time'].values), max(extents['time'].values))
print(time_extents)

# <hr>
#
# ## <a id="define_extents">Define the Region to Be Examined</a>  [&#9652;](#top)

# In[4]:

from utils.data_cube_utilities.dc_display_map import display_map

display_map(latitude_extents, longitude_extents)

# In[5]:

params = {
    'latitude': (0.55, 0.7),
    'longitude': (35.55, 35.7),
    'time': (numpy.datetime64('2005-01-01T00:00:00.000000'),
             numpy.datetime64('2010-12-01T00:00:00.000000'))
}

# In[6]:

params = {
    'latitude': (0.55, 0.7),
    'longitude': (35.55, 35.7),
Пример #2
0
                     max(coordinates['longitude'].values))
print(longitude_extents)

# In[7]:

time_extents = (min(coordinates['time'].values),
                max(coordinates['time'].values))
print(time_extents)

# # Visualize Data Cube Region

# In[8]:

## The code below renders a map that can be used to orient yourself with the region.
from utils.data_cube_utilities.dc_display_map import display_map
display_map(latitude=latitude_extents, longitude=longitude_extents)

# > #### Picking a smaller analysis region

# In[9]:

######### Bangladesh ############################
# longitude_extents = (90.031428,  90.040565)
# latitude_extents  = ( 25.225266, 25.232605)

######### Colombia - Cartegena ##################
# longitude_extents = ( -74.8567, -74.8318 )
# latitude_extents = (1.326481586145379,  1.3424)
latitude_extents = (1.3255, 1.33)
longitude_extents = (-74.8567, -74.8422)
Пример #3
0
# >**Building a False Color Composite**
# > If you have three lowly correlated measurements, place each measurement on its own Red, Green, Blue channel and visualize it.

# In[20]:

write_png_from_xr('diagrams/urbanization/false_color.png',
                  urbanization_dataset, ["NDBI", "NDVI", "NDWI"],
                  scale=[(-1, 1), (0, 1), (0, 1)])

# ![](diagrams/urbanization/false_color.png)

# <br>
# >**Analyze The False Color Image**
#
# > Values that adhere strongly to individual classes adhere to their own color channel. In this example, NDVI adheres to green, NDWI adheres to blue, and NDBI seems to adhere to red

# <br>
# <br>
# > **Validate urbanization using other imagery**
# > Double check results using high-resolution imagery.  Compare to the false color mosaic
# <br>

# In[21]:

from utils.data_cube_utilities.dc_display_map import display_map
display_map(latitude=lat, longitude=lon)

# In[ ]:

# In[ ]: