Skip to main content

Hi,

I am trying to migrate data from our GeoDatabase (SQL Server), to native SQL Server Spatial but cannot get Spatial to write polygons. As you know ESRI store polygons as simple features, and cannot store it as Curved Polygon

How can you write it as a polygon

SQL Server spatial store, example below

CURVEPOLYGON (COMPOUNDCURVE ((321812.2796 5810770.8994, 321768.84219999984 5810777.0451, 321768.86170000024 5810777.1837, 321775.38910000026 5810823.4657, 321767.89279999956 5810842.0508, 321778.49299999978 5810846.3264, 321779.66550000012 5810854.6341, 321779.69000000041 5810854.6436, 321812.2796 5810770.8994)))

I have tried the geometryExtractor and geometryReplacer, but the final result is not 100% curved (arc), and is just a set a straight lines

The example you have pasted represents a polygon whose boundary is a path consisting of only a single LINESTRING part. It contains no arc (CIRCULARSTRING) parts. I think the GeometryReplacer could create the correct geometry from the example.

 

 


"As you know ESRI store polygons as simple features, and cannot store it as Curved Polygon"

I'm not sure I understand. ArcGIS is perfectly capable of storing polygons or lines containing curve segments.


"As you know ESRI store polygons as simple features, and cannot store it as Curved Polygon"

I'm not sure I understand. ArcGIS is perfectly capable of storing polygons or lines containing curve segments.

Unfortunately ArcGis stored it as simple feature, and cannot stored a curved polygon. It is stored as multiple points on the curve or arc

 

http://desktop.arcgis.com/en/arcmap/10.3/manage-data/gdbs-in-sql-server/data-types-sqlserver.htm

 

For version up to 10.6

 


The example you have pasted represents a polygon whose boundary is a path consisting of only a single LINESTRING part. It contains no arc (CIRCULARSTRING) parts. I think the GeometryReplacer could create the correct geometry from the example.

 

 

GeometryReplacer does not work. The curve is stored as multiple lines on the curve.

All I want is to store it in SQL Server spatial the same as it is stored in ArcGis Geodatabase (which is underlying also SQL server spatial)


@david_r or @rudy_v Did you have a suggestion on how to force it to use only polygon or multi-polygon instead? I'm experiencing the same problem.


@david_r or @rudy_v Did you have a suggestion on how to force it to use only polygon or multi-polygon instead? I'm experiencing the same problem.

Not sure I understand: Do you want to convert any arcs and curves to stroked polylines?

 

If so, you can use the ArcStroker followed by the GeometryRefiner.
Unfortunately ArcGis stored it as simple feature, and cannot stored a curved polygon. It is stored as multiple points on the curve or arc

 

http://desktop.arcgis.com/en/arcmap/10.3/manage-data/gdbs-in-sql-server/data-types-sqlserver.htm

 

For version up to 10.6

 

Sorry for the late reply. But as the article states, this depends on the geometry storage type. There are ArcGIS curves/arcs that cannot be properly stored in a GEOMETRY datatype, that's why the default behavior in ArcGIS is to store any geometries containing curves/arcs twice: a simplified (stroked) version in the GEOMETRY column and the "full" version using an ESRI proprietary storage format in either a side table or, starting with ArcGIS 10.5, in a BLOB attribute GDB_GEOMATTR_DATA.

 

This is why you'll need to use an ArcGIS reader to access the arc geometry, if you use the SQL Server Spatial reader you'll only be able to read the stroked geometry.

Reply