.shp and .xyz files mapped with geoshow

조회 수: 8 (최근 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