<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.3790.1830" name=GENERATOR>
<STYLE>
<!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Verdana;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
/* Page Definitions */
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Verdana color=#0000ff size=2>Hi,<FONT
color=#000000>Frank:</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Thanks for your reply.I will modify my code
follow your advice.</FONT></DIV>
<DIV><FONT face=Verdana size=2>And i have another question:</FONT></DIV>
<DIV><FONT face=Verdana size=2>Is under the $GDAL_DATA$ directory have a file to
describe which projection hava how many parameter as well as their
name,function. I want give a common custome projection UI,if have the file i
mention above it can make me dynamicly control the Form style. If don't have
this file,should i control the UI according the projection various by enumerate
their parameter ? </FONT></DIV>
<DIV>hope your next reply.</DIV>
<DIV> </DIV>
<DIV>Best regards,</DIV>
<DIV> </DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV align=left>
<DIV align=left><FONT face=Verdana size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" SIZE=2>
</FONT></DIV><FONT color=#c0c0c0>
<DIV><FONT face=Verdana size=2>yunjm</FONT></DIV>
<DIV><FONT face=Verdana size=2>2007-03-16</FONT></FONT></DIV></DIV>
<DIV><FONT face=Verdana size=2>
<HR>
</FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>发件人:</STRONG> Frank
Warmerdam</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>发送时间:</STRONG>
2007-03-15 23:48:13</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>收件人:</STRONG>
贠建明</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>抄送:</STRONG>
gdal-dev</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>主题:</STRONG> Re: [Gdal-dev] How to
custom my "Projected Coordinate Systems" inOGR</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>
<DIV>贠建明 wrote:</DIV>
<DIV>> </DIV>
<DIV>> I use the class in ogr_spatialref.h to build a system with graphic UI to </DIV>
<DIV>> fulfill corrdinate system transformtion,</DIV>
<DIV>> But i find the *.csv files in $GDAL_DATA$ is hard to extend or to add a </DIV>
<DIV>> new customed coordinate system to it.</DIV>
<DIV>> I know that i can call statements like following to complete this </DIV>
<DIV>> task,but how do i store this configuration to these csv files?then next </DIV>
<DIV>> time user can only call it by ImportFromXXX() function.</DIV>
<DIV>> </DIV>
<DIV>> -------------</DIV>
<DIV>> oTargetSRS.SetProjCS( "XIAN80 Albers" );</DIV>
<DIV>> oTargetSRS.SetWellKnownGeogCS("EPSG:4610");</DIV>
<DIV>> oTargetSRS.SetACEA(27,45,0,105,0,0);</DIV>
<DIV>> -------------</DIV>
<DIV> </DIV>
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>The .csv files are primarily intended for EPSG coordinate systems,</DIV>
<DIV>so it isn't really appropriate to extend them manually.</DIV>
<DIV> </DIV>
<DIV>But you can add your own custom dictionaries in a manner similar</DIV>
<DIV>to gdal/data/cubewerx_extra.wkt. These dictionary files consist</DIV>
<DIV>of lines with a short name, a comma and then the WKT definition of</DIV>
<DIV>the coordinate system.</DIV>
<DIV> </DIV>
<DIV>You can reference such a definition from SetFromUserInput() and</DIV>
<DIV>programs that use that function (such as s_srs, a_srs, t_srs</DIV>
<DIV>for gdal_translate, ogr2ogr and gdalwarp) using the form:</DIV>
<DIV> </DIV>
<DIV> gdal_translate -a_srs DICT:cubewerx_extra.wkt,41001</DIV>
<DIV> </DIV>
<DIV>Programmatically you can use the importFromDict() method on</DIV>
<DIV>the OGRSpatialReference.</DIV>
<DIV> </DIV>
<DIV>To get the WKT from an OGRSpatialReference, for appending to the</DIV>
<DIV>dictionary file, you can use the exportToWkt() method.</DIV>
<DIV> </DIV>
<DIV>Best regards,</DIV>
<DIV>-- </DIV>
<DIV>---------------------------------------+--------------------------------------</DIV>
<DIV>I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com</DIV>
<DIV>light and sound - activate the windows | <A
href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam</A></DIV>
<DIV>and watch the world go round - Rush | President OSGeo, <A
href="http://osgeo.org">http://osgeo.org</A></DIV>
<DIV> </DIV></FONT></DIV></BODY></HTML>