<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<blockquote type="cite"
cite="mid:CADRrdKtF4fF+k61SUpkmjg_cVR=RWt_OpN4y9F7VxJn1ap=ihA@mail.gmail.com">
<div dir="ltr">
<div><br>
</div>
<div>To list all the CRS names I am using "getCRSInfoList".
Great method.<br>
</div>
<div>In some cases I would like to include also all the aliases
(more than 10000 for projected crs). So you can still find the
CRS with the name you used all your live. (I'm sure many
people do not know that their authority renamed a CRS).<br>
</div>
<div><br>
</div>
<div>However I am not able to get them. The method
"IdentifiedObject::aliases()" for a CRS is returning an empty
vector, and the method "DatabaseContext::getAliases(...)" has
a "PROJ_INTERNAL" flag that makes it unlinkable.</div>
<div><br>
</div>
<div>Am I doing something wrong with
"IdentifiedObject::aliases()"? Is there any other way to do
it?</div>
</div>
</blockquote>
<p>If I remember well, this part of the API was something I coded
early in the PROJ 6 work, taking inspiration (and strugling to
understand) from GeoAPI classes. Various classes GenericName,
LocalName, NameFactory etc to deal with basically a string. So the
API is there, there's minimum testing for it in
test/unit/test_common.cpp, but it hasn't been really used for
useful stuff.</p>
<p>DatabaseContext::getAliases() is used internally in situations
where identification from the main name fails.</p>
<p>I guess the AuthorityFactory::createXXXX() methods, and more
likely the
AuthorityFactory::Private::createPropertiesSearchUsage() low level
method they all use, could be used to query the database and set
the aliases through the ALIAS_KEY property name during
construction. There will obviously be some overhead. No idea if it
will be significant or not. <br>
</p>
<p>An alternative would be to have a C function relying on
DatabaseContext::getAliases() (or perhaps a helper method at the
IdentifiedObject level) to load the aliases on demand and return
them</p>
<p>Even<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CADRrdKtF4fF+k61SUpkmjg_cVR=RWt_OpN4y9F7VxJn1ap=ihA@mail.gmail.com">
<div dir="ltr">
<div><br>
</div>
<div>Thanks.</div>
<div>Javier.</div>
<div><br>
</div>
<div>PS: EPSG:32766, projected, has an alias<br>
</div>
<div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ...
.... ._ .__</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
PROJ mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PROJ@lists.osgeo.org">PROJ@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/proj">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>