matlab pix2map如何在局域网内使用webmap

认认真真做事,踏踏实实做人
Matlab中自带地图绘制WorldMap详解
Matlab中自带地图绘制WorldMap详解
转载地址:http://blog.csdn.net/archielau/article/details/7933265,其实这些代码是在matlab中的,输入help worldmap,会有7个例子,可以自己学习
Mapping Toolbox是Matlab提供的,一整套包含许多函数跟图形用户界面的工具箱;它可以帮助用户分析几何空间方面的数据;并以地图的形式显示出来!
worldmap命令
help worldmap
WORLDMAP 创建世界上给定区域的坐标 WORLDMAP 区域 或 WORLDMAP(区域名) 新建一个空的地图坐标,这个投影模型和限制与此区域相适应 . REGION 可能是一个字符串或则 cell array of strings. Permissible strings 包括大陆, 国家,岛屿,比如 'World', 'North Pole', 'South Pole', and 'Pacific'.
&& worldmap world
%绘制世界地图坐标或
&& worldmap ('world)
1、示例一:带有海岸线的世界地图
coast.m在目录D:\Program Files\MATLAB\R2010a\toolbox\map\mapdemos
worldmap('World')
load coast
plotm(lat, long)
coast中包含lat和long两个double型向量5*1
&& help plotm
PLOTM 投影二维直线和点到地图坐标
PLOTM(lat,lon)将线型对象投影到最近使用的地图坐标.
输入的维度(latitude)和经度(longitude)数据必须与最近使用地图坐标单位一致
。PLOTM will clear the current map if the hold state is off.
help load LOAD 从 MAT-file加载数据到工作空间.
S = LOAD(FILENAME) 加载来自a MAT-file 文件的变量到结构数组或来自ascii文件的数据到双精度数组.
2、示例二:带有海岸线的世界地图
landareas.shp shx、dbf在D:\Program Files\MATLAB\R2010a\toolbox\map\mapdemos目录下
&& % Worldmap with land areas, major lakes and rivers, and cities and
% populated places
ax = worldmap('World');
setm(ax, 'Origin', [0 180 0])
land = shaperead('landareas', 'UseGeoCoords', true);
geoshow(ax, land, 'FaceColor', [0.5 0.7 0.5])
lakes = shaperead('worldlakes', 'UseGeoCoords', true);
geoshow(lakes, 'FaceColor', 'blue')
rivers = shaperead('worldrivers', 'UseGeoCoords', true);
geoshow(rivers, 'Color', 'blue')
cities = shaperead('worldcities', 'UseGeoCoords', true);
geoshow(cities, 'Marker', '.', 'Color', 'red')
geoshow(ax, land, 'FaceColor', [0.5 0.7 0.5])
陆地的表面颜色
geoshow(cities, 'Marker', '.', 'Color', 'red')
城市用'.'标记
H = WORLDMAP(...)返回地图投影的句柄
&& help setm
SETM 设置地图坐标和图形对象的属性
&& help shaperead SHAPEREAD 从shapefile中读取向量特征和属性
&& help geoshow GEOSHOW 显示地图纬度和经度数据
&& help geoshow
GEOSHOW Display map latitude and longitude data
GEOSHOW(LAT, LON) or
GEOSHOW(LAT, LON, ..., 'DisplayType', DISPLAYTYPE, ...)
没有更多推荐了,
加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!如何在内网(局域网)中发布WebGIS系统如何在内网(局域网)中发布WebGIS系统水经注地图下载器百家号一、概述这里以中间件作为谷歌卫星地图发布引挚,许昌市1-14级谷歌卫星地图作为中间件的地图发布数据源,GoogleMap 离线 API 作为加载中间件发布的卫星影像数据平台,说明如何在内网(局域网)中构建一套离线的WebGIS地理信息系统。二、如何发布许昌市谷歌卫星影像以下只对如何发布许昌市谷歌卫星影像作简要说明,具体教程,请参阅:如何在 GoogleMap API 中调用中间件发布的卫星影像在万能地图下载器中,选择下载任务范围时,可以通过框选、多边形选择或按行政区划的方式下载影像数据,这里选择按“许昌市”的行政区划范围下载,点击“下载”可以显示“新建任务”对话框。在“新建任务”对话框中选择需要下载的级别,由于需要在缩放时每一级都需要显示下载影像,因此在下载数据时建议选择1-19级(如果范围在省以上,建议分成多个块下载),这里以第1到14级为例。许昌市谷歌卫星地图影像数据下载完成之后,需要在中间件中配置数据路径为下载任务目录,然后需要重启中间件之后,设置参数才能生效。通过以上操作,谷歌卫星影像地图发布完成,用户可以通过URL地址对中间件发布的瓦片进行访问,如:http://127.0.0.1:8080/getImage?z=13&y=3275&x=6685URL中的参数说明:127.0.0.1
服务器IP地址8080
端口号getImage
表示请求影像格式瓦片getLabel
表示请求地名路网瓦片getDem
表示请求数字高程瓦片Z
行号以上为中间件发布卫星影像的简要说明,详细教程请参阅:如何在 GoogleMap API 中调用中间件发布的卫星影像三、如何构建WebGIS地理信息系统站点在 GoogleMap API 源码中,打开map.js文件修改瓦片加载地址为中间件的地图发布地址,即:strURL = "http://127.0.0.1:8080/getImage?z=" + zoom + '&y=' + coord.y + '&x=' + coord.x;保存编辑结果后,可以在IIS中对GoogleMap API 源码(源码仅为中间件式版用户免费提供)进行站点配置。在电脑右键菜单中选择“管理”菜单,可打开“计算机管理”界面。在“计算机管理”界面中,选择“服务和应用程序\Internet Information Services (IIS) 管理器”,这里是以Win10系统为例,操作系统不同,会略有差异。如果没有该菜单项,可以在操作系统中开启IIS功能。相关教程,请参阅:如何在Win10中开启IIS功能在“网站”节点上单击右键,选择“添加网站”菜单,可以新建站点。在“添加网站”对话框中,可以设置网站名称、物理路径和端口等站点必备参数。设置参数说明: 网站名称
网站的站点名称
Google Map 离线 API 源码的存储目录端口
一般站点访问的默认端口为80,如果被占用,可以设置其它端口,如8081站点新建成功后,选择新建站点,可以打开浏览网站。默认打开的主机地址为本机地址,为了让局域网内的其它用户可以访问,可以将localhost更换为本机IP地址进行访问。本机IP地址的获取,可以通过输入DOS命令的方式获取。按键盘上的Win键+R键,可以打开“运行”对话框。在“运行”对话框中输入“cmd”,点击“确定”可以打开DOS命令执行窗口。在命令窗口中输入“ipconfig”命令之后,按回车键可以显示与本机IP相关的信息,其中包括本机的IP地址。将GoogleMap卫星影像地图加载的URL地址中的localhost替换为当前IP地址。最终的GoogleMap访问地址,类似于http://192.168.0.10:8081,该URL可以在任何一台内网(局域网)中的电脑进行访问,从而实现在在内网(局域网)中构建WebGIS系统。本文相关教程,请参阅:如何在 GoogleMap API 中调用中间件发布的卫星影像如何在Win10中开启IIS功能本文由百家号作者上传并发布,百家号仅提供信息发布平台。文章仅代表作者个人观点,不代表百度立场。未经作者许可,不得转载。水经注地图下载器百家号最近更新:简介:软件产品数据处理地理信息系统研发服务。作者最新文章相关文章Mouseover text to see original. Click the button below to return to the English version of the page.
Note: This page has been translated by MathWorks.
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.
Back to English
Select Language
Chinese Simplified
Chinese Traditional
Haitian Creole
Indonesian
Lithuanian
Portuguese
Vietnamese
MathWorks Machine Translation
The automated translation of this page is provided by a general purpose third party translator tool.
MathWorks does not warrant, and disclaims all liability for, the accuracy, suitability, or fitness for purpose of the translation.
Web Map Service
Retrieve map data from Web Map Service (WMS) servers
Web Map Service (WMS) provides visualization of publicly accessible
geospatial information from Web-based sources.Web Map Service (WMS)
servers follow a standard developed by the Open
Geospatial Consortium, Inc.® (OGC) and provide access to a wealth of geospatial
information. With maps from WMS servers, you can:
Use any publicly available WMS dataEasily adjust colors and styles to more clearly display
informationUpdate your map to reflect the most recent dataShare your map with others
Toolbox™ software simplifies the process of WMS map creation by
using a stored database of WMS servers. You can search the database for
layers and servers that are of interest to you. You can also host your
own WMS server and share the maps you create with others.
As an example, the WMS Global Mosaic map (on the left) displays data
from Landsat7 satellite scenes. The Ozone Effect on Global Warming map
(on the right) displays data from the NASA Goddard Institute for Space
Studies (GISS) computer model study.
Search local database for Web map servers and layersInformation about WMS server from capabilities documentRetrieve WMS map from serverSynchronize WMSLayer object with server
Web map server Web Map Service capabilities document Web Map Service layer Web Map Service map request
Basic WMS Workflow
Learn about common terms encountered when working with Web Map Service (WMS),
such as layers, capabilities documents, and WMS servers.
To create a WMS map, search the WMS database for useful servers and layers,
request the most recent data of an interesting layer, and display the
Additional WMS Interactions
This examples shows how to save your favorite layers for easy access in the
future. You can search for fields within the set of favorite layers.
Once you find a layer you like in the WMS Database, you can search the same
WMS server for similar layers.
This example shows how to search for layers outside the WMS Database by using
a search engine in your Web browser.
These examples show how to merge multiple layers, including mixed vector and
raster formats, into a single raster map.
These examples show how to create maps of the same geographic region at
different times and view them as a movie.
This example shows how to display a movie of radar images collected once per
hour over a backdrop from the Geostationary Satellite.
These examples show how to retrieve actual data instead of an image from a WMS
Learn how to render a map in a non-image format such as KML.
Learn about connection errors and other common WMS server errors, and
suggested workarounds.
Was this topic helpful?
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
(Fran?ais)
(Italiano)
Switzerland
Asia Pacific
Try MATLAB, Simulink, and Other Productsc++ map的使用方法 - jcsu - 博客园
/**************************************************************************&&Map的特点:&&1、存储Key-value对*&&&&&&&&&&&&&&2、支持快速查找,查找的复杂度基本是Log(N)*&&&&&&&&&&&&&&3、快速插入,快速删除,快速修改记*/************************************************************************/#include&&stdio.h&#pragma&warning(disable:4786)#include&&string&#include&&map&&&&//包含头文件using&namespace&//输出map中的记录#define&PRINTMAP(iterSuffix,&mapName)\{\&&&&PRJ_MAP_STRING2INT_WORDREC::iterator&iter##iterSuffix&=&mapName##.begin();\&&&&for&(;&iter##iterSuffix&!=&mapName##.end();&++iter##iterSuffix)\&&&&{\&&&&&&&&printf("\"%s\"&-&&total:&%d\n",&iter##iterSuffix-&first.c_str(),&iter##iterSuffix-&second);\&&&&}\&&&&printf("\n");\}/*************************************************************************&数据类型定义/************************************************************************/typedef&map&string,&int&&PRJ_MAP_STRING2INT_WORDREC;//定义map类型的别名/************************************************************************//*&全局函数/************************************************************************/void&main(){&&&&map&string,&int&&mapWordRecP&&&&&&&&&&&&/*&定义map类型的变量&*/&&&&PRJ_MAP_STRING2INT_WORDREC&mapWordRecV&&/*&用别名定义map类型的变量&*/&&&&//插入记录&&&&mapWordRecPrep["the"]&&=&<span style="color: #0;&/*&数组方式&*/&&&&mapWordRecPrep["so"]&&&=&<span style="color: #;&&&&mapWordRecVerb["find"]&=&<span style="color: #;&&&&mapWordRecVerb["seen"]&=&<span style="color: #;&&&&mapWordRecVerb["jump"]&=&<span style="color: #;&&&&mapWordRecVerb["swim"]&=&<span style="color: #;&&&&mapWordRecVerb.insert(map&string,&int&::value_type("look",&<span style="color: #));&/*&value_type方式&*/&&&&mapWordRecVerb.insert(pair&string,&int&("walk",&<span style="color: #));&/*&pair方式&*/&&&&/*&value_type和pair方式不出现覆盖现象&*/&&&&printf("Insert&method:&value_type\n");&&&&pair&map&string,&int&::iterator,&bool&&&&&&inserted&=&mapWordRecVerb.insert(map&string,&int&::value_type("walk",&<span style="color: #));&&&&printf("%s\n",&true&==&inserted.second&?&"Insert&success!"&:&"Insert&failed!");&&&&PRINTMAP(Ver,&mapWordRecVerb);&&&&/*&数组方式出现覆盖现象*/&&&&printf("Insert&method:&array\n");&&&&mapWordRecVerb["walk"]&=&<span style="color: #;&&&&PRINTMAP(Ver,&mapWordRecVerb);&&&&//查找记录&&&&map&string,&int&::iterator&iter&=&mapWordRecPrep.find("so");&&&&printf("%s\n",&iter&==&mapWordRecPrep.end()&?&"Not&find!"&:&"Find!");&&&&//删除记录&&&&map&string,&int&::iterator&iterV&=&mapWordRecVerb.find("seen");&&&&if&(iterV&!=&mapWordRecVerb.end())&&&&{&&&&&&&&mapWordRecVerb.erase(iterV);&&&&&&&&&&&&&&/*&迭代器方式删除&*/&&&&&&&&printf("\nDelete&word&\"seen\"&done!\n");&&&&&&&&PRINTMAP(Verb,&mapWordRecVerb);&&&&}&&&&int&n&=&mapWordRecVerb.erase("swim");&&&&&&&&&/*&&关键字方式删除&*/&&&&printf("\nDelete&word&\"swim\"&done!\n");&&&&PRINTMAP(Verb,&mapWordRecVerb);&&&&mapWordRecVerb.erase(mapWordRecVerb.begin(),&mapWordRecVerb.end());&/*&成片删除&*/&&&&printf("\nDelete&all&word&done!\n");&&&&PRINTMAP(Verb,&mapWordRecVerb);&&&&//map的其它函数&&&&if&(mapWordRecVerb.empty()&&&&<span style="color: #&==&mapWordRecVerb.size())&&&/*&判断map是否为空&*/&&&&{&&&&&&&&printf("mapWordRecVerb&is&empty!\n\n");&&&&}&&&&PRINTMAP(Pre,&mapWordRecPrep)&&&&mapWordRecPrep.clear();&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&/*&清空map&*/&&&&PRINTMAP(Pre,&mapWordRecPrep)&&&&if&(mapWordRecPrep.empty()&&&&<span style="color: #&==&mapWordRecPrep.size())&&&&{&&&&&&&&printf("mapWordRecPrep&is&empty!\n\n");&&&&}}
输出结果:
Insert method: value_typeInsert failed!"find" -& total: 1"jump" -& total: 3"look" -& total: 5"seen" -& total: 2"swim" -& total: 4"walk" -& total: 6
Insert method: array"find" -& total: 1"jump" -& total: 3"look" -& total: 5"seen" -& total: 2"swim" -& total: 4"walk" -& total: 7
Delete word "seen" done!"find" -& total: 1"jump" -& total: 3"look" -& total: 5"swim" -& total: 4"walk" -& total: 7
Delete word "swim" done!"find" -& total: 1"jump" -& total: 3"look" -& total: 5"walk" -& total: 7
Delete all word done!
mapWordRecVerb is empty!
"so" -& total: 50"the" -& total: 100
mapWordRecPrep is empty!

我要回帖

更多关于 matlab分布式局域网 的文章

 

随机推荐