how matlab helps

17
HOW MATLAB HELPS Zhang Xiaohu

Upload: siufu

Post on 23-Jun-2015

496 views

Category:

Technology


2 download

DESCRIPTION

Matlab and Geosptial data

TRANSCRIPT

Page 1: How Matlab Helps

HOW MATLAB HELPS Zhang Xiaohu

Page 2: How Matlab Helps

WHY MATLAB

Fast prototyping Toolbox IDE

Warning: Fortran, LAPACK Efficiency -- Vectorization

Alternative Option Octave http://www.gnu.org/software/octave/ M_Map

Page 3: How Matlab Helps

DATA FORMATS SUPPORTED

Vector Data ESRI Shapfile KML …

Raster Data GeoTIFF Arc ASCII Grid …

Relevant Data Image file formats NetCDF, HDF*, and Multband files (BIP,BIL,BSQ) …

WMS

Page 4: How Matlab Helps

OUTLINE

Matlab and Geospatial Data Vector Data Manipulation Raster Data Manipulation

Distribution Figures 1-D Distribution 2-D Distribution

Page 5: How Matlab Helps

VECTOR DATA MANIPULATION

Read Structures Display

Write Point, Polyline, Polygon

Page 6: How Matlab Helps

READ VECTOR DATA

S = shaperead(filename, Name,Value, ...)

Field Name Data Type Description Comments

Geometry StringOne of the following shape types: 'Point', 'MultiPoint', 'Line', or 'Polygon'.

For a 'PolyLine', the value of the Geometry field is simply 'Line'.

BoundingBox 2-by-2 numerical array

Specifies the minimum and maximum feature coordinate values in each dimension in the following form:

Omitted for shape type 'Point'.

X, Y, Lon, or Lat 1-by-N array of classdouble Coordinate vector.  

Attribute String or scalar number Attribute name, type, and value.Optional. There are usually multiple attributes.

Page 7: How Matlab Helps

READ VECTOR DATA

Example

Point Polyline Polygon Geometry 'Polygon' BoundingBox [2x2 double]

Lon [1x5785 double]

Lat [1x5785 double]

AREA 54.447 PERIMETER 68.489 BOU2_4M_ 2 BOU2_4M_ID 23 ADCODE93 230000 ADCODE99 230000 NAME '黑龙江省 '

Geometry 'Point' Lon 116.3809 Lat 39.9236 AREA 0 PERIMETER 0 RES1_4M_ 1 RES1_4M_ID 61 GBCODE 31010 NAME '北京 ' ADCODE93 110100 ADCODE99 110100 ADCLASS 1 PINYIN 'Beijing'

Geometry 'Line' BoundingBox [2x2 double]

Lon [1x11 double]

Lat [1x11 double]

FNODE_ 18 TNODE_ 18 LPOLY_ 6 RPOLY_ 4 LENGTH 0.075 HYD1_4M_ 1 HYD1_4M_ID 1359 GBCODE 23010 NAME '克鲁伦河 ' LEVEL_RIVE 3 EVEL_LAKE 1

Page 8: How Matlab Helps

DISPLAY VECTOR DATA

worldmap [construct map axes] mapshow [without projection] geoshow [with projection] scaleruler northarrow

Page 9: How Matlab Helps

WRITE VECTOR DATA

Write Point data

Page 10: How Matlab Helps

WRITE VECTOR DATA

Write Line data

Page 11: How Matlab Helps

WRITE VECTOR DATA

Write Polygon data

Page 12: How Matlab Helps

READ RASTER DATA

[A, R] = geotiffread(filename) [Z,R] = arcgridread(filename)

Page 13: How Matlab Helps

WRITE RASTER DATA

geotiffwrite(filename,A,R)

Image Processing Toolbox Computer Vision System Toolbox

Page 14: How Matlab Helps

OUTLINE

Matlab and Geospatial Data Vector Data Manipulation Raster Data Manipulation

Distribution Figures 1-D Distribution 2-D Distribution

Page 15: How Matlab Helps

1-D DISTRIBUTION

hist(data)

rose(data)

ksdensity(data)

Page 16: How Matlab Helps

2-D DISTRIBUTION

scatter(x,y)meshgridcontour(data)

hist3(data)contour(data)

Page 17: How Matlab Helps

THANKS