MapInfo空间数据库建立

MapInfo空间数据库建立

     

      MapInfo空间数据库方案:

      数据库:Oracle9i

      数据上传工具:easyload 9.0

      建立空间数据库时,easyload会自动创建一个mapinfo用户以及MAPINFO_MAPCATALOG表,但是easyload自己创建用户和表的时候好像不行,只能创建用户,MAPINFO_MAPCATALOG表创建失败,所以采用手工创建MAPINFO_MAPCATALOG的方式。

      创建时,使用mapinfo用户登陆,默认密码是mapinfo ,空间数据可以都上传到这个用户下。

      创建MAPINFO_MAPCATALOG表的sql语句如下

 Create Table MAPINFO_MAPCATALOG (
SPATIALTYPE Float,
TABLENAME Char(32),
OWNERNAME Char(32),
SPATIALCOLUMN Char(32),
DB_X_LL Float,
DB_Y_LL Float,
DB_X_UR Float,
DB_Y_UR Float,
COORDINATESYSTEM Char(254),
SYMBOL Char(254),
XCOLUMNNAME Char(32),
YCOLUMNNAME Char(32),
RENDITIONTYPE INTEGER,
RENDITIONCOLUMN CHAR(32),
RENDITIONTABLE CHAR(32)
)


每个参数的具体描述如下:
SPATIALTYPE NOTE: This column describes the Spatial
Object Format of how the data is stored and
indexed and the Spatial Object type(s)
supported and not supported in the column.
The digits to the left of the decimal point are
the Spatial Object Format. The digits to the
right represent the type of Spatial Object
Type that can be stored in the column.
MapInfo Spatial Object Format
1.x: Point layer in X/Y columns indexed with
micode (a serialized quadtree key)
2.x: Oracle MD/SDO version 1 HHCODE_ -
Not Supported
3.x: Oracle MD/SDO version 1
HHCODE_PARTIONED - Not Supported
4.x: Point layer in X/Y columns
5.x: SpatialWare for Oracle
6.x: Ingres SOL - Not Supported
7.x: Sybase SQS - Not Supported
8.x: Oracle SDO version 2 - Not Supported
9.x: MapInfo Geocoding DataBlade
SpatialWare Point Module
10.x: MapInfo Geocoding DataBlade XY
Module
11.x: SpatialWare IDS/UDO datablade
12.x: SpatialWare Extender for DB2
13.x: Oracle Spatial
14.x: SpatialWare for Microsoft SQL Server
Spatial Object Type
x.0: Points only
x.1: Lines only
x.2: Regions only
x.3: All types supported
5.3

TABLENAME The name of the table. DRAINAGE

OWNERNAME The owner name of the table. GEORGETOWN

SPATIALCOLUMN The name of the column, if any, containing
spatial features:
SW_GEOMETRY (mappable using
SpatialWare Type/IDS/UDO)
NO_COLUMN (mappable using X–Y)
MI_SQL_MICODE (mappable using MI Code)
Or the name of the IDS/UDO, DB2, or Oracle
column that is ST_SPATIAL datatype.
Name of the Oracle 8i SDO_GEOMETRY
column.
SW_GEOMETRY

DB_X_LL The X coordinate of the lower left corner of the
layer’s bounding rectangle, in units that are
indicated by the COORDINATESYSTEM (see
below).
–360

DB_Y_LL The lower left bounding Y value. –90

DB_X_UR The upper right bounding X value. 360

DB_Y_UR The upper right bounding Y value. 90

COORDINATESYSTEM A string representing a MapInfo CoordSys
clause (but without the keyword "CoordSys"
at the very start), which specifies a map
projection, coordinate units, etc. For simple
Lon/Lat maps, specify "Earth Projection 1, 0".
Earth Projection 1, 0

SYMBOL A MapInfo Symbol clause (if the layer
contains only points); or a Symbol clause
followed by a Pen clause (indicating styles for
linear features) followed by another Pen
clause (indicating styles for the borders of
regions) followed by a Brush clause.
Symbol(35,0,12)
Pen(1,2,0) Pen(1,2,0)
Brush(2,255,255)
XCOLUMNNAME For the X/Y mappable tables, specify the
name of the column containing X–coordinates.
If there is no such column (i.e., if this table
uses a single spatial column instead of a pair
of X–Y columns) then specify NO_COLUMN
or leave empty.
NO_COLUMN

YCOLUMNNAME For the X/Y mappable tables, specify the
name of the column containing Y–coordinates,
or specify NO_COLUMN.
NO_COLUMN

RENDITIONTYPE This indicates how the object style information
is applied.
? “0” - Indicates that all the objects will have
the style specified in the symbol field of the
Map.Catalog applied to them.
? “1” - Indicates that the table has a separate
column which contains a string
representation of the style information for
each object in the table (e.g. each object
may have its own style).
0 or 1

RENDITIONCOLUMN If RENDITIONTYPE is “1”, this field stores
the name of the column in the spatial table
(identified by the TABLENAME) that contains
style information. This column is
automatically added to any query against the
table and is maintained (updated) as the object
is updated. Users should NOT specify this
column in their queries as problems can occur
with intersect or update statements. Queries
which include this column in the select clause
(excluding the wildcard character “* “) may
access the values through the Dataset object.
Rows with a NULL value in their style column
will have the style from the SYMBOL field of
the MapCatalog applied to the object.
MI_SYMBOLOGY

RENDITIONTABLE Currently not used, but reserved for future
use, this column must exist in order for MapX
to correctly identify and apply record-level
styles.
NULL

原文地址:https://www.cnblogs.com/lauer0246/p/1297207.html