Create Nil geometry using editing tools

703
10
11-08-2023 09:46 AM
Status: Open
Labels (1)
Bud
by
Notable Contributor

ArcGIS Pro 2.6.8; Oracle 18c; 10.7.1 EGDB; SDE.ST_GEOMETRY


The following are valid states for features:

  1. Has shape and geometry. Normal polygon; visible in the map.
  2. Has shape and geometry, but geometry is NIL/zero vertex.
  3. Has shape, but geometry is null.
  4. The shape field is completely null.

I want to change an existing state 1 feature to state 2 (remove the vertices). Or, create a state 2 feature from scratch.

Use cases:

It would be helpful to have a way to create state 2 geometries using the UI/editing tools. I'm not aware of a way to do that using current functionality.

Thanks. 

10 Comments
Scott_Harris
Status changed to: Needs Clarification

@Bud 

Will this work?:

1. Add a new row to the attribute table (this will have null geometry)

Scott_Harris_1-1699466385531.png

2. Editor Settings > Field Mapping > set Target and Source to the same layer (the one you want to transfer null geometry)

3. Match only the Shape fields > OK

Scott_Harris_0-1699466271244.png

4. Select the feature with geometry AND the feature without geometry (from the attribute table)

5. Open the Attributes pane.

6. Right click on the feature with null geometry > Copy Attributes

Scott_Harris_2-1699466425668.png

 

7. Right click on the feature with geometry > Paste Attributes > Apply

Scott_Harris_3-1699466443559.png

 

 

 

Bud
by

@Scott_Harris 

I'm having trouble at step #7. The apply button is greyed out.

Video:

Are you testing with an Oracle enterprise geodatabase? If so, can you use a SQL client like SQL Developer to show us what the SHAPE value looks like for the feature you say is now a Nil geometry?

I want to make sure it is state 2 "Has shape and geometry, but geometry is NIL", not state 4 "The shape field is completely null."

In SQL Developer, it should look like this:

Bud_0-1699475195635.png

Not this:

Bud_1-1699475280138.png

Thanks!

Scott_Harris

@Bud I see red boxes on your shape fields - to me, that means attribute validation (maybe?) is preventing null geometry. Try unchecking this Editing option temporarily:

Scott_Harris_0-1699485252743.png

If that doesn't work for you, I'll try it in Oracle and see what I see.

Scott_Harris

@Bud Now that I've re-read your other posts, I don't think it's currently possible to create or modify a feature to get it into state 2 that you describe.

I'll keep this open for others to vote/comment though.

Scott_Harris
Status changed to: Open
 
Bud
by

@Scott_Harris Sounds good. Should we delete our Attribute Pane comments, to keep things tidy/avoid confusion?

Scott_Harris

@Bud the suggestion I made about copying and pasting just geometry might be helpful to someone that stumbles upon it. Searching for GIS related keywords is funny like that 😉

Bud
by

@Scott_Harris For what it’s worth, if someone wants to set an existing feature’s SHAPE to Null, they can use the field calculator in the attribute table by setting the SHAPE field to None (None being Python's word for null).

https://community.esri.com/t5/arcgis-pro-ideas/display-null-shape-as-lt-null-gt-in-the-attribute/idi...

Bud
by

Here are some Esri Support cases where it would have been helpful to create nil geometries using editing tools for testing purposes:

Esri Case #03490768 - Database view on feature with nil geometry hangs when added to map

Esri Case #03491474 - Is it ok to store ST_POLYFROMTEXT in ST_GEOMETRY shape column?

While I was able to create nil geometries using SQL INSERTs, it would have been better to do it using editing tools in the UI. Otherwise, I was never really convinced that I was creating the ST_GEOMETRY features properly using SQL, since that's notoriously buggy. https://support.esri.com/en-us/knowledge-base/bug-unable-to-define-a-query-layer-in-arcgis-where-the... 

Scott_Harris

Thanks for providing your use cases @Bud