Skip to main content
Solved

Number of parts in shape is incorrect for its geometry type


ingalla
Contributor
Forum|alt.badge.img+10

Hello

 

I am trying to write some polygon data from a csv file which contains the geometry data to an esri sde database, all the conversion is fine until i come to write the data when i get the error below. It says that the Number of parts in shape is incorrect for its geometry type. What does this actually mean. The data is building a polygon, which it does. I have added in a geometry filter to get the areas and polygons followed by a geometry coercer set to fme_polygon...

 

Any ideas how to fix this or what could be wrong??

 

Error while updating feature in the table/feature class 'OS_NGD_BLD_FTS_BUILDINGPART'. The error number from ArcObjects is: '-2147215922'. The error message from ArcObjects is: {Number of parts in shape is incorrect for its geometry type}

Storing feature(s) to FME feature store file `\\\\dnfme01\\FMEWorkbench\\Workspaces\\Ordnance Survey\\National Geospatial Database\\OS NGD Buildings Daily Update_log.ffs'

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Feature Type: `OS_NGD_BLD_FTS_BUILDINGPART'

Attribute(32 bit real)       : `absoluteheightmaximum' has value `107.5'

Attribute(32 bit real)       : `absoluteheightminimum' has value `101.51'

Attribute(32 bit real)       : `absoluteheightroofbase' has value `104.53'

Attribute(string: windows-1252)  : `associatedstructure' is <null>

Attribute(string: windows-1252)  : `capturespecification' has value `Urban'

Attribute(string: windows-1252)  : `changetype' has value `New'

Attribute(64 bit unsigned integer) : `csv_line_number' has value `4610'

Attribute(32 bit unsigned integer) : `csv_number_of_fields' has value `39'

Attribute(32 bit unsigned integer) : `csv_total_number_of_columns' has value `40'

Attribute(string: windows-1252)  : `description' has value `Building'

Attribute(string: windows-1252)  : `description_evidencedate' has value `19940804'

Attribute(string: windows-1252)  : `description_source' has value `Ordnance Survey'

Attribute(string: windows-1252)  : `description_updatedate' has value `19940804'

Attribute(string: windows-1252)  : `firstdigitalcapturedate' has value `19940804'

Attribute(string: UTF-8)      : `fme_db_operation' has value `UPSERT'

Attribute(string: UTF-8)      : `fme_feature_type' has value `CSV'

Attribute(string: UTF-8)      : `fme_geometry' has value `fme_polygon'

Attribute(entangled: string: UTF-8): `fme_type' has value `fme_area'

     entangled to geodb_type

Attribute(64 bit integer)     : `geodb_oid' has value `1'

Attribute(string: UTF-8)      : `geodb_type' has value `geodb_polygon'

Attribute(64 bit real)       : `geometry_area' has value `95.421825'

Attribute(string: windows-1252)  : `geometry_evidencedate' has value `20160823'

Attribute(string: windows-1252)  : `geometry_source' has value `Ordnance Survey'

Attribute(string: windows-1252)  : `geometry_updatedate' has value `20180412'

Attribute(string: windows-1252)  : `height_evidencedate' has value `20220417'

Attribute(string: windows-1252)  : `height_source' has value `Ordnance Survey'

Attribute(string: windows-1252)  : `height_updatedate' has value `20220824'

Attribute(string: windows-1252)  : `heightconfidencelevel' has value `Not Assessed'

Attribute(32 bit unsigned integer) : `isobscured' has value `0'

Attribute(32 bit integer)     : `multi_reader_full_id' has value `1'

Attribute(32 bit integer)     : `multi_reader_id' has value `1'

Attribute(string: UTF-8)      : `multi_reader_keyword' has value `CSV2_1'

Attribute(string: UTF-8)      : `multi_reader_type' has value `CSV2'

Attribute(32 bit unsigned integer) : `multi_writer_id' has value `0'

Attribute(string: windows-1252)  : `osid' has value `ccddf186-e99b-46b5-b6fd-416b8aac0b84'

Attribute(string: windows-1252)  : `oslandcover_evidencedate' has value `19940804'

Attribute(string: windows-1252)  : `oslandcover_source' has value `Ordnance Survey'

Attribute(string: windows-1252)  : `oslandcover_updatedate' has value `19940804'

Attribute(string: windows-1252)  : `oslandcovertiera' has value `Constructed'

Attribute(string: windows-1252)  : `oslandcovertierb' has value `Building'

Attribute(string: windows-1252)  : `oslanduse_evidencedate' has value `19940804'

Attribute(string: windows-1252)  : `oslanduse_source' has value `Ordnance Survey'

Attribute(string: windows-1252)  : `oslanduse_updatedate' has value `19940804'

Attribute(string: windows-1252)  : `oslandusetiera' has value `Residential Accommodation'

Attribute(string: windows-1252)  : `oslandusetierb' has value `Private Residence'

Attribute(string: windows-1252)  : `physicallevel' has value `Surface Level'

Attribute(32 bit real)       : `relativeheightmaximum' has value `5.99'

Attribute(32 bit real)       : `relativeheightroofbase' has value `3.02'

Attribute(string: windows-1252)  : `theme' has value `Buildings'

Attribute(string: windows-1252)  : `toid' has value `osgb1000014460052'

Attribute(string: windows-1252)  : `versionavailablefromdate' has value `20220827000000+00:00'

Attribute(string: windows-1252)  : `versionavailabletodate' has value `20230321235959+00:00'

Attribute(string: windows-1252)  : `versiondate' has value `20220826'

Coordinate System: `EPSG:27700'

Geometry Type: IFMEPolygon

Boundary:

  Geometry Type: IFMELine

  Number of Coordinates: 4 -- Coordinate Dimension: 2

  (482389.1,144658.55)(482387.44103171496,144656.07998055348)(482387.441,144656.08)(482389.1,144658.55)

===========================================================================

GEODATABASE_SDE writer: An error has occurred. Check the logfile above for details

An error has occurred. Check the logfile above for details

Best answer by nielsgerrits

The geometry is a line going back and forth without an area, which is not valid in SDE for geometrytype polygon.

Also, the 2nd and 3rd coordinate are almost the same. In SDE coordinates are not floats but "fixed" coordinates on a grid. This means the coordinates are snapped to the same point, generating a duplicate consecutive point.

View original
Did this help you find an answer to your question?

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • March 22, 2023

The geometry is a line going back and forth without an area, which is not valid in SDE for geometrytype polygon.

Also, the 2nd and 3rd coordinate are almost the same. In SDE coordinates are not floats but "fixed" coordinates on a grid. This means the coordinates are snapped to the same point, generating a duplicate consecutive point.


ingalla
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • March 22, 2023
nielsgerrits wrote:

The geometry is a line going back and forth without an area, which is not valid in SDE for geometrytype polygon.

Also, the 2nd and 3rd coordinate are almost the same. In SDE coordinates are not floats but "fixed" coordinates on a grid. This means the coordinates are snapped to the same point, generating a duplicate consecutive point.

That now makes sense, any idea on the best way of fixing this??


david_r
Celebrity
  • March 22, 2023

The second and third coordinates seem very close and, depending on your feature class tolerance, might end up collapsed into a single vertex in the database, rendering the polygon invalid.

See also here:

https://community.safe.com/s/question/0D54Q000080hffpSAA/error-message-when-writing-lines-to-sde-the-error-number-from-arcobjects-is-2147215922-the-error-message-from-arcobjects-is-number-of-parts-in-shape-is-incorrect-for-its-geometry-type


ingalla
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • March 22, 2023
david_r wrote:

The second and third coordinates seem very close and, depending on your feature class tolerance, might end up collapsed into a single vertex in the database, rendering the polygon invalid.

See also here:

https://community.safe.com/s/question/0D54Q000080hffpSAA/error-message-when-writing-lines-to-sde-the-error-number-from-arcobjects-is-2147215922-the-error-message-from-arcobjects-is-number-of-parts-in-shape-is-incorrect-for-its-geometry-type

The tolerance is set to 0.0001


ingalla
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • March 22, 2023

Thanks both for your input, I have added in a area calculator, followed by a tester to find everything grater than the tolerance and it works fine...


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings