This discussion is archived
1 2 3 Previous Next 33 Replies Latest reply: Apr 19, 2010 1:46 AM by 744977 RSS

Import Shapefile in Oracle

744977 Newbie
Currently Being Moderated
Hi to all,

I have RedHat OS, Oracle 10g R2, and a DVD with Shapefile (Shapefile is a popular geospatial vector data format for geographic information systems software).

A "shapefile" commonly refers to a collection of files with ".shp", ".shx", ".dbf", ".prj".
Everyfile in the DVD is identified by:

00.dbf.gz
00.prj.gz
00.shp.gz
00.shx.gz

01.dbf.gz
01.prj.gz
01.shp.gz
01.shx.gz
...

I have about 3GB of this files. I must import this shapefile in Oracle.

Can you help me for this import?

Thank you in advance.
  • 1. Re: Import Shapefile in Oracle
    722583 Newbie
    Currently Being Moderated
    Hi!

    After you've extracted the files, I think, the easiest way to import shapefile is to use the Oracle MapBuilder tool. Under the tools menu, you'll find the Import shapefile item. After that, I think it's pretty straightforward :).
  • 2. Re: Import Shapefile in Oracle
    Ivan Bush Journeyer
    Currently Being Moderated
    Hi,

    These files are compressed so you will need to uncompress them. This will give the fileset which is produced for the ESRI GIS suite of programs.

    Tke a look at http://www.oracle.com/technology/products/spatial/pdf/spatial_best_practices.pdf.

    Also look at https://wiki.deegree.org/deegreeWiki/OracleShapeImport.

    Regards.

    Ivan
  • 3. Re: Import Shapefile in Oracle
    744977 Newbie
    Currently Being Moderated
    Hi,
    I have uncompress all these files.

    Now, I have 4 files for every shapefile:
    00.dbf
    00.prj
    00.shp
    00.shx

    01.dbf
    01.prj
    01.shp
    01.shx
    ...

    Now I have about....3 millions of this files!

    I tried to use shp2sdo, and the most important problem is:

    Must I do ONE script with shp2sdo for every single file??? (about 3 millions of scripts!!!!)
    I think that this is impossible because I will finish it in a year...

    Or, what I wrong?

    thank you for your help

    Edited by: user8959984 on 18-feb-2010 1.36
  • 4. Re: Import Shapefile in Oracle
    722583 Newbie
    Currently Being Moderated
    Hi!

    I suggest you to use MapBuilder. It can "batch-import" your shapefiles (so you don't have to do it one-by-one using shp2sdo), and it creates the metadata, and spatial index too.
    Here you can find MapBuilder: http://www.oracle.com/technology/software/products/mapviewer/index.html
    Extract the files, and start mapbuilder.jar (it has a GUI). Connect to your database, and after that, under the Tools menu, select the Import shapefile item. There you'll find the batch import option.

    Regards: Salaj

    Edited by: Salaj on 2010.02.18. 4:51
  • 5. Re: Import Shapefile in Oracle
    744977 Newbie
    Currently Being Moderated
    Hi,
    thank you for your suggest.
    now I'm trying your solution.

    I launch in this moment Map Builder and I'm trying to connect Database.

    But before of this, I have a question (I'm beginner...):
    Is required to have installed the Oracle Fusion Middleware for use MapBuider?


    Because I haven't installed Oracle Fusion Middleware.
    If it's required, where I can download it?
  • 6. Re: Import Shapefile in Oracle
    Siva Ravada Expert
    Currently Being Moderated
    You don't need fusion middleware to run MapBuilder.
    MapBuilder is a stand alone thick client and it directly connect to the DB.

    siva
  • 7. Re: Import Shapefile in Oracle
    744977 Newbie
    Currently Being Moderated
    ok, perfect!
    At this moment I have imported about only 100 shapefiles for to see what happen.


    Now, I don't know if this question has meaning, but I want ask: how can I do for see this information (shapefile imported) on a map?


    Thank you to all.
  • 8. Re: Import Shapefile in Oracle
    744977 Newbie
    Currently Being Moderated
    Hi,

    Someone knows if exist tool for view these shapefile imported?

    thank you,
    crystal
  • 9. Re: Import Shapefile in Oracle
    Siva Ravada Expert
    Currently Being Moderated
    You can use MapBuilder to use view the shapefiles you loaded into the database.
    When you load these shapefiles, it will ask you if you want to create a theme for it.

    If you answered yes, you will have these themes already created for you and you can view them under Themes.

    If not, you can create new themes from the tables and view the data.


    siva
  • 10. Re: Import Shapefile in Oracle
    744977 Newbie
    Currently Being Moderated
    My target is do a route calculation (from point to point) with Oracle Spatial.
    Do you know something about this?

    I'm beginner in this field.

    Thank you very much.
  • 11. Re: Import Shapefile in Oracle
    752520 Newbie
    Currently Being Moderated
    Hy
    You can use FME software to transform theme from .shp file to an oracle format and you can do more than for example extracle node of extrimity of each link and more more...
  • 12. Re: Import Shapefile in Oracle
    752520 Newbie
    Currently Being Moderated
    hy
    excuse me it will generate directly result into oracle database that you specify or in an instant client
  • 13. Re: Import Shapefile in Oracle
    Siva Ravada Expert
    Currently Being Moderated
    Check the other question on Oracle Spatial network data model which supports routing.

    siva
  • 14. Re: Import Shapefile in Oracle
    744977 Newbie
    Currently Being Moderated
    Thank you for your suggestion.

    For my target I must use necessarily these shapefile and no other type of files.

    Do you know if is possible to use these shapefile with Oracle Spatial Network Data Model?


    Thank you in advance.
1 2 3 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points