GMSC Discussions

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Regular Contributor
Posts: 185
Registered: ‎08-10-2016
Accepted Solution

GEOMETRY and GEOMETRY_SPA in SQL database

Hello,

 

What is the difference between GEOMETRY and GEOMETRY_SPA columns for GMSC database tables? And how can i ensure that my datasets from GeoMedia desktop or any other GIS software have the GEOMETRY_SPA column when importing features into a SQL database for use in GMSC?

Highlighted
Moderator
Posts: 265
Registered: ‎02-08-2016

Re: GEOMETRY and GEOMETRY_SPA in SQL database

Hello Elvon

 

GEOMETRY is a Blob / varbinary data type that is used for native GeoMedia spatial data and GEOMETRY_SPA is SQL native spatial Geometry.

When using GeoMedia for GeoMedia Smart Client insure you are using the SQL Server Spatial Warehouse connection as it will use Native SQL Spatial GEOMETRY_SPA.

 

Thank You,

Marc

Regular Contributor
Posts: 185
Registered: ‎08-10-2016

Re: GEOMETRY and GEOMETRY_SPA in SQL database

[ Edited ]

Hello Marc,

 

Thanks for your response, i have been doing some research into this as well and i concure with you. Only that i think you meant GEOMETRY is the native spatial data type for SQL Server and GEOMETRY_SPA is the varbinary/blob data type for GeoMedia/GMSC. I still stand to be corrected on this.

I don't have a strong background with databases but my understanding is that for the existing tables i'll have to create a column called GEOMETRY_SPA of varbinary data type and convert/cast the GEOMETRY column values into it. I would appriciate if there is a better way of getting the blob data type from Geometry data type. A sample SQL script for doing this would be much appreciated.

 

Also what is the difference between SQL Server spatial warehouse connection and SQL Server connection in GeoMedia? Does it mean there is a different SQL Server version called spatial or is it not that SQL Server supports geometry types natively. So far i am unable to create an SQL Server Spatial Warehouse connection in GeoMedia am getting the following error:

Invalid column name 'NATIVE_SRID'.
Invalid column name 'NATIVE_GEOMETRY'.
Invalid column name 'NATIVE_GEOMETRY'.
Unable to connect to the database GMW_DEMO_DB@webmapsvr.
Unable to connect to the database GMW_DEMO_DB@webmapsvr.

 

I am using SQL Server 2012. The same database connects when I use just SQL Server connection. Someone kindly enlighten me on the differences because then i'll be able to work with these products with much ease.

 

Edit: I have managed to create an SQL Server spatial database connection in GeoMedia by creating a new database, using the GeoMedia database utilities to create metadata tables and then importing features from my other SQL database connection into the new database. And just as Marc pointed out i now have both GEOMETRY and GEOMETRY_SPA columsns and i can load my features into GMSC. This is a nice workaround but it means i have to create a new SQL Server spatial database for every features database i have. Would be nice if i can just get a script to cast GEOMETRY column into a new GEOMETRY_SPA column.

 

Thank You,

Elvon

Staff
Posts: 1,051
Registered: ‎10-18-2015

Re: GEOMETRY and GEOMETRY_SPA in SQL database

Hi Elvon,

 

please have a look here for a brief explanation:

 

https://hexagongeospatial.fluidtopics.net/book#!book;uri=5b98540fe7b090111c4491da21e684ec;breadcrumb...

 

there is a more detailed description in the GeoMedia help:

 

https://hexagongeospatial.fluidtopics.net/book#!book;uri=d697ac1e302b4bce1d79722e4e4261b0;breadcrumb...

 

Regards,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Occasional Contributor
Posts: 19
Registered: ‎05-09-2018

Re: GEOMETRY and GEOMETRY_SPA in SQL database

hi,
 
we are facing an issue while exporting data from geomedia to sql server
as we found that the GDO data is saved as (varbinary) but there is no (native) geometry or (spatial) data that sql server can recognize 
 
how can we export to sql a native spatial data that sql server can recognize ?