.shp and .xyz files mapped with geoshow

8 visualizaciones (últimos 30 días)
chrysa
chrysa el 26 de Abr. de 2012
Editada: Chad Greene el 26 de Abr. de 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?

Respuesta aceptada

Chad Greene
Chad Greene el 26 de Abr. de 2016
Editada: Chad Greene el 26 de Abr. de 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.

Más respuestas (1)

Rob Comer
Rob Comer el 10 de Mayo de 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."

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by