ArcGIS Developers

ArcGIS API for Python

Coastline extraction using Landsat-8 multispectral imagery and band ratio technique


Due to anthropogenic activities and natural processes i.e. changes in sea level, sedimentation and wave energy coastlines are changing throughout the world. Coastline is contact line between sea and land, it is an important linear feature on earth's surface with dynamic nature.

Traditionally, the coastlines were manually digitized which was time-consuming and labour intensive. Remote sensing is a good alternative to extract coastlines using satellite imagery, this way both temporal and spatial aspects can be covered.

Satellite imagery of visible range can be used for interpretation and can be easily obtained. But the imageries covering infrared wavelength is best to extract boundary between land and water. So, the satellites which covers both visible and infrared spectrum are widely accepted for coastline extraction and mapping.

Landsat-8 multispectral imagery is used in the current study as it covers a wavelength ranging from 0.43 to 12.51 micrometers, and hence suitable for coastal and aerosol studies.


Neccessary Imports

In [1]:
import os
import glob
from zipfile import *

import arcgis
import arcpy
from import PolygonToLine
from datetime import datetime
import pandas as pd
from arcgis.features import GeoAccessor, GeoSeriesAccessor
from import convert_feature_to_raster, convert_raster_to_feature
from arcgis.geoanalytics.manage_data import clip_layer
from arcgis.raster.functions import equal_to, greater_than, clip, apply, extract_band, stretch

Connect to your GIS

In [2]:
from arcgis import GIS
gis =  GIS('home')
gis2 = GIS('', 'arcgis_python', 'amazing_arcgis_123')

Get the data for analysis

Multispectral Landsat includes Landsat GLS and Landsat 8 imagery for use in visualization and analysis. This layer is time enabled and includes a number band combinations and indices rendered on demand. The Landsat 8 imagery includes eight multispectral bands from the Operational Land Imager (OLI) with 30m spatial resolution and two bands from the Thermal Infrared Sensor (TIRS) of 100m spatial resolution. It is updated daily with new imagery directly sourced from the Landsat on AWS collection.

In [3]:
landsat_item ='title:Multispectral Landsat owner:esri_livingatlas tags:Multitemporal, imagery, landsat 8, temporal, MS', 'Imagery Layer', outside_org=True)[0]
landsat = landsat_item.layers[0]
Multispectral Landsat
Landsat multispectral and multitemporal imagery with on-the-fly renderings and indices for visualization and analysis. The Landsat 8 imagery in this layer is updated daily and is directly sourced from the Landsat on AWS collection.Imagery Layer by esri_livingatlas
Last Modified: May 14, 2020
0 comments, 1 views

The buffer feature of 20 km was created from USA boundaries. This feature layer geometry will be used to get the Landsat-8 tiles of coastal areas.

In [4]:
aoi ='usa_coast_buff_f', 'feature layer')[0]