7 Replies Latest reply: Nov 27, 2013 4:02 AM by don123 RSS



      hi experts


      I am using shp2sdo utility to load shape files to oracle spatial.

      I have used parameter -f to get precision of geometry as 10 digits.

      Can I go beyond 10 digits ?

      I have tried as below to increase to 16 digits, but it is generating only 10 digits.

      Any suggestions ??


      shp2sdo states states -g geometry -d -x (-180,180) -y (-90,90) -s 8307 -t 0.05 -v -f 16



        • 1. Re: shp2sdo
          Herald ten Dam



          here is the link to the readme: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/using-shp2sdo-134890.txt


          In this it states as option for "-f" that: "-f                  - Write geometry data with 10 digits of precision

                                                             if not specified, 6 digits of precision is used"


          So, it can't go beyond 10 digits of precision


          Herald ten Dam

          • 2. Re: shp2sdo



            Thanks for your reply.

            I have seen that txt file on how to use shp2sdo but interested to know if there is any way.

            I have also used SQL developer to take the precision up to 12 digits while migrating shape files.



            • 3. Re: shp2sdo


              Have you tried other shape importers like the java utility offered by oracle:

              Loading ESRI Shapefiles into Spatial and Graph

              Or the Georaptor opensource project


              • 4. Re: shp2sdo
                Siva Ravada

                Don't use this shp2sdo tool which is deprecated.

                There is a new Java version that will do the job for you.


                You need to use the $ORACLE_HOME/md/jlib/sdoutl.jar for this:


                Here is an example of how to use this tool (with


                setenv CLASSPATH ${CLASSPATH}:/private1/software/11gR203/dbhome_1/md/jlib/sdoutil.jar:/private1/software/11gR203/dbhome_1/md/jlib/sdoapi.jar


                setenv clpath $ORACLE_HOME/jdbc/lib/ojdbc5.jar:$ORACLE_HOME/md/jlib/sdoutl.jar:$ORACLE_HOME/md/jlib/sdoapi.jar


                java -cp $CLASSPATH  oracle.spatial.util.SampleShapefileToJGeomFeature -h localhost  -p  PORT -s SID -u USER_NAME -d PASSWORD -t TABLE_TO_HOLD_DATA  -r 8307 -g GEOMETRY_COLUMN_NAME

                • 5. Re: shp2sdo

                  Thanks Siva, I have tried that Java shape file converter.


                  (1) In shp2sdo, we need to use SQLLDR which provides log file and bad file to know loading failures. Can we get log file and bad file with Java utility, Can we pass the precision parameter of geometry column ?



                  • 6. Re: shp2sdo
                    Siva Ravada

                    With the java tool, there is no way to specify the precision parameter.

                    You need to do this on the database after the data is loaded.


                    It prints out a log to stdout if there are records that have errors. So you should see a log of errors if there are some bad

                    records in the shapefile.

                    • 7. Re: shp2sdo

                      I dont know how to see log in stdout, where it is located ? working with Oracle 11g on Redhat Linux 5.
                      Can you help me....