<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">Le 19/09/2024 à 15:59, Michał Kowalczuk
via gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAP+FqQCv6GzepM3fYkgPd-oRcmQRoiiFj5NL_OvJ7=ZhuRfuSQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi,
<div>After re-thinking this topic, I also came to conclusion
that using BoundingBox tags will not be a satisfactory
solution for GDAL users. Maybe it will better than current,
but still poor...</div>
<div>In my opinion the most flexible solution is to provide a
list of supported SRSs by a server, just like in <b>OGR_L_GetSupportedSRSList
for WFS.</b></div>
<div>Then add a helper function to generate a valid path for
chosen layer (subdataset), SRS from the list, and providing
reprojection of bounding box if needed (as Jukka suggested in
last message in last sentence).</div>
<div>This ensures users to use the full capabilities of the
server.</div>
</div>
</blockquote>
<p>I would suggest adding 2 new virtual methods, something like:<br>
</p>
<p>- const GetSupportedSRSListRetType&
GetSupportedSRSListRetTypeGDALDaset::GetSupportedSRSList()</p>
<p>- std::unique_ptr<GDALDataset>
GDALDataset::OpenWithActiveSRS(const OGRSpatialReference* poSRS)<br>
</p>
<p>The later acts in a different way than OGRLayer::SetActiveSRS(),
which modifies the active object. For rasters, changing the active
SRS changes a lot of other proprerties (width, height,
geotransform, etc. etc.) which are assumed for some of them to be
immutable during the life-time of an object. So it is probably
better to return a new dataset, and I suspect would make
implementations in most candidate drivers easier.<br>
</p>
<p>Cf <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/6872">https://github.com/OSGeo/gdal/pull/6872</a> where
OGRLayer::GetSupportedSRSList() was implemented, as a potential
source of inspiration<br>
</p>
<span style="white-space: pre-wrap">
</span>
<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>