1.建立数据库连接

create public database link ytlink
connect to hightop identified by hightop
using '(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.137)(PORT=1521))
(CONNECT_DATA=
(SERVER = DEDICATED)(SERVICE_NAME = orcl))
)';

2.跨库查询

select * from police@ytlink

3.创建临时表空间

create temporary tablespace POLICE_TEMP --创建临时表空间
tempfile 'E:\app\Administrator\product\POLICE_TEMP.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;

4.删除表空间

drop tablespace POLICE_TEMP including contents and datafiles;--删除表空间

5.创建表空间

create tablespace POLICE --创建表空间
logging
datafile 'E:\app\Administrator\product\POLICE.dbf'
size 500m
autoextend on
next 500m maxsize 20480m
extent management local;

6.创建用户

create user hightop identified by "hightop" --创建用户并制定表空间
default tablespace POLICE
temporary tablespace POLICE_TEMP;

7.删除用户

drop user hightop cascade;--删除用户

8.用户授权

grant all privileges to hightop;--给用户授予权限

9.shp上传oracle

1.shp2sdo shp文件名 表名 -i id -s 4326 -d(在shp2sdo所在路径下执行)
2.SQL> @J:\DY\表名.sql(在plsql的sql命令行执行或sqlplus下执行)
3.sqlldr 用户名/密码@实例名 表名(在安装oracle机器的dos执行)
4.SQL> execute sdo_migrate.to_current('表名','geometry字段名');
5.SQL> CREATE INDEX 索引名 ON 表名(geometry字段名) INDEXTYPE IS MDSYS.SPATIAL_INDEX;

10.空间关系计算

select c.id,s.id from tlmap_village c,cameragps s where sdo_geom.relate(s.geom,'Anyinteract',c.geom,0.000001)='TRUE' --计算点在面内

11.向mdsys.cs_srs中插入crs(以3857为例):

 insert into mdsys.cs_srs (cs_name, srid, auth_srid, wktext, wktext3d)
values (
'WGS_1984_Web_Mercator_Auxiliary_Sphere',
3857,
3857,
'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',
''
);

12.SDO_SRID不为NULL时,SDO_SRID必须在MDSYS.CS_SRS 表中的 SRID 列有对应的值,而且它的值必须插入USER_SDO_GEOM_METADATA视图中。

Oralce Spatial的更多相关文章

  1. oralce 10g 官方认证的操作系统版本

    oralce 10g 官方认证的操作系统版本 Operating system x86              Red Hat Enterprise Linux AS/ES 3 (Update 4 ...

  2. oracle遇到的锁异常,oralce record is locked by another user

    由于我在前不久的一次项目调试的时候,将一条数据的ID与另一条数据的ID相同了,但不知为什么没有报错,当在页面发现问题时,删除这条数据时就报错了,oralce record is locked by a ...

  3. [转]ArcIMS 中地图坐标参考设置(ArcGIS Unknown Spatial Reference)

    "ArcGIS Unknown Spatial Reference"问题: shp文件在Arcgis打开后经常因为原有坐标系无法识别而丢失信息,出现以下提示信息: "Un ...

  4. fMRI: spatial smoothing

    Source: Brain voyager support Theoretical Background Spatial smoothing means that data points are av ...

  5. AE开发实现Spatial Join Analysis

    总体网上资料不多,包括esri帮助文档都写的很简单,没有各个string参数如match_option之类的可以输入的string限制,导致在摸索中gp.Execute时报错n回. 结合网上搜集资料及 ...

  6. csc.rsp Nuget MVC/WebAPI、SignalR、Rx、Json、EntityFramework、OAuth、Spatial

    # This file contains command-line options that the C# # command line compiler (CSC) will process as ...

  7. csc.rsp Nuget MVC/WebAPI 5.0、SignalR 2.0、Rx、Json、Azure、EntityFramework、OAuth、Spatial

    # This file contains command-line options that the C# # command line compiler (CSC) will process as ...

  8. Spatial Transformer Networks(空间变换神经网络)

    Reference:Spatial Transformer Networks [Google.DeepMind]Reference:[Theano源码,基于Lasagne] 闲扯:大数据不如小数据 这 ...

  9. 【Duke-Image】Week_3 Spatial processing

    Chapter_3 Intensity Transsformations and Spatial Filtering 灰度变换与空间滤波 Intensity transformation functi ...

随机推荐

  1. [HAOI2010]计数 数位DP+组合数

    题面: 你有一组非零数字(不一定唯一),你可以在其中插入任意个0,这样就可以产生无限个数.比如说给定{1,2},那么可以生成数字12,21,102,120,201,210,1002,1020,等等. ...

  2. POJ1066:Treasure Hunt——题解

    http://poj.org/problem?id=1066 题目大意:给一个由墙围成的正方形,里面有若干墙,每次破墙只能从(当前看到的)墙的中点破,求最少破多少墙才能看到宝藏. —————————— ...

  3. BZOJ3040:最短路——题解

    https://www.lydsy.com/JudgeOnline/problem.php?id=3040 题意rt,使用pb_ds的堆解决本问题. 所以其实就是mark一下的. 不过有人确认过官方不 ...

  4. React的setState执行机制

    1. setState基本特点 1. setState是同步执行的 setState是同步执行的,但是state并不一定会同步更新 2. setState在React生命周期和合成事件中批量覆盖执行 ...

  5. 直通BAT面试算法精讲课 --动态规划

    1.有数组penny,penny中所有的值都为正数且不重复.每个值代表一种面值的货币,每种面值的货币可以使用任意张,再给定一个整数aim(小于等于1000)代表要找的钱数,求换钱有多少种方法. 给定数 ...

  6. some interesting words

    No one gets rich betting against the market. Never bet against the Fed. Bulls make money, bears make ...

  7. Codeforces Round #337 (Div. 2)B

    B. Vika and Squares time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  8. ACM1004 Let the balloons fly

    These code is for the problem "Let the balloons Fly" in ACM 1004 which need deal with stri ...

  9. [Luogu 3958] NOIP2017 D2T1 奶酪

    题目链接 人生第一篇题解,多多关照吧. 注意事项: 1.多组数据,每次要先初始化. 2.因为涉及到开根,所以记得开double. 整体思路: 建图,判断「起点」与「终点」是否连通. 方法可选择搜索(我 ...

  10. RabbitMQ与AMQP

    1. 消息队列的历史 了解一件事情的来龙去脉,将不会对它感到神秘.让我们来看看消息队列(Message Queue)这项技术的发展历史. Message Queue的需求由来已久,80年代最早在金融交 ...