I am using ArcGIS Pro 2.9.5, There is an Enterprise Geodatabase, with a FeatureClass (FC) configured with traditional versioned and WGS84 spatial reference(SR).
Using FME a bunch of features (Set A) were added to a version in the FC, but those features were in a projected SR and were added with out any transformation.
Then, another bunch of features (Set B) were added (using FME) in another version, but this ones were in WGS84.
When I try to visualize the Set B in a map, no features are displayed, if I check the AttributeTable, the rows are shown, but if I select a row, and try to zoom to it, the zoom works, in some versions, if I try to flash the row, it works. but the feature per se is not displayed with the selected symbol.
if I check the extend of the FC, I get:
XMin (Left) | -45.637716 |
XMax (Right) | 457831.014000 |
YMin (Bottom) | -23.808435 |
YMax (Top) | 7380637.447000 |
name (Geographic Coordinate System) | GCS_WGS_1984 |
factoryCode (WKID) | 4326 |
angularUnitName (Angular Unit) | Degree |
datumName (Datum) | D_WGS_1984 |
Despite the fact I deleted the version with the non-valid features, Set A, the extent remains the same. Moreover, I tried to use the tool RecalculateFeatureClassExtent the extent remains the same.
If I create a new version and manually create features, they are drawn in the map.
If I export the features in Set B to a FileGeodatabase, the features are well exported, and the result FC is shown in the map.
If I tried to import another bunch of features (Set C) using FME in another version, the features shows the same problematic behavior described above.
In some point the FC was deleted and recreated, it start working again, and showing the data in the map; but again, when the Set A were added, the odd behavior appear.
Is there a way to fix the FC without recreating it?
Is there a way to fix the versions??
I receive any suggestion.
[EDIT 1]
After a good amount of hours I found that the culprit is not FME. I was able to reproduce the behavior only using ArcGIS Pro:
import arcpy
wkt = "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],\
PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];\
-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119522E-09;\
0.001;0.001;IsHighPrecision"
myFgdb = r"c:\temp\Default.gdb"
sr = arcpy.SpatialReference(text=wkt)
arcpy.env.workspace = r"c:\temp"
foo = arcpy.management.CreateFeatureclass(myFgdb, "PointsWGS84", geometry_type="POINT", spatial_reference = sr)
# Creation of the point waaaaaaaaaay to far from the "boundaries" of WGS84
with arcpy.da.InsertCursor(r"c:\temp\Default.gdb\PointsWGS84", ["Shape@"]) as cur:
myPoint = arcpy.Point(459111.6681, 5010433.1285)
myArray = arcpy.Array([myPoint])
cur.insertRow(myArray)
del cur
desc = arcpy.da.Describe(foo)
print(desc["extent"])
# Creation of a point in the west side of the prime meridian
with arcpy.da.InsertCursor(r"c:\temp\Default.gdb\PointsWGS84", ["Shape@"]) as cur:
myPoint = arcpy.Point(-45.9111, 23.84006637)
myArray = arcpy.Array([myPoint])
cur.insertRow(myArray)
del cur
if you run the snippet above, you will get a layer, open the attribute table and try to flash/zoom the second point. you will see no point.
I tried to edit the point: just editing the vertices, but i did no modified per-se the values, just click and enter, then proceed to save the changes:
Now the point is visible.
I am not able to see the the real change in the table/FC (I have a lack of knowledge), but then I made the same operation in my Enterprise Geodatabase (There I now how to really know the stored value), and check the values after I changed some of my 13 features:
As you can see the non changed values have negative values for X value, the changed ones under the sheets where modified by the addition of 360, but in ArcGIS Pro, the number appear as 27.415 W