.shp and .xyz files mapped with geoshow

13 Ansichten (letzte 30 Tage)
chrysa
chrysa am 26 Apr. 2012
Bearbeitet: Chad Greene am 26 Apr. 2016
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?

Akzeptierte Antwort

Chad Greene
Chad Greene am 26 Apr. 2016
Bearbeitet: Chad Greene am 26 Apr. 2016
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.

Weitere Antworten (1)

Rob Comer
Rob Comer am 10 Mai 2012
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."

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by