#
MapServer安裝之后并不具有WMS服務功能 所有的配置圍繞著Mapfile進行 【http://mapserver.gis.umn.edu/docs/howto/wms_server】 1.判別當前MapServer是否支持WMS #>mapserv.exe -v
MapServer version 4.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG 看到以上內容就ok了 2.修改mapfile 對于mapserver 5.0 的樣例數據 workshop-50.zip 添加:
PROJECTION
"init=epsg:4269"
END
"wms_onlineresource" "http://192.168.14.65:8080/cgi-bin/mymap.exe?" httpd.conf 添加 SetEnvIf Request_URI "/cgi-bin/mymap.exe" MS_MAPFILE=c:/gis/ms4w/Apache/htdocs/workshop-50/itasca.map 路徑不能加""哦 復制mapserve.exe 為mymap.exe 3.重新啟動 httpd.exe 4.測試: jump或者qgis測試,添加wms層 ,browser添加 http://192.168.14.65:8080/cgi-bin/mymap.exe? 選擇一些layer就可以查看嘍
Mapserver的安裝介質可從 http://mapserver.gis.umn.edu下載 安裝也非常簡單,選擇何時的服務http端口就可以了,這里我選擇了8080 下載ms4w 5.0的App數據 workshop-5.0.zip 將其簡單解壓縮到 $apache/htdocs下即可;創建$(apache)/tmp目錄 修改worksop-5.0/index.html文件,將其中 IMAGEPATH,IMAGEURL 修改為workship-5.0的路徑即可
// EDIT THE NEXT 2 LINES TO MATCH YOUR SETUP var snippet = "IMAGEPATH 'C:/gis/ms4w/Apache/htdocs/tmp/'"; snippet += " IMAGEURL '/tmp/'"; <!-- EDIT THESE HIDDEN VARIABLES --> <input type="hidden" name="map" value="C:\gis\ms4w\Apache\htdocs\workshop-5.0\itasca.map"> <input type="hidden" name="program" value="/cgi-bin/mapserv.exe"> <input type="hidden" name="root" value="/workshop-5.0">
來測試一下 http://127.0.0.1/workshop-5.0,即可看到itasca.map了
好好研究一把mapserver,配置好wms/wfs server 看看用openlayers/Qgis的效果
如題,今天google是愁到這個問題 flash確實現在無處不在,所以不存在是否要求client browser安裝已否,已經成了標配。 目前沒有仔細研讀過openlayers的實現代碼,所以兩者的結合會有哪些問題目前尚不能給出區分,不過openlayers圖層的編輯Marker,確實是個頭疼的問題,javascript再強,實現的難度還是人盡共知的,所以flash確實個是補充的好方法 花時間研究吧
reference: http://netpbm.sourceforge.net/doc/ppm.html
Each PPM image consists of the following:
- A "magic number" for identifying the file type.
A ppm image's magic number is the two characters "P6".
-
Whitespace (blanks, TABs, CRs, LFs).
-
A width, formatted as ASCII characters in decimal.
-
Whitespace.
-
A height, again in ASCII decimal.
-
Whitespace.
-
The maximum color value (Maxval), again in ASCII decimal. Must be less
than 65536 and more than zero.
- A single whitespace character (usually a newline).
- A raster of Height rows, in order from top to bottom. Each row
consists of Width pixels, in order from left to right. Each pixel is
a triplet of red, green, and blue samples, in that order. Each sample
is represented in pure binary by either 1 or 2 bytes. If the Maxval
is less than 256, it is 1 byte. Otherwise, it is 2 bytes. The most
significant byte is first.
A row of an image is horizontal. A column is vertical. The pixels
in the image are square and contiguous.
- In the raster, the sample values are "nonlinear." They are
proportional to the intensity of the ITU-R Recommendation BT.709 red,
green, and blue in the pixel, adjusted by the BT.709 gamma transfer
function. (That transfer function specifies a gamma number of 2.2 and
has a linear section for small intensities). A value of Maxval for
all three samples represents CIE D65 white and the most intense color
in the color universe of which the image is part (the color universe
is all the colors in all images to which this image might be
compared).
ITU-R Recommendation BT.709 is a renaming of the former CCIR
Recommendation 709. When CCIR was absorbed into its parent
organization, the ITU, ca. 2000, the standard was renamed. This
document once referred to the standard as CIE Rec. 709, but it isn't
clear now that CIE ever sponsored such a standard.
Note that another popular color space is the newer sRGB. A common
variation on PPM is to subsitute this color space for the one specified.
-
Note that a common variation on the PPM format is to have the sample
values be "linear," i.e. as specified above except without
the gamma adjustment. pnmgamma takes such a PPM variant as
input and produces a true PPM as output.
- Strings starting with "#" may be comments, the same as
with PBM.
string Char2Hex(char a) { string str = ""; int n = a; for (int i=2*sizeof(char) - 1; i>=0; i--) { str += "0123456789ABCDEF"[((n >> i*4) & 0xF)]; } return str; }
創建svn 根目錄 mkdir d:\snv-root 創建一個倉庫 mkdir c:\svn-root\carkit 啟動snv服務 svnserve -d -r c:\snv-root\carkit 同時啟動多個倉庫用監聽服務端口號來區別 svnserve -d -r c:\snv-root\navi --listen-port 3691
修改認證密碼 修改 carkit/conf/svnserve.conf 的 password-db = passwd 修改passwd文件,添加用戶名稱和帳號
客戶端導入目錄 svn import project1 svn://192.168.14.65 -m "test message"
為了找些crack的工具,沒辦法下載了很多crackxxx的東西,后悔沒有在虛擬機里面試驗一下,直接在我的開發機上運行,導致木馬,病毒滿天飛。 只能手工清除了,到最后nnd碰到最后一個問題,每次點擊文件夾,都會彈出所謂"發現間諜軟件,請下載antispyware",并請求連接網絡。 煩都煩死了,也沒找到他在registy的位置,干不掉,看著也煩,只能寫個程序,定時檢測是否其窗體開啟,并關閉它
while(1){ HWND hwnd = FindWindow(NULL,"System Error!"); //::EnableWindow(hwnd,1); ::SendMessage(hwnd,WM_SYSCOMMAND,SC_CLOSE,0); Sleep(200); }
macromedia flash player 6/7 (flash.dll) for ppc 如何移植到 wince5.0平臺????? 能通過ie顯示swf內容,并可以用com方式操作flash.dll msn: socketref@hotmail.com
學習opengl es的目的是為了實現 cegui 項目中的 opengl render ...
table 是個怪物,有很多facets,類似array,map,struct,整個是個混合物,用起來也比較怪異。 t={1,2,3,a="gen",b=100} t={[0]=1;["name"]="ultra"} t.a, t.b , t[0] , t["name"]
表操作函數: ipairs,pairs迭代函數 table.getn(t) len of table
================================================================ function() 可以接受任意多的參數,如果實參數過多將丟棄,過少將默認設置為nil 同樣可以返回多個參數 a,b=foo()
表作為參數傳遞到function function rename( arg ) os.rename(arg.old,arg.new) end rename{old="";new=""}
匿名函數(lambda in python ) foo = function(x) return x*2 end 局部函數 local f=function(x) ... end ================================================================ for n=start,end,step do ... end while b do ... end repeat do .... until
if then .. elseif then ... end;
有意思的語法表達式: print a or b or c 如果a=false,嘗試b...
注釋: -- --{ --}
字符串操作: .. 連接
================================================== io 函數: loadfile('test.lua')() execute external lua script loadstring('print 100')()
代碼測試: ======================= c程序調用lua函數 c 程序: void call_lua_func(){ lua_State *s = lua_open(); luaL_openlibs(s); int c = lua_gettop(s); luaL_dofile(s,"/nandflashpartition/test1.lua"); lua_getglobal(s,"add"); lua_pushnumber(s,0.25); lua_pushnumber(s,8); if( lua_pcall(s,2,1,0)){ std::cout<< lua_tostring(s,-1)<<std::endl; } double r; r = lua_tonumber(s,-1); lua_close(s); } lua程序: function add(x,y) return x*y end -------------------------------- lua訪問c程序空間變量
1.定義變量student.h extern char * gender; extern int class_count;
2.創建pkg文件 student.pkg $#include "student.h" extern char * gender; extern int class_count;
3.產生tolua++存根框架 tolua++ -o student.pkg
4.創建lua測試代碼 call_c.lua print(gender) print(class_count) 訪問c 空間的變量
5.c測試代碼 char * gender; int class_count; void lua_call_c(){ int tolua_student_open (lua_State* tolua_S); lua_State * s = lua_open(); luaopen_base(s);
gender ="my gender is male!"; class_count = 100; tolua_student_open(s); luaL_dofile(s,"/nandflashpartition/call_c.lua"); lua_close(s); }
6.build && test it!
|