柚子

博客园 首页 新随笔 联系 订阅 管理

Skyline 可以连接外部的数据源,包括SQL Server,Oracle ,excel,mySQL,SQlite,WFS.......

连接字符串如下:例如连接shp文件,为“FileName=C:\\sample.shp;TEPlugName=OGR;“

§   TEPlugName=OGR

·          Shapefile:
“FileName=FullPathToShapeFile”
Where FullPathToShapeFile defines a full path to the shapefile.

·          DGN file:
“FileName=FullPathToShapeFile”
Where FullPathToShapeFile defines a full path to the DGN file.

·          DXF file:
“FileName=FullPathToShapeFile”
Where FullPathToShapeFile defines a full path to the DXF file.

·          Oracle Spatial:
“OGRConnectionString= OCI:userid/password@database_instance:table,table”.
Where userid/password defines respectively the user name and password required for connecting to the server, database_instance defines the Oracle Net Service name, and table defines the table to access.

·          PostgreSQL extended with the PostGIS spatial data support:
“LayerName=LayerName;OGRConnectionString={ PG:dbname=’databasename’}”
Where databasename defines the database name.
Additional parameters may be provided as required, e.g. { PG:dbname=’databasename’ host='addr' port='5432' user='userid' password='password'}.

·          MS SQL Spatial:
“OGRConnectionString={ MSSQL:server=servername;database=databasename;UID=userid;PWD=password;Tables=table}”
Where servername defines the server name, databasename defines the database to connect to, userid and password define the user name and password respectively, and table defines the table to access.

·          SQLite:
“FileName=FullPathToShapeFile;LayerName=LayerName”
Where FullPathToShapeFile defines a full path to the SQLite file, LayerName defines the name of the layer to be loaded.

§   TEPlugName= WFS – Used to load layers from Web Feature Server (WFS). Additional parameters are required (mandatory fields are bolded):

·          Server:
“Server=ServerURL”
Where ServerURL defines a full URL to the server.

·          WFSVersion:
“WFSVersion =Version”
Supported Version values are “1.0.0” and “1.1.0”.

·          LayerName:
“LayerName=LayerName”
Where LayerName defines the name of the layer to be loaded.

·          User:
“User =UserName”
Where UserName defines the user name required to connect to the server.

·          Password:
“Password=Password”
Where Password defines the user name required to connect to the server.

·          Lat-Long or Long-Lat coordinate format:
“CRS_XY_OR_YX=Format”
Supported Format values are “1” for Long-Lat and “2” for Lat-Long.

§   TEPlugName=GeoDatabase – Used to load layers from a Personal Geodatabase file. Additional parameters are required (mandatory fields are bolded):

·          LayerName:
“LayerName=ServerURL”
Where LayerName defines a full path to the GeoDatabase file.

·          TableName:
“TableName =TableName”
Where LayerName defines the name of the table containing the layer to be loaded.

§   TEPlugName= DSN – Used to load layers from an ODBC database connection. Additional parameters are required (mandatory fields are bolded):

·          DSNPlugName:
“DSNPlugName=PlugName”
Where PlugName defines the ODBC driver. For example: “Microsoft Access(*.mdb)”.

·          DSNConnectionString:
“DSNConnectionString=ConnectionString”
Where ConnectionString defines the DSN connection string as required by the defined driver.

·          DSN_X_Field:
“DSN_X_Field=X”
Where X defines the database field name containing the X coordinate.

·          DSN_Y_Field:
“DSN_Y_Field=Y”
Where Y defines the database field name containing the Y coordinate.

·          DSN_AltitudeField:
“DSN_AltitudeField=Altitude”
Where Altitude defines the database field name containing the altitude value.

·          TableName:
“TableName =TableName”
Where LayerName defines the name of the table containing the layer to be loaded

重点来了。实际的例子:

excel: "FileName=D:\\demo.xls;LayerName=test;DSN_X_Field=L;DSN_Y_Field=B;DSN_AltitudeField=H;TEPlugName=OGR;"

 

 

 

posted on 2017-11-17 10:33  ooοゞ柚子ゞooo  阅读(312)  评论(0)    收藏  举报