Question

Convert from WGS84 to GDA94


Hello everyone,

I have two software that accept geometry in two different format. Software A uses WGS84 and B uses GDA94. I need to translate geo data on the fly between two system (e.g. A SQL trigger exists that updates record in other system's database table when data is updated and vice versa).

I want to know how can I convert geo data from one format to other using *within SQL*. I cannot use FME Desktop and FME API since that would require solution to work outside SQL Server.

Any help is appreciated, thanks in advance.

Regards,

 

Bhargav

3 replies

Userlevel 1
Badge +18

When the trigger is fired you can use xp_cmdshell to start an fme.exe process to do the conversion.

Hi @stalknecht, thanks for the response.  This is good alternative.  However, is there a chance to call CLR function from within SQL server? Something along the lines of below (not actual code)

SELECT FmeTransformFactory.Convert(WSG84_Geometry_Column, GDA94) as 'GDA94_Converted_Geometry'

I hope it makes sense.

Regards,

 

Bhargav
Userlevel 1
Badge +18

Hi @stalknecht, thanks for the response.  This is good alternative.  However, is there a chance to call CLR function from within SQL server? Something along the lines of below (not actual code)

SELECT FmeTransformFactory.Convert(WSG84_Geometry_Column, GDA94) as 'GDA94_Converted_Geometry'

I hope it makes sense.

Regards,

 

Bhargav
Nope, it's not available.

 

 

Reply