<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE-CH" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi folks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">hope you are doing well!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">we are about prototyping with proj-lib (Version 7.2). <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">1. Insert and Use a custom PCS-Code<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We would like to add our own custom PCS-Codes (and GCS-Codes) with a custom authority-name.<o:p></o:p></p>
<p class="MsoNormal"><span lang="FR-CH">Is it correct that the only way to add custom Codes is to insert it directly via sqllite and not via the C-API?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR-CH">So for a new PCS we could add a row into the table projected_crs with auth_name = 'CUSTOM_AUTH', code = '1', name = 'a custom pcs' and text_defintion = '[WKT-Definition]'.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR-CH">We could then successfully use this custom-epsg to use it as src- or tgt-Projection (CUSTOM_AUTH:1) in the function proj_create_crs_to_crs() for transforming with function proj_trans().<o:p></o:p></span></p>
<p class="MsoNormal">This worked so far.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Also using the following function worked:<o:p></o:p></p>
<p class="MsoNormal">PROJ_STRING_LIST projStringList = proj_get_codes_from_database (C, AnsiString ("CUSTOM_AUTH").c_str(), PJ_TYPE::PJ_TYPE_CRS, 1);
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But when using the following new function (without a filter):
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">PROJ_CRS_INFO** returnedList = proj_get_crs_info_list_from_database (C, AnsiString ("any").c_str(), 0, &count);
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Then the Code CUSTOM_AUTH:1 was not in the returned list. Are we missing something or is this a bug?<o:p></o:p></p>
<p class="MsoNormal">(The custom code exists in the sqllite view: crs_view and table: projected_crs..)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">2. Replace GCS of PCS <o:p></o:p></p>
<p class="MsoNormal">In some cases the end-user should be able to select a PCS and then replace the GCS of this PCS with another different GCS (would result in a new custom PCS).<o:p></o:p></p>
<p class="MsoNormal">In the C-API we could not find any setter-functions to set a GCS to an existing PCS PJ*-Object.<o:p></o:p></p>
<p class="MsoNormal">Is there an elegant way to do this?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thx in advance for your interest. <o:p></o:p></p>
<p class="MsoNormal"><span style="color:black;mso-fareast-language:DE-CH"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:black;mso-fareast-language:DE-CH">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black;mso-fareast-language:DE-CH">Mike</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>