ThinkGeo.com    |     Documentation    |     Premium Support

Dialog for browsing coordinate system

Hi,

I have planned to implement a simple coordinate reference system browser.

I imagine a dialog where all the supported coordinate systems are shown in a tree control. 

The dialog should return the unique Srid value of the selected coordinate system.


Do you have a smart way to look-up the list of the coordinate system names or have I to look-up the pairs of srid and coordinate system names from the *.rtf files found in the folder "Documentation\Projections"


Regards

Niels



Niels, 


Thanks for your post!
 
First, you want to get the Projection String from given Srid, I think that is reasonable, because a valid Srid is always can get a projection string:
Following is the sample code if you turn to MapSuite Core:
 
Proj4Projection projection = new Proj4Projection(4326, 2004);
//+proj=longlat+ellps=WGS84+datum=WGS84+no_defs
string internalString = projection.InternalProjectionParametersString;
 
//+proj=tmerc+lat_0=0+lon_0=-62+k=0.9995+x_0=400000+y_0=0+ellps=clrk80+towgs84=174,359,365,0,0,0,0+units=m+no_defs
string extentalString = projection.ExternalProjectionParametersString;
 
Second, I do not think it is reasonable to get a Srid from a projection string. Reason is a valid projection string maybe not a valid Srid. Or probably I misunderstood your attempt.
For example
//+proj=tmerc+lat_0=0+lon_0=-62+k=0.975+x_0=800000+y_0=0+ellps=clrk80+towgs84=174,354,323,0,0,0,0+units=m+no_defs
 
This projection string cannot be taken as 2004 Srid, because several parameters has been changed.
 
Any more questions just let me know.
 
Thanks
 
Yale