socketref,再见!高德

https://github.com/adoggie

  C++博客 :: 首页 :: 联系 :: 聚合  :: 管理
  246 Posts :: 4 Stories :: 312 Comments :: 0 Trackbacks

常用链接

留言簿(54)

我参与的团队

搜索

  •  

最新评论

阅读排行榜

评论排行榜

#

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就可以查看喽


posted @ 2008-07-02 02:12 放屁阿狗 阅读(2585) | 评论 (0)编辑 收藏

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的效果
posted @ 2008-07-01 23:31 放屁阿狗 阅读(679) | 评论 (0)编辑 收藏

如题,今天google是愁到这个问题
flash确实现在无处不在,所以不存在是否要求client browser安装已否,已经成了标配。
目前没有仔细研读过openlayers的实现代码,所以两者的结合会有哪些问题目前尚不能给出区分,不过openlayers图层的编辑Marker,确实是个头疼的问题,javascript再强,实现的难度还是人尽共知的,所以flash确实个是补充的好方法
花时间研究吧

posted @ 2008-07-01 23:23 放屁阿狗 阅读(667) | 评论 (0)编辑 收藏

reference: http://netpbm.sourceforge.net/doc/ppm.html

Each PPM image consists of the following:

  1. A "magic number" for identifying the file type. A ppm image's magic number is the two characters "P6".
  2. Whitespace (blanks, TABs, CRs, LFs).
  3. A width, formatted as ASCII characters in decimal.
  4. Whitespace.
  5. A height, again in ASCII decimal.
  6. Whitespace.
  7. The maximum color value (Maxval), again in ASCII decimal. Must be less than 65536 and more than zero.
  8. A single whitespace character (usually a newline).
  9. 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.

  10. 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.

  11. 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.
  12. Strings starting with "#" may be comments, the same as with PBM.


posted @ 2008-06-24 21:11 放屁阿狗 阅读(665) | 评论 (0)编辑 收藏

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;
}
posted @ 2008-06-23 00:58 放屁阿狗 阅读(3337) | 评论 (1)编辑 收藏

创建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"
posted @ 2008-06-20 13:39 放屁阿狗 阅读(189) | 评论 (0)编辑 收藏

为了找些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);
   }


posted @ 2008-06-11 23:00 放屁阿狗 阅读(212) | 评论 (1)编辑 收藏

 macromedia flash player 6/7 (flash.dll) for ppc 如何移植到 wince5.0平台?????
能通过ie显示swf内容,并可以用com方式操作flash.dll
msn: socketref@hotmail.com

posted @ 2008-06-09 20:51 放屁阿狗 阅读(1524) | 评论 (0)编辑 收藏

学习opengl es的目的是为了实现 cegui 项目中的 opengl render
...

posted @ 2008-05-17 00:13 放屁阿狗 阅读(969) | 评论 (0)编辑 收藏


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!



posted @ 2008-05-13 03:13 放屁阿狗 阅读(618) | 评论 (0)编辑 收藏

仅列出标题
共25页: First 16 17 18 19 20 21 22 23 24 Last