Select to view content in your preferred language

Is it ok to store ST_POLYFROMTEXT in ST_GEOMETRY shape column?

653
3
11-21-2023 07:23 AM
Labels (1)
Bud
by
Esteemed Contributor

Oracle 18; 10.7.1 EGDB; SDE.ST_GEOMETRY

I can create empty features in a polygon FC using ST_GEOMETRY SQL functions:

Bud_1-1700579744448.png

Bud_0-1700579708726.png

--The first feature was created using editing tools in ArcGIS Pro. The feature has shape and geometry. It's a normal polygon; visible in the map.

--The second feature:
insert into infrastr.a_test_fc_2 (objectid, shape) values (
    sde.gdb_util.next_rowid('INFRASTR', 'A_TEST_FC_2'),
    sde.st_polyfromtext('POLYGON EMPTY',26917));
commit;    

--The third feature:
insert into infrastr.a_test_fc_2 (objectid, shape) values (
    sde.gdb_util.next_rowid('INFRASTR', 'A_TEST_FC_2'),
    sde.st_geomfromtext('POLYGON EMPTY',26917));
commit;    

--select objectid,shape from infrastr.a_test_fc_2 order by objectid;


The shapes that I created using SQL INSERTS are being shown differently in SQL Developer than a feature that was created in ArcGIS Pro using editing tools:

  1. ArcGIS Pro editing tools: [SDE.ST_GEOMETRY]
  2. sde.st_polyfromtext():      [SDE.ST_POLYFROMTEXT]
  3. sde.st_geomfromtext():   [SDE.ST_GEOMFROMTEXT]

Will storing shapes as [SDE.ST_POLYFROMTEXT] or [SDE.ST_GEOMFROMTEXT] cause any issues? Or should I somehow convert them to [SDE.ST_GEOMETRY] ?

 Thanks.

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

Are you using this reference guide?

stgeometry_reference.pdf (arcgis.com)


... sort of retired...
0 Kudos
Bud
by
Esteemed Contributor

Thanks for the reminder. I've read that PDF in the past. It seems to have the same content as https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/st-geometry.htm, but in PDF form.

0 Kudos
Bud
by
Esteemed Contributor

In a reply to Create NIL (zero vertex) geometry, I mention that this bug has been updated. It now suggests that we use the st_geometry constructor to convert from subtypes to supertypes. Which seems to work for converting [SDE.ST_POLYFROMTEXT] to [SDE.ST_GEOMETRY].

0 Kudos