Catalog on the fly satellite images Luiz Motta FOSS4G 2015 - Seul - - PowerPoint PPT Presentation

catalog on the fly satellite images
SMART_READER_LITE
LIVE PREVIEW

Catalog on the fly satellite images Luiz Motta FOSS4G 2015 - Seul - - PowerPoint PPT Presentation

Catalog on the fly satellite images Luiz Motta FOSS4G 2015 - Seul Luiz.motta@ibama.gov.br http://www.ibama.gov.br MMA - Ministry of the Environment Brazil IBAMA - Brazilian Institute of Environment and Renewable Natural Resources DIPRO -


slide-1
SLIDE 1

Catalog on the fly satellite images

Luiz.motta@ibama.gov.br http://www.ibama.gov.br

Luiz Motta FOSS4G 2015 - Seul

slide-2
SLIDE 2

MMA - Ministry of the Environment – Brazil IBAMA - Brazilian Institute of Environment and Renewable Natural Resources DIPRO - Directorship of Environmental Protection CGMAM – General Coordination of Monitoring COTIG – Coordination of Geospatial Technology * Luiz Motta:

  • Academic education
  • Forestry Engineer
  • Msc. Forestry Science (Optimization with GIS) – 1995
  • Profissional experience (using GIS):

EMBRAPA (Corn zoning), IEF-MG(monitoring of vegetation), … IBAMA (since 2003 – first tender for career) Amazon: SIPAM, Terra Legal Project, … FOSS4G: since 2010(contribution for QGIS).

slide-3
SLIDE 3

Example of goal: Deforestation of Amazon

slide-4
SLIDE 4

Example of goal: Illegal mining

slide-5
SLIDE 5
  • Satellite images used by DIPRO.
  • Change in the use of satellite images.
  • Demand of images for shares of DIPRO.
  • Catalog on the fly
  • Server – Generation Geotif and TMS - Products ready
  • Client – QGIS
  • Planet Labs Catalog – Explorer Program.

Presentation plan

slide-6
SLIDE 6
  • Free images
  • CBERS 2B (Brazil e China)
  • 20m(CCD) e 2.7m(HRC)
  • Until 2010
  • Popularizing the use of images- INPE: Start 2004

“Experts”

  • ALOS/Amazon Project (IBAMA, DPF and JICA)
  • ALOS/PALSAR: 100m
  • 2010 – 2011
  • LANDSAT:

Ortho rectified (temporal series + Landsat 8 ~ 4.5K)

  • Purchased:
  • Rapideye: 3 covers of all Brazil (8,516,000 km2) ~57k

Satellite images used by DIPRO

slide-7
SLIDE 7

Satellite images used by DIPRO

LANDSAT(2001- 2015) LANDSAT RAPIDEYE

slide-8
SLIDE 8

Change in the use of satellite images

  • High availability of higher spatial resolution
  • Effect “Google”, “Bing”,...
  • Reduced need for specialist.
  • Image classification x visual interpretation
  • IBAMA:
  • Deforestation interpretation on each pass Landsat(16

days)

  • Detect changes based on temporal series temporal

series.

  • Support with images higher spatial resolution
slide-9
SLIDE 9

Change in the use of satellite images

LANDSAT 8: 2015-08-28 1:10,500 BING 1:10,500 GOOGLE 1:10,500 1:50,000 1:10,500 2015-08-05

slide-10
SLIDE 10

Change in the use of satellite images

RAPIDEYE 2014-06-19

slide-11
SLIDE 11

Change in the use of satellite images

RAPIDEYE 2014-06-19 - R3G5B2

Landsat 8(2014-07-24) R6G5B4 Rapideye 5(2014-06-19) R3G5B2

Improvement for interpretation Scale: 1:10,000

slide-12
SLIDE 12

Demand of images for shares of DIPRO

Detect new deforestation fronts. Temporal and spatial availabilityl: Example: Sentinel-2(10m) + Landsat

2015-05-10 2015-06-11

CR = Clear-cut

slide-13
SLIDE 13

Catalog on the fly

  • Objective: Obtain images automatically from a target
  • Need – Server/local:
  • Organize images acquis (Landsat, RapidEye, ...)
  • End Product (RGB composition)

Geotiff and TMS

  • Footprint images (Catalog layer ) - Address of images
  • Need – Client(QGIS):
  • Plugin for identify the images in the map extension
  • Recognize the type of source (local or server)
  • Automatically add images(Layer Group)
  • Order by date

ento da grade com a extensão do mapa

slide-14
SLIDE 14

Catalog on the fly

Use the original name + RGB

Processing:

  • Create RGB: 2_rgb.sh LC82270632013140LGN01.tif 6 5 4
  • Convert for 8bits:

16b_2_8b_convert.sh LC82270632013140LGN01_r6g5b4.tif

  • Change original image.
  • Scale: Minimum → 0 and Maximum → 255

Scripts: https://github.com/lmotta/scripts-for-gis

slide-15
SLIDE 15

Catalog on the fly

Create TMS and GDAL_WMS files

mk_tiles.sh LC82270632013140LGN01_r6g5b4.tif 2 15 /images/tms/landsat /imagens/png/landsat http://10.1.25.66/imagens/tms/landsat * gdal_tiler.py (tilers-tools 3.2.0) Create new TAG: TargetWindow Use for “Zoom to Layer”

slide-16
SLIDE 16

Catalog on the fly

Bash example: nohup parallel mk_tiles.sh {} 2 17 ./png ./tms url < images.lst

slide-17
SLIDE 17

Catalog on the fly

Creative example: Not could use this PC, it is of private

  • project. No problem, boot by portable HD (Xubuntu)
slide-18
SLIDE 18

Catalog on the fly

Steps for footprint images (catalog layer)

  • Create footprint for each image
  • Smoothing for footprint
  • Add all fooprint for shapefile
slide-19
SLIDE 19

Catalog on the fly

Create footprint – footprint.sh [image]

  • gdal_calc.py:
  • A $in_img --A_band 1 --type Byte --calc "A>0" --outfile $zero_one_img

* 16 bits

  • gdal_sieve.py
  • q -st 100 -4 $zero_one_img -nomask $sieve_img
  • gdal_edit.py:
  • a_nodata 0 $sieve_img
  • gdal_polygonize.py:

$sieve_img -q -b 1 -f "GeoJSON" $footprint_geojson

  • Sed: add image and path names

ssed="s|{ \"DN\": 1 }|{ \"path\": \"$dir_img\", \"image\": \"$basename_img\" }|" sed -i "$ssed" "$footprint_geojson"

slide-20
SLIDE 20

Catalog on the fly

Smoothing for footprint footprint_convexhull.py [geojson]

  • Create convex hull of geometry
  • Add suffix: _convexhull

Add all fooprint for shapefile footprint_append_shp.sh [geojson] [shapefile]

  • Add feature from geojson in shapefile
  • ogr2ogr -update -append -t_srs EPSG:4674 $shapefile $footprint_geojson

Bash Example :

slide-21
SLIDE 21

Catalog on the fly

Catalogs layers

  • Created for all Rapideye images and put in database.
  • Landsat 8: Added directly in database
  • Fields:
  • Path: network address(directory of Geotif)
  • Image: name of image(RGB)
  • TMS: Address of XML in HTTP server (GDAL_WMS)
  • Quicklook: Address of PNG in HTTP server
  • Date: create from name of image
slide-22
SLIDE 22
  • Plugin: Catalog on the fly [1]
  • Search for catalog layer in current project
  • Fields: Date(not mandatory)

and address of each image *Address: local image or GDAL_WMS for Internet

  • Geometry: Footprint of image (polygon layer)
  • Get images where intersect with extent map
  • canvas. Use the features geometry of catalog layer

for query. Catalog on the fly

[1] https://plugins.qgis.org/plugins/catalogotf_plugin/

slide-23
SLIDE 23

Catalog on the fly

It is not mandatory. The field is date type or Text (yyyy-mm-dd) Local file or Internet by address for GDAL_WMS, prefix = http and suffix = .xml

slide-24
SLIDE 24
  • Check the layer, to search

images where intersect with map canvas.

  • Create a “group” for add new

images (name layer - Catalog)

Reverse order by date or name image

Catalog on the fly

slide-25
SLIDE 25
  • Buttons for seach features in map canvas:
  • Run for all.
  • Run for selected.
  • Cancel
  • Waiting cancel

Catalog on the fly

slide-26
SLIDE 26
  • Create contex menu for each image in catalog group:
  • Zoom to
  • Highlight

WMS_GDAL need have the TAG <TargetWindow>, this TAG is not standard. TargetWindow: Extent of image.

Catalog on the fly

slide-27
SLIDE 27

Catalog on the fly Using with “Auxiliary windows” Plugin

slide-28
SLIDE 28

Catalog on the fly Quickly catalog from local images

56 files Image Boundary Plugin (Extent)

slide-29
SLIDE 29

Catalog on the fly Quickly catalog from local images

Expressions for virtual fields:

  • Source of file
  • Date from name image
slide-30
SLIDE 30

Planet Labs Catalog Presentation:

http://pt.slideshare.net/LuizMotta3/planetlabs-explorer-qgisplugin

slide-31
SLIDE 31

Planet Labs Catalog

slide-32
SLIDE 32

Planet Labs Catalog

slide-33
SLIDE 33

Planet Labs Catalog

Date: 2015-08-29 Date: 2015-08-29

slide-34
SLIDE 34

Acknowledgements

I thank all the people who share their knowledge openly. Special thanks to the committees of OSGEO and FOSS4G 2015. Luiz.Motta@ibama.gov.br IBAMA