Select to view content in your preferred language

Enterprise Geodatabase Connection Feature Geometry Invisible in ArcGIS Pro

2615
8
Jump to solution
02-01-2023 02:27 PM
Zartico-GIS
Occasional Contributor

I have a database connection made to my PostgreSQL Enterprise Geodatabase through ArcGIS Pro.

I am connected to the database as a user other than sde, and trying to see features of a feature class under that corresponding user's schema.

When I add the layer to the map:

  1. I can "zoom to" the feature and the map zooms to it
  2. I can "flash" and it flashes its centroid on the screen
  3. I can see all the attributes
  4. I cannot see any feature geometry through the map. It appears invisible.

Interesting Notes:

  • When I export the FC from the EGDB to a local FGDB the feature is visible
  • When I have an active edit session on the direct EGDB connection layer through ArcPro the feature DOES become visible.

 

Anyone know what's going on here?

 

ArcGIS Pro 3.0 and Postgres 13.x, ST_Geometry spatial type, Shape polygon. It was originally inserted into the feature class via SQL of inserting a WKT representation into Esri's shape field.

0 Kudos
1 Solution

Accepted Solutions
Zartico-GIS
Occasional Contributor

Hi Marcelo,

  1. I deleted and created a new spatial index on the layer
  2. Recalculated spatial index on the layer
  3. Closed and reopened/reconnected DB

None of these worked.

I then exported to local and then imported back into the Enterprise Geodatabase. Now the layer is visible in the map view direct from the db connection.

With this behavior in mind, what could be the reason it isn't showing up? Potentially a cast or st_<function> is required during the PostgreSQL insert? 

EDIT

I compared the layer source properties between the visible and invisible DB connection feature classes. (Image attached).

The only differences I see are the under Storage and the extent. 

The invisible lists a SRID 0 and the visible has the appropriate SRID 4326. Yet both have the spatial reference set to WGS84...

 

Answer: What I needed to do was specific an SRID at the insert. I thought it was defaulted to 4326, and that was the FC spatial reference was that I was inserting into. Geometry now visible upon new inserts.

View solution in original post

0 Kudos
8 Replies
MarceloMarques
Esri Regular Contributor

you need to rebuild the Spatial Index on the Featureclass in PostgreSQL, this shall fix the issue.

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Database Certified Professional | "In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 32 years, my passion for GIS has only grown stronger." | “ I do not fear computers. I fear the lack of them." Isaac Isimov |
Zartico-GIS
Occasional Contributor

Thank you for the quick reply. So, I need to rebuild the spatial index even though the feature class properties via ArcGIS Pro Catalog says it has one? 

 

FYI -- The layer was originally created via Catalog, then populated via SQL inserts.

 

sindex.png

0 Kudos
MarceloMarques
Esri Regular Contributor

Yes, you must rebuild the spatial index even if the featureclass properties shows it has a valid one, click delete first then click create in the dialog for the spatial index under the featureclass properties window.

support.esri.com
Problem: Features from a feature class do not display when zooming or panning in layout view (esri.c...

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Database Certified Professional | "In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 32 years, my passion for GIS has only grown stronger." | “ I do not fear computers. I fear the lack of them." Isaac Isimov |
Zartico-GIS
Occasional Contributor

I deleted the existing and created a new one and am still having the same behavior. This was done through ArcGIS Pro Catalog. I have also tried Recalculating it. It doesn't work. Does it need to be done elsewhere?

0 Kudos
MarceloMarques
Esri Regular Contributor

You must close Pro and re-open, then create a new map document, add the PostgreSQL featureclass to a new map and see if it displays fine this time.

You can also try to copy the PostgreSQL Featureclass to a file geodatabase, then check if the data displays fine from the file geodatabase, then copy the featureclass from the file geodatabase into the PostgreSQL geodatabase and see if the data displays fine, don't forget to close/open Pro. You cannot disconnect from the PostgreSQL geodatabase in Pro, this ArcMap feature is not available in Pro yet, and the Pro refresh option might not work as you expect therefore close/open Pro again to make sure the connection to the PostgreSQL geodatabase is refreshed properly.

This will help to narrow down where the problem might be and if the existing PostgreSQL Featureclass that does not display the data has any other issue.

Also, check the coordinates system properties, resolution and domain extent (max / min x,y boundary), you might have features beyond the extent and that needs to be adjusted, either delete those features or change the featureclass extent, this is known to cause issues to draw the featureclass data even when you have a valid spatial index created.

Recalculate Feature Class Extent (Data Management)—ArcMap | Documentation (arcgis.com)

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Database Certified Professional | "In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 32 years, my passion for GIS has only grown stronger." | “ I do not fear computers. I fear the lack of them." Isaac Isimov |
Zartico-GIS
Occasional Contributor

Hi Marcelo,

  1. I deleted and created a new spatial index on the layer
  2. Recalculated spatial index on the layer
  3. Closed and reopened/reconnected DB

None of these worked.

I then exported to local and then imported back into the Enterprise Geodatabase. Now the layer is visible in the map view direct from the db connection.

With this behavior in mind, what could be the reason it isn't showing up? Potentially a cast or st_<function> is required during the PostgreSQL insert? 

EDIT

I compared the layer source properties between the visible and invisible DB connection feature classes. (Image attached).

The only differences I see are the under Storage and the extent. 

The invisible lists a SRID 0 and the visible has the appropriate SRID 4326. Yet both have the spatial reference set to WGS84...

 

Answer: What I needed to do was specific an SRID at the insert. I thought it was defaulted to 4326, and that was the FC spatial reference was that I was inserting into. Geometry now visible upon new inserts.

0 Kudos
MarceloMarques
Esri Regular Contributor

@Zartico-GIS  

I am glad you figure out the problem.

"What I needed to do was specific an SRID at the insert. I thought it was defaulted to 4326, and that was the FC spatial reference was that I was inserting into. Geometry now visible upon new inserts."

Indeed, in the screenshot from your last reply, the "extent" is different.

The "projection" is the same WGS 1984 - WKID 4326.

But the "storage" parameter is different, the featureclass that displays the data shows st_geometry SRID 4326 and the featureclass that does not display the data shows st_geometry SRID 0.

Indeed, you must inform the SRID 4326 at the insert otherwise it gets SRID 0.

You could try to recalculate the extent for the featureclass that does not display to see if that makes a difference.

Recalculate Feature Class Extent (Data Management)—ArcMap | Documentation (arcgis.com)
Recalculate Feature Class Extent (Data Management)—ArcGIS Pro | Documentation

You should also check for invalid geometries in the featureclass that does display the data, just in case.
Check Geometry—ArcGIS Pro | Documentation

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Database Certified Professional | "In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 32 years, my passion for GIS has only grown stronger." | “ I do not fear computers. I fear the lack of them." Isaac Isimov |
Geosapient
New Contributor

I had the issue where I was inserting null:geometry values instead of null:geography values. which caused the view I was creating to display, but when I copied the view to a feature class, it would fail after the first errant null "geometry" and not copy properly.

0 Kudos