SHP uploads to Oracle Spatial

Source: Internet
Author: User

1. Download the SHP2SDO, copy the shp file to shp2sdo the same path, open the Windows command window and execute:

SHP2SDO shp file name Table name-I id-s 4326-d

Example: SHP2SDO City tb_city-i id-s 4326-d

2. Open the Plsql Command window, execute (can also execute in sqlplus or Execute SQL statement in Plsql):

sql> @ path + table name. sql

Example: @j:\shp\tb_city.sql

3. In the Windows command window, execute:

SQLLDR User name/password @ Instance Name Table name

Example: Sqlldr younggis/[email protected] tb_city

Remote connection: Sqlldr younggis/[email PROTECTED]:1521/ORCL tb_city

4. In the Plsql Command window, do the following:

Sql> Execute sdo_migrate.to_current (' table name ', ' Geometry field name ');

For example: Execute sdo_migrate.to_current (' tb_city ', ' geom ');

5. Create a spatial index, in the Plsql command window, to do the following:

Sql> CREATE index name on table name (geometry field name) Indextype is Mdsys. Spatial_index;

Example: CREATE INDEX tb_city_index on tb_city (geom) Indextype is Mdsys. Spatial_index;

SHP uploads to Oracle Spatial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.