Feature Service on 2D polyline. Error: "The geometry is not Z-aware"

3245
3
09-07-2012 12:28 AM
GertConradie
Occasional Contributor
Hi

On ArcGIS 10.1, I'm using the the 'Featire Service' capabilities to add, change & delete features on point & line feature classes.

On 2D points points I can sucessfully do all 3 actions.

The problem is when I do the same on a 2D polyline that is NOT z-aware. (This is confirmed when browsing the feature service endpoint.) When submiting a 'addfeature' request via the ArcGIS web test interface, I keep on getting a error message "Unable to complete operation. The geometry is not Z-aware" From the (documentation ) it states "You can edit and delete features that have z-values."  When I create a feature class that is z-aware, I can edit it.

Does that mean I can't edit none-Z-aware feature classes? The geometry documentation make me assume that I should be able to do it.

I did try things like adding default z values in the feature service capabilities, adding a z value in my geometry JSON, but no change in the message.

Anny feedback would be much appreciated.

The JSON I use are:
[
{
"geometry":
{
"hasZ" : false,
"hasM" : false,
"paths":[[
[504341,798781],
[504192,799065],
[505341,795781]
]]
}
,"attributes":{}
}
]
Tags (2)
0 Kudos
3 Replies
KeG
by
New Contributor II
I'm seeing this as well. My data is not z-aware and i have no required fields. yet i get this message when trying to add via the rest endpoint. oddly, if i have no attribute tag in the AddFeature request then it does work.
This is the error i see in the ags logs:

Database error: The field is not nullable. [SHAPE_STLength__]. The geometry is not Z-aware.
0 Kudos
ThomasCoopman
New Contributor II

I had the same problem, but I had a date field that was incorrect.

0 Kudos
ChristopherMoravec1
New Contributor II

I had this problem as well, it turns out that I had used another layer as a "template" when creating this layer, and it copied the Shape.STLength() field to Shape_STLength__.  I was doing this in a python script so I just did a quick test to see if the Length or Area columns got copied funny and if they did remove them.  The Shape_STLength__ (and Shape_STArea__) field is not used by anything, it just causes grief.

The real field Shape.STLength() is not actually a field in the database just a pointer to the length of the actual shape column.

0 Kudos