Tuesday 18 November 2014

ArcCatalog Error: This Feature already Exists


Sometimes you want to import new Feature class or rename a feature class in ArcCatalog/ArcMap but you can't do and an error appears that this names is already used but you cant see it in the list of features in the Catalog Tree, so where is this Feature!!!!

The Solution:


  • Open SQL Developer
  • log-in in SDE schema 
  • Open "GDB_ITEMS" Table and find the record which contains the name in "Name" field
  • Delete the record and commit

Enjoy 
 

Reuse Oracle Spatial Styles and themes

After you create Your styles and themes on a server and you want to use them on another server, follow the following procedure

Log-in to your user
  •  run the following scripts depending on you user 
         create table my_user_sdo_geom_metadata as select * from user_sdo_geom_metadata;
         create table my_user_sdo_styles as select * from user_sdo_styles;
         create table my_user_sdo_themes as select * from user_sdo_themes ;
         create table my_user_sdo_maps as select * from user_sdo_maps;
         create table my_user_sdo_cached_maps as select * from user_sdo_cached_maps;
        create table my_user_sdo_geor_sysdata as select * from user_sdo_geor_sysdata;

Now Log-in as sysdba and do the following
  • To pick a directory from all directories in your DB use the following scrip
select * from all_directories;
  • Grant the user to access the selected directory and also grant it to use remap 
GRANT READ, WRITE ON DIRECTORY EXP_DIR TO GIS_B
grant imp_full_database to gis_v1;
Now open The command prompt (cmd) as Admin and do the following
  • Run the following script and don't type ";" at the end
expdp gis_coding/gis_coding@ora11g tables=my_user_sdo_cached_maps,my_user_sdo_geom_metadata,my_user_sdo_geor_sysdata, my_user_sdo_maps,my_user_sdo_styles,my_user_sdo_themes directory=EXP_DIR dumpfile=stylesAndThemes.dmp logfile=stylesAndThemes.log
Now you have dump file contains your styles and themes, copy it to a database directory on the destination Server
  •  Repeat the granting step -look at the top of this document- to the new schem; which you want to move the data to it
Now open command prompt
  • Run the following script , and don't type ";" at the end
impdp gis_coding/gis_coding@ora11g  directory=EXP_DIR dumpfile=stylesAndThemes.dmp logfile=stylesAndThemesIMP.log REMAP_SCHEMA=gis_coding:gis_coding
Now log-in to your new schema which you imported the data in it

  •  Run the insert statement to insert all or specific data into "user_sdo_styles" or "user_sdo_themes" 

Enjoy 

Export Shape files from ArcCatalog in UTF-8 encoding

When you Export feature class which contain Arabic Texts to shape file the Arabic texts appears as "??????????", to avoid this problem and to get the correct conversion follow the following steps and see the screenshots


  1. Open regedit from Search in Win8/grater or from run in win7/less
  2. go to HKEY_CURRENT_USER\Software\ESRI\Desktop10.2
  3. If there is no key named "Common" create it and create a new key inside it as "CodePage"
  4. Create a new String Value and name it "dbfDefault" 
  5. Put "UTF-8" value of the Value Data 
Enjoy 




Saturday 8 November 2014

ESRI Raster geoimage to tiff format

To export the geo-image to other format like tiff follow the steps in the following screenshots