07-12-2017 12:19 PM
I wonder how to programmatically get the coordinates of a polygon feature class em GeoMedia?
The source of the feature is it part of some query as shown below:
Dim oOP As OriginatingPipe
Dim oRS As GRecordset
oOP.Table = strSetores
oOP.GeometryFieldName = "Geometry"
oOP.Filter = "CD_GEOCODIGO = '" & strGeocodigoSetorSuper & "'"
07-12-2017 01:04 PM
The geometry is storaged as a BLOB value (binary data) in the geometry field (Recordset.Fields("Geometry").Value). You have to convert this BLOB with the method StorageToGeometry of a GeometryStorageService object. The output value of this method is a object whose type depends of the geometry value. A regular polygon for example has the type PolygonGeometry. The structure of this various geometry objects are documented in the help.
The PolygonGeometry object has the property Points with a collection of Point objects. This Point objects contains the coordinates as property X, Y an Z.