Hexagon Geospatial
MENU

GeoMedia

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 32
Registered: ‎12-17-2016

Get coordinates of a polygon feature class em GeoMedia

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


goConn.CreateOriginatingPipe oOP
oOP.Table = strSetores
oOP.GeometryFieldName = "Geometry"
oOP.Filter = "CD_GEOCODIGO = '" & strGeocodigoSetorSuper & "'"

Regular Contributor
Posts: 207
Registered: ‎05-25-2016

Re: Get coordinates of a polygon feature class em GeoMedia

Hi Eulimar

 

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.

 

Best regards,

hesrah

Highlighted
Contributor
Posts: 32
Registered: ‎12-17-2016

Re: Get coordinates of a polygon feature class em GeoMedia

Thanks for the help, hesrah. I got it.

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.