-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af15e08
commit 119bb74
Showing
106 changed files
with
15,954 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
function [line] = read_nhd_shapefile(field,target_field,dir) | ||
function [line] = read_nhd_shapefile(value,target_field,dir) | ||
|
||
lines = shaperead(dir); | ||
|
||
for j=1:numel(lines) | ||
if field == getfield(lines(j),target_field) | ||
line = lines(j); | ||
return | ||
end | ||
end | ||
lines = m_shaperead(dir); | ||
string(lines.(target_field)); | ||
idx = find(strcmp(string(value), string(lines.(target_field)))); | ||
line.X = lines.ncst{idx}(:,1); | ||
line.Y = lines.ncst{idx}(:,2); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
% M_Map - mapping toolbox (Author: [email protected]) | ||
% Version 1.4i Nov 2017 | ||
% | ||
% You have collected your data, loaded it into Matlab, analyzed | ||
% everything to death, and now you want to make a simple map showing | ||
% how it relates to the world. | ||
% | ||
% But you can't. | ||
% | ||
% Instead you have to figure out how to save all your data, and | ||
% then read it into a mapping program, and then spend all that extra | ||
% time figuring out why the mapping program doesn't give you what | ||
% you expected it would... | ||
% | ||
% No more! | ||
% | ||
% Announcing M_Map v1.4! | ||
% | ||
% M_Map is a set of mapping tools written for Matlab v5. These include: | ||
% | ||
% 1. Routines to project data in 18 different spherical | ||
% projections (and determine inverse mappings) | ||
% 2. A grid generation routine to make nice axes with | ||
% limits either in long/lat terms or in planar | ||
% X/Y terms. | ||
% 3. A coastline database (with 1/4 degree resolution) | ||
% 4. A global elevation database (1 degree resolution) | ||
% 5. Hooks into freely available high-resolution coastlines and | ||
% bathymetry/topography. | ||
% | ||
% M_Map v1.4 is available via the web at | ||
% | ||
% http://www.eos.ubc.ca/~rich/ | ||
% | ||
% | ||
% Toolbox contents | ||
% | ||
% Contents.m - This file | ||
% m_demo.m - demonstrates a few different maps. | ||
% | ||
% User-callable functions | ||
% | ||
% m_proj.m - initializes projections | ||
% m_coord.m - converts between geomagnetic and geographic coords. | ||
% | ||
% m_grid.m - draws grids | ||
% m_scale - forces map to a given scale. | ||
% m_ruler - draw a scale ruler | ||
% | ||
% m_ungrid.m - erases map elements (if you want to change parameters) | ||
% | ||
% m_coast.m - draws a coastline | ||
% m_elev.m - draws elevation data from 1 degree database | ||
% | ||
% m_tbase.m - draws elevation data from 5-minute TerrainBase database | ||
% m_gshhs.m - draws coastline from GSHHS with specified resolution | ||
% m_gshhs_c.m - draws coastline from GSHHS crude database | ||
% m_gshhs_l.m - draws coastline from GSHHS low-resolution database | ||
% m_gshhs_i.m - draws coastline from GSHHS intermediate-resolution database | ||
% m_gshhs_h.m - draws coastline from GSHHS high-resolution database | ||
% m_gshhs_f.m - draws coastline from GSHHS full database | ||
% m_plotbndry.m - draws a political boundary from the DCW | ||
% m_usercoast.m - draws a coastline using a user-specified subset database. | ||
% | ||
% m_plot.m - draws line data in map coords | ||
% m_line.m - draws line data in map coords | ||
% m_text.m - adds text data in map coords | ||
% m_legend.m - draws a legend box | ||
% m_quiver.m - draws arrows for vector data | ||
% m_contour.m - draws contour lines for gridded data | ||
% m_contourf.m - draws filled contours | ||
% m_patch.m - draws patch data | ||
% m_pcolor.m - draws pcolor data | ||
% m_streamline.m- draws streamlines | ||
% m_scatter.m - draws scatter plot | ||
% m_annotation.m- annotation lines/boxes/text | ||
% | ||
% m_track.m - draws annotated tracklines | ||
% m_hatch.m - hatched or speckled patches. | ||
% m_range_ring.m- draws range rings (spherical coords) | ||
% m_ellipse.m - draws tidal ellipses (most requested ocean feature!) | ||
% | ||
% m_ll2xy.m - converts from long/lat to map coordinates | ||
% m_xy2ll.m - converts from map coordinates to long/lat | ||
% | ||
% m_geo2mag.m - converts from long/lat to geomagnetic coordinates | ||
% m_mag2geo.m - converts from geomagnetic coordinates to long/lat | ||
% | ||
% m_lldist - spherical distance/geodesics between points (long/lat coordinates) | ||
% m_xydist - spherical distance between points (map projection coordinates) | ||
% | ||
% m_fdist - ellipsoidal geodesic forward calculation | ||
% m_idist - ellipsoidal geodesic inverse calculation | ||
% m_geodesic - points along ellipsoidal geodesics | ||
% | ||
% m_tba2b.m - used in installing high-resolution elevation database. | ||
% | ||
% m_vec.m - fancy arrows | ||
% m_windbarb.m - barbed wind arrows | ||
% | ||
% m_contfbar.m - draws colorbars for contourf plots | ||
% m_colmap.m - useful perceptually uniform colourmaps. | ||
% m_shaperead.m - reads ESRI shapefiles | ||
% mygrid_sand2.m- reads Sandwell and Smith bathymetry file | ||
% | ||
% wysiwyg.m - Sets figure window to match size/aspect of printed output | ||
% | ||
% Internal functions (not meant to be user-callable) | ||
% | ||
% private/mp_azim.m - azimuthal projections | ||
% private/mp_cyl.m - cylindrical projections (equatorial) | ||
% private/mp_conic.m - conic projections | ||
% private/mp_tmerc.m - transverse cylindrical projections | ||
% private/mp_utm.m - elliptical universal transverse cylindrical projections | ||
% private/mp_omerc.m - oblique cylindrical projection | ||
% | ||
% private/mu_util.m - various utility routines | ||
% private/mu_coast.m - routines to handle coastlines. | ||
% | ||
% private/mc_coords.m - coordinate systems based on different poles. | ||
% private/mc_ellips.m - parameters of different ellipsoidal earth models | ||
% | ||
% private/m_coasts.mat- low-res coastline data | ||
% | ||
% HTML documentation | ||
% | ||
% map.html - Home page, examples | ||
% private/mapug.html - User's guide | ||
% private/*gif - examples. | ||
% | ||
% | ||
% Questions or problems; email me - [email protected]. | ||
% | ||
% Rich Pawlowicz | ||
% Dept. of Earth, Ocean, Atmospheric Sciences, Univ. of British Columbia, | ||
% 6339 Stores Rd., Vancouver, B.C. CANADA V6T 1Z4 | ||
% email: [email protected] | ||
% | ||
% | ||
|
||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
/* CSS file for m_map documentation | ||
- R. Pawlowicz 30/Nov/2017 */ | ||
|
||
/* First, some formatting for the regular text */ | ||
|
||
body { | ||
margin: 0px; | ||
background-color: white; | ||
} | ||
|
||
p { | ||
font-family: Verdana, Arial, Helvetica, sans-serif; | ||
font-size: small; | ||
color: black;; | ||
} | ||
h1 { | ||
color: #990000; | ||
font-family: Arial Black, Helvetica, sans-serif; | ||
font-size: 300%; | ||
font-weight: bolder; | ||
} | ||
h2 { | ||
font-size: 180%; | ||
color: #990000; | ||
font-family: Arial Black, Helvetica, sans-serif; | ||
} | ||
h3 { | ||
font-size: large; | ||
color: #990000; | ||
font-family: Arial Black, Helvetica, sans-serif; | ||
} | ||
h4 { | ||
font-size: medium; | ||
color: #990000; | ||
font-family: Arial Black, Helvetica, sans-serif; | ||
font-weight: bold; | ||
} | ||
li { | ||
font-family: Verdana, Arial, Helvetica, sans-serif; | ||
font-size: small; | ||
line-height: 18px; | ||
} | ||
pre { | ||
font-family: "lucida console","courier new", courier, monospace; | ||
font-size: small; | ||
font-weight: normal; | ||
color: darkviolet; | ||
} | ||
code { | ||
font-family: "lucida console","courier new", courier, monospace; | ||
font-size: small; | ||
font-weight: normal;; | ||
color: darkviolet; | ||
} | ||
|
||
hr { | ||
width: 90%; | ||
align: center; | ||
} | ||
|
||
img { | ||
display: block; | ||
margin: auto; | ||
} | ||
|
||
|
||
/* This formats the page with | ||
header | ||
left_col right_col | ||
footer | ||
*/ | ||
|
||
.header { | ||
background-color: tan; /*#F1F1F1;*/ | ||
text-align: center; | ||
padding: 10px; | ||
} | ||
.row { | ||
display: block; | ||
margin: auto; | ||
max-width: 910px; /* Need this to enable centering */ | ||
|
||
} | ||
/* Create unequal columns that float next to each other */ | ||
.column { | ||
/* float: left; */ | ||
} | ||
|
||
/* Left column */ | ||
.column.left { | ||
max-width: 150px; | ||
padding-left: : 0px; | ||
padding-right: 0px; | ||
padding-top: 0px; | ||
background-color: tan; | ||
height: 100%; | ||
float: left; | ||
position: fixed; | ||
border: 2px solid grey; | ||
} | ||
|
||
/* Right column */ | ||
.column.right { | ||
max-width: 747px; | ||
margin-left: 155px; | ||
padding-left: 8px; /* Padding moves it past right column */ | ||
padding-right: 8px; | ||
float: none; /* This lets the page size shrink (left will leave the size fixed)*/ | ||
overflow: hidden; | ||
background-color: #FFFFFB; | ||
border: 2px solid grey; | ||
} | ||
|
||
/* Clear floats after the columns */ | ||
.row:after { | ||
content: ""; | ||
display: table; | ||
clear: both; | ||
} | ||
|
||
/* Responsive layout - makes the columns stack on top of each other instead of next to each other */ | ||
@media (max-width: 500px) { | ||
.column { | ||
width: 100%; | ||
} | ||
} | ||
|
||
.footer { | ||
background-color: tan;; | ||
text-align: center; | ||
padding: 10px; | ||
} | ||
|
||
|
||
/* These handle the vertical navigation bar in the left column | ||
for class=menu I don't want list markers */ | ||
ul.menu { | ||
list-style-type: none; | ||
margin-left: 0px; | ||
margin-right: 0px; | ||
padding: 6px; | ||
} | ||
ul.menu li{ | ||
text-align: center; | ||
border-left: 1px solid black; | ||
border-right: 1px solid black; | ||
border-top: 1px solid black; | ||
margin-right: -1px; | ||
overflow: hidden; | ||
|
||
} | ||
ul.menu li:last-child{ | ||
text-align: center; | ||
border-bottom: 1px solid black; | ||
} | ||
/* The links are then a solid colour...*/ | ||
ul.menu a { | ||
display: block; | ||
background-color: moccasin; | ||
text-decoration: none; | ||
padding: 0px 6px 0px 6px; | ||
|
||
} | ||
/* ...which changes when we hover over them */ | ||
ul.menu a:hover{ | ||
background-color: maroon;; | ||
color: white; | ||
text-decoration: none; | ||
} | ||
|
||
ol.menu a:hover{ | ||
background-color: maroon;; | ||
color: white; | ||
text-decoration: none; | ||
} | ||
|
||
img.menu{ | ||
display: block; | ||
margin: auto; | ||
margin-top: 5px; | ||
width: 90%; | ||
} | ||
p.menu{ | ||
text-align: center;; | ||
padding: 6px; | ||
margin-left: 0px; | ||
font-size: x-small; | ||
} | ||
|
||
|
||
/* Now the image gallery - this is for the hot-linked images to fade | ||
during mouse-over*/ | ||
|
||
/* Clickable figure opacity (make it class "click" requred)*/ | ||
img.click:hover { | ||
opacity: 0.5; | ||
filter: alpha(opacity=50); /* For IE8 and earlier */ | ||
} | ||
|
||
/* This is for the image in the left sidebar */ | ||
|
||
img.menu:hover { | ||
opacity: 0.5; | ||
filter: alpha(opacity=50); /* For IE8 and earlier */ | ||
} | ||
|
||
|
||
|
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.