<div dir="ltr"><div dir="ltr"><div><br clear="all"></div><div>Hi all,</div><div><br></div><div>I've noticed that defining a projection as for example "EPSG:4236" seems to be internally converted into "init=epsg:4326". I was wondering if this is intentional since "init=" is deprecated/no longer recommended with proj?</div><div><br></div><div>The way I stumbled on this is a little strange (and not a use case which I am suggesting should be supported), but the behaviour was a little unexpected and made me wonder if this was really the intention.</div><div><br></div><div>We had a request from a user who has been using a custom EPSG code which they asked if we could support (we have recommended they don't do this, and switch to a custom prefix instead of EPSG), but in order to test if we could support this I created a file called epsg in /usr/share/proj containing the new projection. What I expected was that I could use "init=epsg:613913" to get this projection. This worked, but a side effect was that all of our existing standard projections eg. "EPSG:4326" broke with the error:<br><br>_mapscript.MapServerError: msProcessProjection(): Projection library error. PROJ error "Invalid value for an argument" when instantiating "init=epsg:4326"</div><div><br></div><div>So it appears that regardless of how one writes the projection in the mapfile, it is being converted to "init=epsg:4326" and then if an epsg file exists it will only use this with no fallback or possibility of using the proj database. The conversion to "init=" seems to happen in the msLoadProjectionStringEPSGLike() function, L1376 in mapfile.c. I wondered what the motivation was for converting to "init=", but perhaps this is just a legacy which is hard to get rid of?</div><div><br></div><div>Tested with:</div><div>MapServer version 8.4.0 PROJ version 9.4 GDAL version 3.11 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=OGCAPI_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF</div><div><br></div><div>Thanks,</div><div>Alistair</div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="color:rgb(80,0,80)"><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">-----------------------------</span></div><div style="color:rgb(80,0,80)"><b style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">Dr Alistair Everett</b><br></div><div>Senioringeniør / Senior Software Engineer<br>Avdeling for Geoutvikling</div><div><br></div><div><span style="color:rgb(0,0,0)"><b>Phone:</b> +47 939 68 985</span><br></div><div><div><font color="#000000"><b>Email:</b> <a href="mailto:alistaire@met.no" style="color:rgb(17,85,204)" target="_blank">alistair.everett@met.no</a></font></div></div><div><br></div><div><b>Meteorologisk Institutt</b>,<br></div><div>Henrik Mohns plass 1, </div><div>0313 Oslo<br></div><div><span style="color:rgb(0,0,0)"><br></span></div></div></div></div></div></div></div></div></div></div></div></div>
</div>