.shp and .xyz files mapped with geoshow

15 vues (au cours des 30 derniers jours)
chrysa
chrysa le 26 Avr 2012
Modifié(e) : Chad Greene le 26 Avr 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?

Réponse acceptée

Chad Greene
Chad Greene le 26 Avr 2016
Modifié(e) : Chad Greene le 26 Avr 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.

Plus de réponses (1)

Rob Comer
Rob Comer le 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."

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by