Archive for the ‘Uncategorized’ Category

shp2sde.exe does not allow import layers without any features

June 8, 2007

When importing empty layer, command shp2sde (8.3 version) complains something like this: “The shapefile in it’s entirety exceedes valid coordinate range”. The workaround is: add a dummy feature in ArcMap to this empty shapefile, and delete it later from the database manager. Hope it helps.

deleting SDE layers in MS SQL, let’s click!

June 1, 2007

OK, it is about ESRI, but in real world we often have to work with commercial sw.  For example, I am working with SDE 8.2, upon an MS SQL 2000. Here, when I want to delete a layer from a databse, I use sdelayer command.

sdelayer -o delete -l spatialtable,Shape -i 5151 -s host -D db -u user -p pass

However, this command does not delete all the layer (!) . Reason: since you are forced to specify a column i the -l option, only this “Shape” spatial column registrys are deleted (from internal SDE database and shape tables). The rest of data remains. You have to remove them manually by clicking – this explains the title.

Note: I am no expert on ESRi, there can be some other commands. Let me know in this case.