Error: The feature's geometry could not be modified, invalid geometry
Deleting the vertex at the endpoint of a complex edge can lead to the following error:
"The feature's geometry could not be modified, invalid geometry."
This is generally due to the fact that the next vertex in the complex edge feature has a junction connected to it at mid-span.
By default, edge features in the geometric network have a 1:1 ratio between the geometric and logical networks. This means that every edge feature has at least 1 Element ID in the logical network. While this statement always applies to simple edges, it may not always apply to complex edges.
Complex edges have mid-span connectivity, which means junctions can be connected along the length of a complex edge, without splitting the complex edge feature itself. Mid-span connectivity causes the complex edge to be logically split into subsections in the logical network. For example, if the edge feature corresponded to one edge element in the logical network before a junction was connected, the edge feature will correspond to two edge elements in the logical network after a juction is connected.
The following example from the ArcGIS Desktop Help demonstrates this concept. Water Main 'e1' has 2 Service Taps connected at mid-span. In the logical network, Water Main 'e1' has 3 associated Edge Element IDs: 10, 11 and 12.
Complex Edge Features: Geometric Network vs Logical Network
Logical Network Element IDs cannot be associated with zero-length or empty geometries; this applies to Element IDs associated with an entire network feature or with a subsection of a complex edge. The violation of this rule during the edit is what raises the error message when the edit is finished.
Solution or Workaround
Use the Disconnect command on the edge prior to deleting the end vertex, and use the Connect command on the edge once the edit is complete. The Disconnect command disconnects the edge feature from connected edges and junctions, including the mid-span junctions. When the edge feature is disconnected, it no longer has any mid-span connectivity and therefore is not logically split in the logical network, meaning it only has one Edge Element ID. This allows the end vertex to be deleted without associating an empty geometry to an Element ID.
Once the edit is complete, the edge feature should have correct connectivity at its endpoints; however, the mid-span connectivity is not re-established. The use of the Connect command after the edit re-establishes all mid-span connectivity in the edge feature.