zhyiwww
用平实的笔,记录编程路上的点点滴滴………
posts - 536,comments - 394,trackbacks - 0
#shp2pgsql Rbeijing Rbeijing >  rbeijing.sql
导出文件如下:
     1 BEGIN;
     2 CREATE TABLE "rbeijing" (gid serial PRIMARY KEY,
     3 "mapid" varchar(8),
     4 "id" varchar(13),
     5 "kind_num" varchar(2),
     6 "kind" varchar(23),
     7 "width" varchar(3),
     8 "direction" varchar(150),
     9 "const_st" varchar(1),
    10 "pathname" varchar(40),
    11 "pathpy" varchar(250),
    12 "snodeid" varchar(13),
    13 "enodeid" varchar(13),
    14 "pathclass" varchar(2),
    15 "pathno" varchar(13));
    16 SELECT AddGeometryColumn('','rbeijing','the_geom','-1','MULTILINESTRING',2);

7 INSERT INTO "rbeijing" ("mapid","id","kind_num","kind","width","direction","const_st","pathname","pathpy","snodeid","enodeid","pathclass","pathno",th       e_geom) VALUES ('595525','59552500001','1','0401','55','0','1',NULL,NULL,'59552500003','59552500136','2','0','010500000001000000010200000007000000BD5       296218EED5C40D844662E70C7434069C4CC3E8FED5C40103FFF3D78C743405DFC6D4F90ED5C40897956D28AC743405DFC6D4F90ED5C405D6DC5FEB2C74340A374E95F92ED5C40A587A1D5       C9C743400806103E94ED5C40AB9509BFD4C74340DCD6169E97ED5C405CAD1397E3C74340');



#shp2pgsql -s 4326 Rbeijing Rbeijing >  rbeijing.sql
导出文件如下:
     1 BEGIN;
     2 CREATE TABLE "rbeijing" (gid serial PRIMARY KEY,
     3 "mapid" varchar(8),
     4 "id" varchar(13),
     5 "kind_num" varchar(2),
     6 "kind" varchar(23),
     7 "width" varchar(3),
     8 "direction" varchar(150),
     9 "const_st" varchar(1),
    10 "pathname" varchar(40),
    11 "pathpy" varchar(250),
    12 "snodeid" varchar(13),
    13 "enodeid" varchar(13),
    14 "pathclass" varchar(2),
    15 "pathno" varchar(13));
    16 SELECT AddGeometryColumn('','rbeijing','the_geom','4326','MULTILINESTRING',2);

INSERT INTO "rbeijing" ("mapid","id","kind_num","kind","width","direction","const_st","pathname","pathpy","snodeid","enodeid","pathclass","pathno",the       _geom) VALUES ('595525','59552500001','1','0401','55','0','1',NULL,NULL,'59552500003','59552500136','2','0','SRID=4326;0105000000010000000102000000070       00000BD5296218EED5C40D844662E70C7434069C4CC3E8FED5C40103FFF3D78C743405DFC6D4F90ED5C40897956D28AC743405DFC6D4F90ED5C405D6DC5FEB2C74340A374E95F92ED5C40A       587A1D5C9C743400806103E94ED5C40AB9509BFD4C74340DCD6169E97ED5C405CAD1397E3C74340');


粗体部分是最主要的区别点。geom字段的值会因为SRID的不同而不同。




|----------------------------------------------------------------------------------------|
                           版权声明  版权所有 @zhyiwww
            引用请注明来源 http://www.blogjava.net/zhyiwww   
|----------------------------------------------------------------------------------------|
posted on 2009-07-10 16:31 zhyiwww 阅读(1114) 评论(0)  编辑  收藏 所属分类: gisPostgis

只有注册用户登录后才能发表评论。


网站导航: