Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 31
Registered: ‎01-14-2018
Accepted Solution

Automate change the GeoWorkspace coordinate system

[ Edited ]

Hello all,

 

I am wondering how to change the GeoWorkspace coordinate system using c# code. as from the GUI as in the picture 

 

gws cs.jpg

 

Kind regards,

Khaled

Technical Evangelist
Posts: 713
Registered: ‎09-11-2015

Re: Automate change the GeoWorkspace coordinate system

Hi Khaled,

 

There's a sample exactly for this:

https://community.hexagongeospatial.com/t5/Shared-Samples/Change-Coordinate-System/ta-p/3646

 

Regards,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Contributor
Posts: 31
Registered: ‎01-14-2018

Re: Automate change the GeoWorkspace coordinate system

Thanks Jan,

 

I tried to open the shared sample but I got access denied,

 

Can I have a hint about whuch library and object should I use?

 

kind regards,

Khaled

Technical Evangelist
Posts: 713
Registered: ‎09-11-2015

Re: Automate change the GeoWorkspace coordinate system

The Shared Samples is accessible only for HGDN Subscribers. It's not a trivial task to do the transformation, one cannot describe it in a few words. You'll need:

  • Common Coordinate Systems library
  • CoordSystemsMgr, CoordSystem, AltCoordSystemsPaths, Links, TransLinks

Basically you need to make a copy of existing coordinate system on which you will work, create transformation paths to the new coordinate system and update the legends and map view.

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Contributor
Posts: 31
Registered: ‎01-14-2018

Re: Automate change the GeoWorkspace coordinate system

Thanks a lot,

Khaled

Contributor
Posts: 31
Registered: ‎01-14-2018

Re: Automate change the GeoWorkspace coordinate system

Hello Jan,

 

Does this way support to load from a csf file?

 

Thanks

Khaled

Highlighted
Technical Evangelist
Posts: 713
Registered: ‎09-11-2015

Re: Automate change the GeoWorkspace coordinate system

Hi Khaled,

Yes, you can load it using CoordSystem.LoadFromFile and then create the transformation paths between old and new CS.

 

Regards,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.