Thanks for Answer: [Gdal-dev] How to custom my "Projected Coordinate Systems" inOGR

=?gb2312?B?2k+9qMP3?= yunjm2005 at gmail.com
Thu Mar 15 20:38:13 EDT 2007


Hi,Frank:

Thanks for your reply.I will modify my code follow your advice.
And i have another question:
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 ? 
hope your next reply.

Best regards,





yunjm
2007-03-16



·¢¼þÈË£º Frank Warmerdam
·¢ËÍʱ¼ä£º 2007-03-15 23:48:13
ÊÕ¼þÈË£º ÚO½¨Ã÷
³­ËÍ£º gdal-dev
Ö÷Ì⣺ Re: [Gdal-dev] How to custom my "Projected Coordinate Systems" inOGR

ÚO½¨Ã÷ wrote:
>  
> I use the class in ogr_spatialref.h to build a system with graphic UI to 
> fulfill corrdinate system transformtion,
> But i find the *.csv files in $GDAL_DATA$ is hard to extend or to add a 
> new customed coordinate system to it.
> I know that i can call statements like following to  complete this 
> task,but how do i store this configuration to these csv files?then next 
> time user can only call it by ImportFromXXX() function.
>  
> -------------
>  oTargetSRS.SetProjCS( "XIAN80 Albers" );
>  oTargetSRS.SetWellKnownGeogCS("EPSG:4610");
>  oTargetSRS.SetACEA(27,45,0,105,0,0);
> -------------

Hi,

The .csv files are primarily intended for EPSG coordinate systems,
so it isn't really appropriate to extend them manually.

But you can add your own custom dictionaries in a manner similar
to gdal/data/cubewerx_extra.wkt.  These dictionary files consist
of lines with a short name, a comma and then the WKT definition of
the coordinate system.

You can reference such a definition from SetFromUserInput() and
programs that use that function (such as s_srs, a_srs, t_srs
for gdal_translate, ogr2ogr and gdalwarp) using the form:

  gdal_translate  -a_srs DICT:cubewerx_extra.wkt,41001

Programmatically you can use the importFromDict() method on
the OGRSpatialReference.

To get the WKT from an OGRSpatialReference, for appending to the
dictionary file, you can use the exportToWkt() method.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070316/25e9de2a/attachment.html


More information about the Gdal-dev mailing list