<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Stephen,</p>
<p>there are 2 possiblities:</p>
<p>- you may reuse your modified /usr/share/proj/epsg file from
PROJ.4. But in this case, the EPSG entries of proj.db will not be
used, so you will use only legacy CRS and transformations</p>
<p>- or you add a custom entry in proj.db</p>
<p>For the later, the following will output SQL statements that
should be put in the DB, but they need a bit of tweaking given
that the logic that suggests the SQL statements try to set a
"proper" CRS definition which lacks the PROJ.4 +over or
+nadgrids=@null hack<br>
</p>
<p>projinfo --output-id EPSG:900914 -o SQL -q "+proj=merc +a=6371001
+b=6371001 +lat_ts=0.0 +lon_0=0.0 +x_0=-4448 +y_0=-4448 +k=1.0
+units=m +over +nadgrids=@null +no_defs +type=crs"</p>
<p>With a bit of hand tuning, if you run the following statements in
your proj.db,<br>
<br>
INSERT INTO ellipsoid
VALUES('EPSG','ELLPS_GEODETIC_DATUM_GEODETIC_CRS_900914','unknown','','IAU_2015','399',6371001,'EPSG','9001',NULL,6371001,0);<br>
INSERT INTO geodetic_datum
VALUES('EPSG','GEODETIC_DATUM_GEODETIC_CRS_900914','unknown using
nadgrids=@null','','EPSG','ELLPS_GEODETIC_DATUM_GEODETIC_CRS_900914','EPSG','8901',NULL,NULL,NULL,NULL,NULL,0);<br>
INSERT INTO usage
VALUES('EPSG','USAGE_GEODETIC_DATUM_GEODETIC_CRS_900914','geodetic_datum','EPSG','GEODETIC_DATUM_GEODETIC_CRS_900914','PROJ','EXTENT_UNKNOWN','PROJ','SCOPE_UNKNOWN');<br>
INSERT INTO geodetic_crs
VALUES('EPSG','GEODETIC_CRS_900914','unknown','','geographic
2D','EPSG','6424','EPSG','GEODETIC_DATUM_GEODETIC_CRS_900914',NULL,0);<br>
INSERT INTO usage
VALUES('EPSG','USAGE_GEODETIC_CRS_900914','geodetic_crs','EPSG','GEODETIC_CRS_900914','PROJ','EXTENT_UNKNOWN','PROJ','SCOPE_UNKNOWN');<br>
INSERT INTO projected_crs VALUES('EPSG','900914','unknown
(900914)','',NULL,NULL,'EPSG','GEODETIC_CRS_900914',NULL,NULL,'+proj=merc
+a=6371001 +b=6371001 +lat_ts=0.0 +lon_0=0.0 +x_0=-4448 +y_0=-4448
+k=1.0 +units=m +over +nadgrids=@null +no_defs',0);<br>
INSERT INTO usage
VALUES('EPSG','USAGE_PROJECTED_CRS_900914','projected_crs','EPSG','900914','PROJ','EXTENT_UNKNOWN','PROJ','SCOPE_UNKNOWN');<br>
<br>
you'll get:</p>
<p>PROJ_DATA=/tmp bin/projinfo EPSG:900914<br>
PROJ.4 string:<br>
+proj=merc +a=6371001 +b=6371001 +lat_ts=0 +lon_0=0 +x_0=-4448
+y_0=-4448 +k=1 +units=m +nadgrids=@null +wktext +no_defs
+type=crs<br>
<br>
WKT2:2019 string:<br>
PROJCRS["unknown (900914)",<br>
BASEGEOGCRS["unknown",<br>
DATUM["unknown using nadgrids=@null",<br>
ELLIPSOID["unknown",6371001,0,<br>
LENGTHUNIT["metre",1]]],<br>
PRIMEM["Greenwich",0,<br>
ANGLEUNIT["degree",0.0174532925199433]]],<br>
CONVERSION["unknown",<br>
METHOD["Popular Visualisation Pseudo Mercator",<br>
ID["EPSG",1024]],<br>
PARAMETER["Latitude of natural origin",0,<br>
ANGLEUNIT["degree",0.0174532925199433],<br>
ID["EPSG",8801]],<br>
PARAMETER["Longitude of natural origin",0,<br>
ANGLEUNIT["degree",0.0174532925199433],<br>
ID["EPSG",8802]],<br>
PARAMETER["False easting",-4448,<br>
LENGTHUNIT["metre",1],<br>
ID["EPSG",8806]],<br>
PARAMETER["False northing",-4448,<br>
LENGTHUNIT["metre",1],<br>
ID["EPSG",8807]]],<br>
CS[Cartesian,2],<br>
AXIS["(E)",east,<br>
ORDER[1],<br>
LENGTHUNIT["metre",1]],<br>
AXIS["(N)",north,<br>
ORDER[2],<br>
LENGTHUNIT["metre",1]],<br>
ID["EPSG",900914]]<br>
</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 12/04/2024 à 23:24, Stephen
Woodbridge via gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:e6200a06-edb6-408c-b53c-43b723142bb4@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<font face="Courier New, Courier, monospace">Hi all,<br>
<br>
I've been gone for a while, but got called back to update a site
I built and need to move from proj4 to proj 8 on Ubuntu 22.04.
In the past I just added the following to /usr/share/proj/epsg<br>
<br>
# HYCOM Mercator projection<br>
<900914> +proj=merc +a=6371001 +b=6371001 +lat_ts=0.0
+lon_0=0.0 +x_0=-4448 +y_0=-4448 +k=1.0 +units=m +over
+nadgrids=@null +no_defs <><br>
<br>
and was able to access it in gdal, mapserver, postgis, etc with
"EPSG:900914"<br>
<br>
How does one do that with the new system?<br>
<br>
Thanks,<br>
-Steve W<br>
</font>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top: 1px solid #D3D4DE;">
<tbody>
<tr>
<td style="width: 55px; padding-top: 13px;"><a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
target="_blank" moz-do-not-send="true"><img
src="https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif"
alt="" style="width: 46px; height: 29px;"
moz-do-not-send="true" width="46" height="29"></a></td>
<td
style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free.<a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
target="_blank" style="color: #4453ea;"
moz-do-not-send="true">www.avast.com</a></td>
</tr>
</tbody>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1"
height="1" moz-do-not-send="true"> </a></div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</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>