Select to view content in your preferred language

ST_GEOMETRY function in PostgreSQL does not update sde.sde_layers with new extent.

1004
2
06-08-2010 02:02 AM
NikosLefkaditis
Emerging Contributor
I have created a point feature class with ArcCatalog and used ArcMap editing to insert a few features. Then I used direct sql calls to st_geometry() in order to populate this feature class with values i get from a web application interface. The values get inserted to the feature class, but I have discovered that the maxx ,maxy, minx, miny fields of sde.sde_layers do not get updated with new values when I manually insert new points to the table. The new points show up in ArcMap but the full extent function zooms to the extent of the initial points i inserted with ArcMap. Also, when i use the web interface, the respective map service layer that exposes features from the mentioned feature class does not render to the browser unless the extent partly overlaps with the extent of the initial points I inserted through ArcMap.

It seems Oracle works alright. I would like to know if this is some Postgresql specific bug and if there is some better way to update sde.sde_layers than manually finding out the new minx, miny, maxx, maxy from my table and updating.
0 Kudos
2 Replies
VinceAngelo
Esri Esteemed Contributor
It would be quite wasteful to update the layer extent every time a geometry is inserted. 
The layer load utilities generally maintain an envelope of the  newly added features and
update once at the end of loading (and only if it would change the extent).

I usually set my envelope to the full extent at layer creation, so it doesn't get updated
(which also has the side effect of always having the same display extent in ArcCatalog
for all layers). 

The 'sdelayer -o alter' command allows you to set an extent ('-E minx,miny,maxx,maxy')
or calculate one ('-E CALC').  I recommend the former.

- V
0 Kudos
NikosLefkaditis
Emerging Contributor
Thanks a lot for the answer, it helps a lot.
0 Kudos