English

Error: ArcSDE Java API: The specified coordinate exceeds the valid coordinate range

Error Message

When executing an ArcSDE Java application programming interface (API) program that performs operations with ArcSDE shape objects, the following error is returned:

"coordinate exceeds the valid coordinate range"

Cause

The value of one of the data's coordinates falls outside the valid x,y coordinate range.

The ArcSDE Java API's SeShape class represents the shape data type used by ArcSDE. To be able to insert and update shapes in ArcSDE, each shape object must be associated with a coordinate reference. When a new SeShape object is created, its coordinate reference must also be defined. The coordinate reference defines a shape's falseX, falseY, and xy unit.

All two-dimensional shapes are represented by a set of x and y coordinates. These coordinates can have any value: integer or floating point and positive or negative. However, ArcSDE can only store nonnegative integer x and y coordinate values internally.

When storing shapes with negative coordinates, ArcSDE converts all the negative values to positive by subtracting a fixed offset value. There are two offset values: the X offset, or falseX, for the x coordinates and the Y offset, or falseY, for the y coordinate values.

Also, any floating point value needs to be multiplied by a fixed scale factor to convert it to an integer value before it can be stored in ArcSDE. If not, the part of the coordinate value after the decimal point is lost. The fixed scale factor used is called the XY unit or XY scale factor.

The coordinate reference defines a fixed range for valid x and y coordinates. If the value of any coordinate specified falls out of this range when creating a new SeShape object, the error is returned.

To find out if a coordinate is within the valid range, compute the x and y values:

X value = (X coordinate - falseX)*xyUnit
Y value = (Y coordinate - falseY)*xyUnit

To be valid, both values must be nonnegative and less than the maximum value allowed for the integer data type: 2147483647.

Solution or Workaround

If the x and y values computed are negative, decrease the falseX or falseY values until the computed x and y values are nonnegative.

If the x and y values computed are greater than 2147483647, decrease the xy unit.