.shp and .xyz files mapped with geoshow

13 ビュー (過去 30 日間)
chrysa
chrysa 2012 年 4 月 26 日
編集済み: Chad Greene 2016 年 4 月 26 日
I have the bathymetry of a lake and its surrounding area as a .shp and .xyz files and I am trying to plot a 2-d bathymetric map with contour lines at specific depths. When I use the .shp with geoshow I cannot define the contour lines as it plots the data as line:
g1=geoshow('lake_contour.shp','DisplayType', 'contour');
Warning: Function GEOSHOW expected DisplayType 'contour'
to match Geometry 'Line'.
GEOSHOW is ignoring the DisplayType value.
I also tried using griddata to interpolate the xyz data, and then used geoshow, which worked fine BUT griddata produced artefacts on the land area as I have only the depth of the lake and the surrounding rivers and not the land elevation.
How can I get around this?

採用された回答

Chad Greene
Chad Greene 2016 年 4 月 26 日
編集済み: Chad Greene 2016 年 4 月 26 日
If your .xyz file was created with GMT there's a good chance you can use xyz2grid to get the bathymetry into a 2D grid, then you can display the bathymetry with contouring or pcolor functions.

その他の回答 (1 件)

Rob Comer
Rob Comer 2012 年 5 月 10 日
DisplayType 'contour' is for use with data grids only, but it seems that you have a line shapefile. You can plot the lines from the shapefile, just as you would plot any other lines with geoshow. There's not much else to do, with data in this form. I'm not sure what you mean by "define the contour lines."

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by