How do I read a CIRCULARSTRING geometry type in ArcGIS?

1984
5
09-04-2019 01:47 PM
MichaelMorgan4
Occasional Contributor

The background for this is that I have a set of tables in SQL Server (version 2014) that has geometry that is specified in OGC Well-Known Text (WKT) either as a COMPOUNDCURVE or as a CIRCULARSTRING. CompoundCurves just need to be broken out into separate LineStrings and CircularStrings, and I have a SQL function that can manage that in a similar manner to GeometryCollections, so I can ignore those for the time being.

It's the CircularStrings I need to worry about. My understanding is that the current ArcGIS SDE standard (I am using ArcGIS 10.6.1 and ArcPro 2.4.0) does not read the CircularString geometry type ("Invalid Entity Type"), although this was part of the SQL geometry types since 2012. The SDE solution was to create a binary column in tables with curves called GDB_GEOMATTR_DATA, that could supplement the normal Shape column (which is WKT and readable in SQL). The GDB_GEOMATTR_DATA column appears to be proprietary.

The Big Question is this: is there a mechanism to easily convert the CircularString geometry into an SDE readable Shape-Geomattr_data combination? Without resorting to spending yet more money on Data Interop. (because we spend enough on ArcGIS as it stands), or resorting to free solutions (which I should not have to do due to the amount of money we spend on ArcGIS)? Or is there a future plan to read CircularStrings and CompoundCurves (a 7-year-old standard in SQL Spatial) in ArcGIS? Or is there at the **very least** a format doc for the GDB_GEOMATTR_DATA (and if not, why the super-spy top secrecy)?

Thank you all for any assistance.

0 Kudos
5 Replies
JoshuaBixby
MVP Esteemed Contributor

geometry that is specified in OGC Well-Known Text (WKT)

Is that statement meant to imply there is no existing GEOMETRY column in the table?

0 Kudos
MichaelMorgan4
Occasional Contributor

There is a column with an SQL Geometry type of CIRCULARSTRING that I am fairly certain is contained in the OGC standard for Simple Feature Access types, although to be fair, the curve feature types might be an extension to the simple types in OGC. The overarching goal here is if I can read the geometry as text in SQL Server, I should be able to read or translate it in an SDE geodatabase.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Regarding standards, CIRCULARSTRING was/is not part of the OGC standards that comprise "Simple Features."  There were placeholders for CIRCULARSTRING, and some other types, in Simple Feature Access/SQL (SFA-SQL), but it was never defined within those standards.  CIRCULARSTRING is defined in ISO/IEC 13249-3: SQL multimedia and application packages - part 3: spatial (SQL/MM-Spatial).  So, a geometry model can say it is simple feature compliant without supporting CIRCULARSTRING, although more companies are supporting it.

Getting back to technical aspects of this question, my understanding is that you have a SQL Server table with a column of type Geometry.  Are you seeing CIRCULARSTRING when calling .STAsText() or .ToString() on the Geometry column, or do you have another text-based field where some of the rows contain WKT representations containing CIRCULARSTRING?

Additionally, is the database said SQL Server table is in part of a geodatabase?  If so, is the table registered with the geodatabase?

0 Kudos
MichaelMorgan4
Occasional Contributor

CIRCULARSTRING in the Geometry-type column shows up as a result of .STAsText(), along with COMPOUNDCURVEs. I understand that compound curves, like geometry collections, have to be broken up and standardized as one geometry type before being read as a geodatabase. That said, I have not enabled this database as a GDB yet, but I can query tables in ArcCatalog. This table with CIRCULARSTRINGS cannot be queried in Catalog though.

0 Kudos
PaulLohr
Occasional Contributor III

I came across this same issue. I put in a support request with with ESRI, case # 03121376.

I think what we end up with here is tessellated curves in the shape column and true curves (arcs) in the GDB_GEOMATTR_DATA column. I think this is how ESRI software handles the two columns: If GDB_GEOMATTR_DATA contains a value, read that, if not, read the shape column.

Even if this binary data in the GDB_GEOMATTR_DATA column could be converted to a CircularString or CompoundCurve and put into the shape field, would ESRI products be able to read those records?

It would be helpful if we could get at the GDB_GEOMATTR_DATA column with database spatial functions.

References:

https://docs.microsoft.com/en-us/sql/t-sql/spatial-geometry/stgeometrytype-geometry-data-type?view=s...

https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/st-geometrytype.htm

 

0 Kudos