Hi
I'm trying to export a featureclass from a ArcSDE database into mapinfo
tab files. I've got around 500 features classes to export as tab files,
so I would like to do batch processing this ie pass in featureclass name
and get tab file with the same name and same attributes as the source
featureclass plus an additional "extrctdate" attribute.
I've sort of got it working using command line. A tab file with the
correct name is created and has the geometry but none of the feature class
attributes. I probably need to define the MAPINFO_DEF somehow but that of
course will differ depending on the source featureclass. And then i need
to add an extra field, not sure if this is possible.
Has anyone done a similar thing or any suggestions.
Thanks in advance for any help.
Jackie
Get the maximum benefit from your FME, FME Objects, or SpatialDirect via our
Professional Services team. Visit www.safe.com/services for details.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/fme/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
#! WORKSPACE_VERSION 1
# ============================================================================
#
# This mapping file was generated by FME Workbench
# on 05/08/06 18:06:23 for translation between SDE30 and MAPINFO
#
# This workspace was generated with FME build 1694
#
# You may edit this mapping file to customize its operation. Comments are
# placed throughout to assist you.
#
# Modification History:
#
# Name Date Description
# ================= ======== =============================================
#
#
# ============================================================================
# ============================================================================
# The following line defines the title presented to the user when this
# mapping file is run through the FME GUI. You may modify this
# if a more meaningful title would be appropriate.
GUI TITLE SDE30 to MAPINFO Translation
# ============================================================================
# The following line names the log file to which useful statistics about
# the translation will be written. This line can be uncommented and
# updated if you do wish to keep these statistics.
# LOG_FILENAME translation.log
# LOG_APPEND NO
# ============================================================================
# The following line instructs the FME to log any features that do not
# match any of the source feature patterns listed further down in
# this file. If you are modifying this mapping file, this will be
# useful to describe to you exactly which features you are losing
# during translation, if the statistics indicate that features are
# not being correlated or grouped. Uncorrelated features do not
# match any source specification, ungrouped features do not have
# any corresponding _DEF line.
# FME_DEBUG UNGROUPED UNCORRELATED
# ============================================================================
# The following two lines define the type of reader and writer to be
# used for this translation. If you want to translate your data
# back into its original format, you may make a copy of this file
# and switch the reader and writer types. If you rerun the FME, you
# will get your original data back again (together with any modifications
# you made in the meantime). Note that several formats are NOT
# bi-directional (for example, GIF can only be used as a WRITER)
# so a reverse translation may not always be possible.
READER_TYPE SDE30
READER_KEYWORD SDE30
WRITER_TYPE MAPINFO
WRITER_KEYWORD MAPINFO
MACRO WB_KEYWORD "SDE30"
# ========================================================================
# Specify that if no ids are specified then the DEF lines are used
# for the ids.
SDE30_USE_DEFS_IF_NO_IDS YES
# ========================================================================
# The following GUI line prompts for the name of the SDE dataset,
# from which data will be extracted.
# The dataset this mapping file was generated from was:
DEFAULT_MACRO SourceDataset
INCLUDE [ if {"$(SourceDataset)" != ""} { \
puts {DEFAULT_MACRO SourceDataset_SDE30 $(SourceDataset)} \
} ]
DEFAULT_MACRO SourceDataset_SDE30 eicudelivery
GUI TEXT SourceDataset_SDE30 Source ArcSDE Dataset:
# ============================================================================
# The following GUI line prompts for the name of the host machine on which.
# the SDE Server runs.
DEFAULT_MACRO _IN_SDE3Server_SDE30 ifxgeon
GUI OPTIONAL TEXT _IN_SDE3Server_SDE30 Source ArcSDE Server name:
SDE30_SERVER "$(_IN_SDE3Server_SDE30)"
# ============================================================================
# The following GUI line prompts for the instance
DEFAULT_MACRO _IN_SDE3Instance_SDE30 eicudelivery
GUI TEXT _IN_SDE3Instance_SDE30 Source ArcSDE Instance:
SDE30_INSTANCE "$(_IN_SDE3Instance_SDE30)"
# ============================================================================
# The following GUI line prompts for the SDE version.
DEFAULT_MACRO _IN_SDE3Version_SDE30 SDE.DEFAULT
GUI TEXT _IN_SDE3Version_SDE30 Source ArcSDE Version:
SDE30_VERSION_NAME "$(_IN_SDE3Version_SDE30)"
# ============================================================================
# The following GUI line prompts for the user name to use for
# accessing the SDE dataset.
DEFAULT_MACRO _IN_SDE3UserName_SDE30 eicu
GUI TEXT _IN_SDE3UserName_SDE30 Source ArcSDE User ID:
SDE30_USERID "$(_IN_SDE3UserName_SDE30)"
# ============================================================================
# The following GUI line prompts for the user password.
DEFAULT_MACRO _IN_SDE3Password_SDE30 UdontCme
GUI PASSWORD _IN_SDE3Password_SDE30 Source ArcSDE Password:
SDE30_PASSWORD "$(_IN_SDE3Password_SDE30)"
# ============================================================================
# The following sets the spatial constraint for the query.
# We default them all to 0, which means no search envelope is active
DEFAULT_MACRO _IN_SDE3MINX_SDE30 0
GUI FLOAT _IN_SDE3MINX_SDE30 Envelope Min X:
DEFAULT_MACRO _IN_SDE3MINY_SDE30 0
GUI FLOAT _IN_SDE3MINY_SDE30 Envelope Min Y:
DEFAULT_MACRO _IN_SDE3MAXX_SDE30 0
GUI FLOAT _IN_SDE3MAXX_SDE30 Envelope Max X:
DEFAULT_MACRO _IN_SDE3MAXY_SDE30 0
GUI FLOAT _IN_SDE3MAXY_SDE30 Envelope Max Y:
SDE30_SEARCH_ENVELOPE $(_IN_SDE3MINX_SDE30) $(_IN_SDE3MINY_SDE30)
$(_IN_SDE3MAXX_SDE30) $(_IN_SDE3MAXY_SDE30)
# GUI TEXT _IN_SDE3SearchMethod Search Method
DEFAULT_MACRO _IN_SDE3SearchMethod_SDE30 SDE_ENVELOPE
SDE30_SEARCH_METHOD $(_IN_SDE3SearchMethod_SDE30)
# Decide whether or not we want to clip to the input area
# Default this to NO if they don't say otherwise
DEFAULT_MACRO _IN_SDE3CLIP_SDE30 no
GUI CHOICE _IN_SDE3CLIP_SDE30 YES%NO Clip to Envelope:
SDE30_CLIP_TO_ENVELOPE $(_IN_SDE3CLIP_SDE30)
# Now include the text splitting pipeline.
INCLUDE "$(FME_HOME)/pipeline/sde30_read.fmi"
# ========================================================================
# The following specifies whether to create a persistent connection. If
# set to YES, the connection will remain open until FME is shutdown.
DEFAULT_MACRO _IN_SDE3PersistentConnection_SDE30 NO
GUI CHOICE _IN_SDE3PersistentConnection_SDE30 YES%NO Make Connection Persistent:
SDE30_PERSISTENT_CONNECTION $(_IN_SDE3PersistentConnection_SDE30)
# ========================================================================
# The following specifies whether features returned will or will not match
# the spatial constraint given.
DEFAULT_MACRO _IN_SDE3SearchMethodFilter_SDE30 TRUE
GUI CHOICE _IN_SDE3SearchMethodFilter_SDE30 TRUE%FALSE Search Method Filter:
SDE30_SEARCH_METHOD_FILTER $(_IN_SDE3SearchMethodFilter_SDE30)
# ========================================================================
# The following specifies the order the the underlying search is pertformed
# int he SDE. The default is OPTIMIZE, other values are SPATIAL_FIRST, in which
# case the spatial component is done first, and ATTRIBUTE_FIRST, in which case
# the attribute search is done first.
DEFAULT_MACRO _IN_SDE3SearchOrder_SDE30 OPTIMIZE
GUI CHOICE _IN_SDE3SearchOrder_SDE30 OPTIMIZE%SPATIAL_FIRST%ATTRIBUTE_FIRST
Search Method Order:
SDE30_SEARCH_ORDER $(_IN_SDE3SearchOrder_SDE30)
# ========================================================================
# The following defines the where clause of the search. You could prompt
# for this by uncommenting the relevant GUI lines
DEFAULT_MACRO _IN_SDE3WhereClause_SDE30
GUI OPTIONAL TEXT _IN_SDE3WhereClause_SDE30 Where Clause:
SDE30_WHERE "$(_IN_SDE3WhereClause_SDE30)"
# ========================================================================
# The following defines the search method for the query.
GUI OPTIONAL CHOICE _IN_SDE3SearchMethod_SDE30
SDE_ENVELOPE%SDE_ENVELOPE_BY_GRID%SDE_COMMON_POINT%SDE_LINE_CROSS%SDE_COMMON_LINE%SDE_CP_OR_LC%SDE_AI_OR_ET%SDE_AREA_INTERSECT%SDE_AI_NO_ET%SDE_CONTAINED_IN%SDE_CONTAINS%SDE_CONTAINED_IN_NO_ET%SDE_CONTAINS_NO_ET%SDE_POINT_IN_POLY%SDE_IDENTICAL
Search Method:
# ========================================================================
# The following defines the search feature for the query. It defines an
# arbitrarily complex search feature as a spatial contraint. It is in the
# form <keyword>_SEARCH_FEATURE [<xCoord> <yCoord>]+.
DEFAULT_MACRO _IN_SDE3SearchFeature_SDE30
GUI OPTIONAL TEXT _IN_SDE3SearchFeature_SDE30 Search Feature:
SDE30_SEARCH_FEATURE $(_IN_SDE3SearchFeature_SDE30)
# ========================================================================
# The following specifies the maximum number of features to read. A value
# of zero indicates that all the features should be read.
DEFAULT_MACRO _IN_SDE3MaxFeatures_SDE30 0
GUI INTEGER _IN_SDE3MaxFeatures_SDE30 Max # Features:
SDE30_MAX_FEATURES $(_IN_SDE3MaxFeatures_SDE30)
# ========================================================================
# The following specifies the name of a child version to be created. After
# the version has been created, tables will be read using this version
# rather than the version specified by the VERSION_NAME keyword.
DEFAULT_MACRO _IN_SDE3ChildVersionName_SDE30
GUI OPTIONAL TEXT _IN_SDE3ChildVersionName_SDE30 Child Version Name:
SDE30_CHILD_VERSION_NAME $(_IN_SDE3ChildVersionName_SDE30)
# ========================================================================
# The following specifies whether to keep the table qualifier prefix.
DEFAULT_MACRO _IN_SDE3RemoveTableQualifier_SDE30 NO
GUI CHOICE _IN_SDE3RemoveTableQualifier_SDE30 YES%NO Remove Table Qualifier:
SDE30_REMOVE_TABLE_QUALIFIER $(_IN_SDE3RemoveTableQualifier_SDE30)
SDE30_DATASET "$(SourceDataset_SDE30)"
MACRO WB_KEYWORD "MAPINFO"
# ============================================================================
# The following GUI line prompts for a directory to be used as the
# the destination for the Mapinfo TAB files.
# The user input is stored in a macro, which is then used to define
# the dataset to be written.
DEFAULT_MACRO DestDataset
INCLUDE [ if {"$(DestDataset)" != ""} { \
puts {DEFAULT_MACRO DestDataset_MAPINFO $(DestDataset)} \
} ]
DEFAULT_MACRO DestDataset_MAPINFO \\san-qs-nasb\users\jcooper\fme
examples\Automate_Data_Extract\tab
GUI DIRNAME DestDataset_MAPINFO Destination Directory:
# ============================================================================
# By default, we'll NOT try to use any bounding box information that can be
# read from the source data when the output coordinate system is unknown
DEFAULT_MACRO _USE_SOURCE_BOUNDING_BOX_MAPINFO no
MAPINFO_USE_SOURCE_BOUNDING_BOX $(_USE_SOURCE_BOUNDING_BOX_MAPINFO)
# ============================================================================
# Specify the charset name to be used in the TAB file header. NOTE: This name
# is just written out in the header and has no affect on the TAB file contents
#
#DEFAULT_MACRO MAPINFO_OUT_CHARSET Neutral
#DEFAULT_MACRO MAPINFO_OUT_CHARSET
#
#MAPINFO_CHARSET $(MAPINFO_OUT_CHARSET_MAPINFO)
# ============================================================================
# Include the mapinfo macro package -- sets up a number of macros for
# mapinfo colors and linestyles
INCLUDE "$(FME_HOME)/metafile/mapinfoMacros.fmi"
# ============================================================================
# The following lines override the default coordinate system for features. This
# provides a mapinfo-specific coordinate system line to the writer.
DEFAULT_MACRO _COORDSYS_STATEMENT_MAPINFO CoordSys Earth Projection 1, 116
Bounds (140.25,-38) (159.50,-18.75)
GUI OPTIONAL TEXT _COORDSYS_STATEMENT_MAPINFO Coordinate System Statement:
MAPINFO_COORDSYS_STATEMENT $(_COORDSYS_STATEMENT_MAPINFO)
# MAPINFO_COORDSYS_STATEMENT CoordSys Earth Projection 1, 116 Bounds
(140.25,-38) (159.50,-18.75)
#
# ============================================================================
# The following lines provide a bounding area for the output files. Because
# MapInfo has a limited precision available for coordinate storage, providing
# a tight bounds on the storage can preserve accuracy.
DEFAULT_MACRO _MIF_MINX_MAPINFO 140.25
GUI OPTIONAL FLOAT _MIF_MINX_MAPINFO Bounds Min X:
DEFAULT_MACRO _MIF_MINY_MAPINFO -38
GUI OPTIONAL FLOAT _MIF_MINY_MAPINFO Bounds Min Y:
DEFAULT_MACRO _MIF_MAXX_MAPINFO 159.50
GUI OPTIONAL FLOAT _MIF_MAXX_MAPINFO Bounds Max X:
DEFAULT_MACRO _MIF_MAXY_MAPINFO -18.75
GUI OPTIONAL FLOAT _MIF_MAXY_MAPINFO Bounds Max Y:
MAPINFO_BOUNDS $(_MIF_MINX_MAPINFO) $(_MIF_MINY_MAPINFO) $(_MIF_MAXX_MAPINFO)
$(_MIF_MAXY_MAPINFO)
# ============================================================================
# Specify whether we want to generate region centroids.
DEFAULT_MACRO _WRITE_REGION_CENTROIDS_MAPINFO no
GUI CHOICE _WRITE_REGION_CENTROIDS_MAPINFO yes%no Generate and Write Region
Centroids:
MAPINFO_WRITE_REGION_CENTROIDS $(_WRITE_REGION_CENTROIDS_MAPINFO)
#=============================================================================
# Specify whether 2 point lines will be output as line or polylines
DEFAULT_MACRO TWO_POINT_LINE_AS_POLYLINE_MAPINFO no
GUI OPTIONAL CHOICE TWO_POINT_LINE_AS_POLYLINE_MAPINFO yes%no Write 2 Point
Line as Polyline:
MAPINFO_TWO_POINT_LINE_AS_POLYLINE $(TWO_POINT_LINE_AS_POLYLINE_MAPINFO)
MAPINFO_DATASET "$(DestDataset_MAPINFO)"
LOG_FILENAME "$(FME_MF_DIR)test_sde30_2_mapinfo.log"
LOG_APPEND NO
DEFAULT_MACRO DATASET_KEYWORD_SDE30 SDE30
DEFAULT_MACRO DATASET_KEYWORD_MAPINFO MAPINFO
# -------------------------------------------------------------------------
SDE30_READER_META_ATTRIBUTES fme_feature_type
# -------------------------------------------------------------------------
# -------------------------------------------------------------------------
SDE30_IDs "$(SourceFeatureClass)"
# -------------------------------------------------------------------------
MACRO WORKSPACE_NAME test_sde30_2_mapinfo
# -------------------------------------------------------------------------
FACTORY_DEF * TeeFactory \
FACTORY_NAME "Source -> Generic" \
INPUT FEATURE_TYPE * \
OUTPUT FEATURE_TYPE "$(SourceFeatureClass)"
\
@Transform(SDE30,FME_GENERIC,PRESERVE_GEOMETRY)\
@Log("test1",1,1)
# -------------------------------------------------------------------------
FACTORY_DEF * TeeFactory \
FACTORY_NAME "Correlator" \
INPUT FEATURE_TYPE "$(SourceFeatureClass)" \
OUTPUT FEATURE_TYPE "$(SourceFeatureClass)" \
@Transform(FME_GENERIC,MAPINFO) \
@Log("test2",2,1)
# -------------------------------------------------------------------------
SDE30 *
MAPINFO *
# -------------------------------------------------------------------------
MAPINFO_DEF "$(SourceFeatureClass)"