Select to view content in your preferred language

sdelayer -o feature_info AND NULL geometries

1117
4
12-05-2012 06:57 AM
WesKing
Deactivated User
Windows 7, Desktop 10.1, Oracle Spatial 11g, ArcSDE 10.0  (all with latest updates)

Please keep in mind during your response that I'm not a system admin or DBA so a simple straight-forward reply might be the best for me.

I've installed ArcSDE Administrator and have been checking some of our feature classes for invalid geometries using sdelayer -o feature_info in Windows CMD.  When running this on a feature class I know has NULL geometries it reported no problems.  Reading the command description it doesn't state specifically that it checks for NULL geometries...is this correct? 

QUESTION - What command do I need to run to check for NULL geometries?

If you can think of anything very basic and helpful for checking geometries in SDE that wasn't mentioned here please feel free to add it in.

Thank you in advance,
Wes
0 Kudos
4 Replies
VinceAngelo
Esri Esteemed Contributor
First off, you seem to be blending two concepts, NULL in the geometry column,
and a NIL geometry.  ArcSDE requires that geometry columns allow NULLs
(that is, no geometry is present).  A NIL is a geometry object with zero vertices
(think of the result of an intersection of non-overlapping [non-touching] circles).
ArcGIS has confused these on occassion as well.

Neither of these cases is invalid (except when a column doesn't permit NIL entity
types, but I can't think of a way to create that situation without hacking flags
in the SDE.LAYERS table), so there aren't any tools to "check" for it.  You can
certainly query for either condition, though, the former with:

SELECT objectid FROM table WHERE geometrycolumn IS NULL

and the latter with more complex SQL (depending on what geometry storage is
in use, the syntax can be different).

What geometry storage are you using (what does 'sdelayer -o describe_long' report)?

- V
0 Kudos
WesKing
Deactivated User
Thank you Vince!  I knew NULL geometries were allowed, but my head wasn't grasping that they wouldn't be reported by this command.  But it's obvious now that you set me straight.

Running the "sdelayer -o describe_long..." command it reports "Layer Type......: In-Line Spatial Type/SDO_GEOMETRY"

There were reasons our developers chose SDO_GEOMETRY over ST_GEOMETRY, but I can't recall what they are at this time.  I've seen many posts recommending ST over SDO...anything you want to say on that topic???

Wes
0 Kudos
VinceAngelo
Esri Esteemed Contributor
I don't believe SDO_GEOMETRY permits 0-vertex geometries, so it might not be possible
to distinguish between nils and NULLs.

I really don't want to wade into the whole "vs." issue, but I can says this:

+ Due to the integer-form compression provided by the ST_GEOMETRY storage model,
equivalent ST_GEOMETRY shapes will be smaller than SDO_GEOMETRY shapes (and those
with a lot of vertices will generally be a lot smaller, though the exact compression is
determined by the distance between the vertices and the magnitude of the xy_scale)

+ SDO_GEOMETRY has a limit on the number of ordinates.  If you have more than half
a million vertices on features, this might be an issue to research.

In the end, every site should evaluate their geometry storage requirements, with respect
to capability, performance, and interoperability.

- V
0 Kudos
WesKing
Deactivated User
Thanks Vince, I appreciate your help.

Wes
0 Kudos