Export Method
Description
Exports data using a Plug-in Exporter.
Syntax
Visual Basic |
---|
Public Function Export( _ ByVal clsExport As String, _ ByVal filename As String, _ ByVal parameters As String _ ) As Integer |
Parameters
- clsExport
- The Plug-in Exporter class to use.
- filename
- The name of the exported file.
- parameters
-
Optional parameters used to configure the Plug-in Exporter. There must be no spaces in parameters.
ArcView (*.shp)
clsExport = "AArcInfoShapeExporter"
Parameters
index=n
overlay position to exporttype=n
type of data0 Point
1 PolyLine
2 Polygon
3 MultiPoint
10 PointZ
11 PolyLineZ
12 PolygonZ
13 MultiPointZExample :
sis.Export ("AArcInfoShapeExporter","c:\\test.shp","index=0,type=3")
clsExport = "DwgExporter"
Parameters
attributes=boolean
True export attributes
False do not export attributes
itemlayer=boolean
True use layer name
False use overlay name
version=n
12
13
14
2000
2004
2005
2006
2007
2008
2010
2013
TemplateFile
Path to the template file.
Note: When using a template file for export it is necessary for the 'layer' value to be set so items in SIS can be mapped onto the correct layer in AutoCad.
CopyUsedTemplateElementsOnly
True copy elements of used template file only
False Do not use elements of used template file
xdata=boolean
True export as Extended Data (XData)
False do not export as Extended Data (XData)
Example
sis.Export ("DwgExporter","c:\\test.dwg","attributes=True,itemlayer=True,version=2004,
TemplateFile=c:\\Templatefile.dwg,CopyUsedTemplateElementsOnly=True,xdata=False")
Note: "version" may be AutoCAD versions 12, 13, 14, 2000, 2004, 2007
clsExport = "DxfExporter"
Parameters
attributes=boolean
True export attributes
False do not export attributes
itemlayer=boolean
True use layer name
False use overlay name
version=n
12
13
14
2000
2004
2005
2006
2007
2008
2010
2013
TemplateFile
Path to the template file.
Note: When using a template file for export it is necessary for the 'layer' value to be set so items in SIS can be mapped onto the correct layer in AutoCad.
CopyUsedTemplateElementsOnly
True copy elements of used template file only
False Do not use elements of used template file
xdata=boolean
True export as Extended Data (XData)
False do not export as Extended Data (XData)
Examples
Note: The attributes and xdata parameters are mutually exclusive, so do not use both parameters in the same export command line:
sis.Export("DxfExporter","C:\\test.dxf","attributes=true,itemlayer=true,version=13")
or
sis.Export("DxfExporter","C:\\test.dxf","xdata=true,itemlayer=true,version=13")
TemplateFile=c:\\Templatefile.dxf,CopyUsedTemplateElementsOnly=True,xdata=True")
Note: "version" may be AutoCAD versions 12, 13, 14, 2000, 2004/05/06, 2007/08, 2010, 2013.
Example using a template file:
sis.Export ("DxfExporter","c:\\test.dxf","attributes=True,itemlayer=True,version=2013,TemplateFile=c:\\Templatefile.dxf,
CopyUsedTemplateElementsOnly=True")
clsExport = "BILGridExporter"
Parameters
showerrors=boolean
True show errors encountered in the export
False don’t show errors
Note: Only grid items can be exported.
Example
sis.Export ("BILGridExporter "," c:\\test.bil","showerrors=True")
clsExport = "AGxfExporter"
Parameters
none
Notes
The coordinate reference system must be set to latitude and longitude.
Example
sis.Export ("AGxfExporter","c:\\test.gxf","")
clsExport = "KMZExporter"
Parameters
Note: "dataelements": "fieldnames", "description", "ignoretransparency", "simulatemlpens", "tessalate" = "true" or "false" or true or false, are recognised as strings and booleans.
Parameter | Type | Comments |
altitudeMode |
String |
clampedtoground | relativetoground | absolute |
fieldnames |
Booean |
Export feature attributes as KML Descriptions (True/False) |
description |
Boolean |
Include fieldnames in description?(True/False) |
namefieldidx |
Integer |
Index of the schema column to use for naming, starting at 0 (there is no default index value) |
Extrusionfieldidx |
Integer |
This defines the index of the schema column to use for extruding the height of exported items, starting at 0 |
ignoretransparency |
Boolean |
Ignore brush transparency (True/False) |
simulatemlpens |
Boolean |
Simulate multi-level pens using KML Folders (True/False) |
tesselate |
Boolean |
Tesselate LineStrings (True/False) |
overlay |
Integer |
The overlay position to export, starting at 0. There is no default index value. |
extrusionfieldidx |
Use SchemaData elements (i.e. structured data) or Data elements (i.e. unstructured data) |
Example
This example shows all the individual parameters concatenated into one string called "sparams". That string is then passed on to SIS.Export:
Dim ignoretransparency As String = "false" Dim simulatemlpens As String = "false" Dim description As String = "true" Dim fieldnames As String = "true" Dim schemadata As String = "false" Dim dataelements As String = "true" Dim altitudemode As String = "clampedToGround" Dim extrusionfieldidx As Integer = 0 Dim tesselate As String = "false" Dim overlay As Integer = 0 Dim namefieldidx As Integer = 0
Dim sparams As String = "altitudemode =" & altitudemode & " , fieldnames =" & fieldnames & ", schemadata =" & schemadata & ", dataelements =" & dataelements & ", namefieldidx=" & namefieldidx & ", description =" & description & ",ignoretransparency =" & ignoretransparency & ", simulatemlpens =" & simulatemlpens & ", tesselate =" & tesselate & ", overlay =" & overlay & ", extrusionfieldidx =" & extrusionfieldidx
sis.Export ("KMZExporter","c:\\test.kmz", sparams)
Note: The coordinate reference system of the view must be in Latitude/Longitude.OGC.WGS_1984.
clsExport = "AMapInfoExporter"
Parameters
Parameter | Type | Comments |
index=n |
the overlay position to export |
|
width=n |
the width of char column. The default is 30. |
Example
sis.Export ("AMapInfoExporter","c:\\test.mif","index=1,width=30")
clsExport = "ATabExporter"
Parameters
Parameter | Type | Comments |
index=n |
the overlay position to export. There is no default index value. |
|
width=n |
width of char column, or a comma delimited string of column names (where the char field names are followed by a space and the width of the column). There is no default width value. |
Examples
sis.Export ("ATabExporter","c:\\test.tab","index=1,width=30")
sis.Export ("ATabExporter","c:\\test.tab","index=1;Description 30,Item_ID, Item_class 10,Origin_x,Origin_y,Origin_z")
Note: The field names list after the semicolon in the second example must match the schemas definition in SIS. Also, field names can only contain letters, numbers and '_'. They cannot contain spaces and punctuation marks and they cannot begin with a number. The only spaces allowed are between the character field name and its width specification.
clsExport = "DGNdirectExporter"
Parameter | Type | Comments |
itemlayer |
Boolean |
Optional |
explodeblocks |
Boolean |
Optional |
attributes |
Boolean |
Optional |
version: string of 'DGN7' or 'DGN8' optional. The plugin currently only supports DGN8.
Example
sis.Export ("DGN8Exporter","c:\\test.dgn","")
clsExport = "GeoPackageExporter"
Parameters
There are no required or optional parameters. Every Overlay with visible status (or above) is exported as a vector feature table.
Example
SIS.Export("GeoPackageExporter", "C:\test.gpkg", "")
clsExport = "OracleSpatialExporter"
clsExport = "OracleNetworkExporter"
OracleSpatialExporter
Parameters
Parameter | Type | Comments |
user |
String |
the id with which to log in to Oracle |
password |
String |
password for id |
server |
String |
the server hosting the Oracle database |
layer | String | the spatial table in Oracle to export to |
geometry | String | the column in the Oracle table which stores the geometry |
varcharlen |
Integer |
the maximum number of characters that can be stored in the column |
overlay |
Integer |
overlay position to export |
dimension |
Integer |
2 = export data are two dimensional, 3 =export data are three dimensional |
srid |
Integer |
Oracle’s spatial reference identifier, use 81989 for OSGB |
action |
Integer |
0 = create a new table, 1 = append to an existing table |
createIndex |
Boolean |
True = create a spatial index, False = do not create a spatial index |
OracleNetworkExporter
params$=
"connection=""OCI:service=YOURserver;user=YOURuser;password=YOURpassword""
showerrors=true|false
network=YOURnetworkname
overlaylink=3(layer number)
overlaynode=3(layer number)
srid=81989 (Spatial reference identifier, use EPSG code 27700 for OSGB)
sparameters = "connection=""OCI:service=spatial_qaserver;user=tempuser;password=SPATIAL"",network=qatest, overlaylink=3,overlaynode=3,srid=81989"
sis.Export("OracleNetworkExporter", "", sparameters)
Note: The Oracle spatial exporter defaults to database type "text" for strings
Example
Dim params As String
params = "user=MYLOGIN,password=MYPWD,server=MYDBSVR,Layer=MYTABLE,varcharlen=50,overlay=0"
sis.Export ("OracleSpatialExporter","",params)
clsExport = "OSRMExporter"
Parameter | Type | Comments |
Overlay | zero-based index of the Overlay containing the network to export (Mandatory) | |
Speed | Link speed expression as a single value, or as two values for bi-directional speeds (Mandatory) | |
ToKPH | conversion from the result of the speed expression to kilometres per hour, default = 1.0 | |
MetricLength | Link metric length expression, default = “_length#” | |
Name | Link name expression, used for turn-by-turn directions | |
Reference | Link reference expression, used for turn-by-turn directions | |
Roundabout | - Link roundabout expression, used to tag roundabouts | |
Country | metadata written to the .sis.json file | |
Credits | metadata written to the .sis.json file | |
Description | metadata written to the .sis.json file (Mandatory) | |
Source | metadata written to the .sis.json file |
clsExport = "APostGISExporter"
Parameter | Type | Comments |
user |
String |
the ID with which to log in to PostGIS |
password |
String |
password for the uid |
host |
the name, or IP address, of the server hosting the database |
|
port |
Integer |
the port to which the database listens, set during installation |
database |
String |
the name of the database |
layer |
String |
the spatial table in PostGIS to export to |
geometry |
String |
the column in the PostGIS table which stores the geometry |
geometryid="gid" (optional) |
change the default name of the PostGIS Table Primary Key |
|
varcharlen |
Integer |
the maximum number of characters that can be stored in the column |
overlay=o |
overlay position to export |
|
dimension
|
Integer |
2 export two dimensional data |
srid=srid |
spatial reference identifier, use EPSG code 27700 for OSGB |
|
action |
Integer |
0 create a new table |
createIndex |
Boolean |
True create a spatial index |
showerrors |
Boolean |
True show errors encountered in the export |
Notes
srid must be specified if action = 0 or is omitted.
The PostGIS exporter defaults to database type "text" for strings
Example
Dim params As String
params = "user=MYLOGIN,password=MYPWD,host=MYDBSVR,port=5432,database=MYDB,layer=MYTABLE,_
varcharlen=50,overlay=0,srid=27700,action=0,createIndex=True,showerrors=true"
sis.Export ("APostGISExporter ","",params)
clsExport = "SvgExporter"
export a file in plain text XML format
clsExport = "SvgExporterZipped"
export a file in ZIP format
Parameters
metadatacolumns=l
l is a list of schema columns to include as metadata. Use * for all columns.
Example
sis.Export ("SvgExporter ","c:\\test.svg","")
sis.Export ("SvgExporterZipped","c:\\test.svgz","metadatacolumns=*")
SED Export
clsExport = "ASisExporter"
Parameters
none
Example
sis.Export ("ASisExporter", "c:\\test.sed","")
Notes
Other third party exporters may be available. Consult your supplier for information on these.
clsExport = "SQLServerExporter"
Parameter | Type | Comments |
Connection: |
string |
Complete ADO connection string |
showerrors |
boolean (True ) |
Show errors in message boxes |
table |
string |
Target table name |
geometry |
string |
Target geometry column name |
featureid |
string |
Target feature id column name |
overlay |
integer |
Index of the overlay being exported |
createindex |
boolean (True) |
Create a spatial index |
boundingbox: |
boolean |
(True)- use the Overlay bounding box (False) - use the CRS bounding box (when creating the spatial index)” |
The connection string should be in JSON format.
Examples
sis.Export ("SQLServerExporter", "", Params)
sis.Export ("SQLServerExporter", "","connection=""Server=it-gis\sqlexpress; Database=TestGIS; User ID=user; Password=Pword;"", showerrors=True,table=MyTable,geometry=SP_GEOMETRY,FEATUREID=MI_TEST,overlay=1,createindex=True,boundingbox=True")
Remarks
Available: GEO D OD OM SISpy
Groups: