<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Javier,</p>
<p>I guess it would make sense to allow axisCount == 3 as well.</p>
<p>OGC 01-009 mentions:</p>
<p>"""7.3.10 LOCAL_CS<br>
This indicates a local, ungeoreferenced coordinate system. Such
coordinate systems are often<br>
used in CAD systems. They can also be used for local surveys,
where the relationship between<br>
the surveyed site and the rest of the world is not important.<br>
The number of AXIS clauses indicates the dimension of the local
coordinate system."""</p>
<p>and the BNF "<local cs> = LOCAL_CS["<name>",
<local datum>, <unit>, <axis>,<br>
{,<axis>}* {,<authority>}]" </p>
<p>doesn't forbid 3 axis.</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 12/10/2023 à 16:16, Javier Jimenez
Shaw via PROJ a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKthL+7fF_g-n5XLNthp4CxQ4WSAh5tcpOq94R4kApx1zQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>This is just a question, not necessarily a bug.</div>
<div>I'm just playing with arbitrary CRS, in this case with 3
dimensions. Producing the WKT1 output from WKT2 works<br>
</div>
<div><br>
</div>
<div><span style="font-family:monospace">projinfo
'ENGCRS["Engineering SRS",<br>
EDATUM["datum",ANCHOR["anchor"]],<br>
CS[Cartesian,3],<br>
AXIS["easting (X)",east, ORDER[1], LENGTHUNIT["US survey
foot",0.304800609601219]],<br>
AXIS["northing (Y)",north, ORDER[2], LENGTHUNIT["US
survey foot",0.304800609601219]],</span></div>
<div><span style="font-family:monospace"> AXIS["elevation
(z)",up, ORDER[3], LENGTHUNIT["US survey
foot",0.304800609601219]]]' -o wkt1_gdal</span></div>
<div><span style="font-family:monospace"><br>
</span></div>
<div><span style="font-family:monospace">WKT1:GDAL string:<br>
LOCAL_CS["Engineering SRS",<br>
LOCAL_DATUM["datum",32767],<br>
UNIT["US survey foot",0.304800609601219],<br>
AXIS["Easting",EAST],<br>
AXIS["Northing",NORTH],<br>
AXIS["</span><span style="font-family:monospace">Elevation</span><span
style="font-family:monospace">",UP]]</span><br>
</div>
<div><br>
</div>
<div>But later using that WKT1 string fails:<br>
<span style="font-family:monospace">projinfo
'LOCAL_CS["Engineering SRS",<br>
LOCAL_DATUM["datum",32767],<br>
UNIT["US survey foot",0.304800609601219],<br>
AXIS["Easting",EAST],<br>
AXIS["Northing",NORTH],<br>
AXIS["Northing",UP]]'<br>
input string: parsing of user string failed: buildCS:
unexpected AXIS count for LOCAL_CS</span></div>
<div><br>
</div>
<div>The code is this (src/iso19111/io.cpp):</div>
<div><br>
</div>
<div><span style="font-family:monospace"> } else if
(ci_equal(parentNodeName, WKTConstants::LOCAL_CS)) {<br>
if (axisCount == 0) {<br>
auto unit =<br>
buildUnitInSubNode(parentNode,
UnitOfMeasure::Type::LINEAR);<br>
if (unit == UnitOfMeasure::NONE) {<br>
unit = UnitOfMeasure::METRE;<br>
}<br>
return
CartesianCS::createEastingNorthing(unit);<br>
} else if (axisCount == 1) {<br>
csTypeCStr = "vertical";<br>
} else if (axisCount == 2) {<br>
csTypeCStr = "Cartesian";<br>
} else {<br>
throw ParsingException(<br>
"buildCS: unexpected AXIS count for
LOCAL_CS");<br>
}</span></div>
<div><br>
</div>
<div>Is that limited in purpose? I was not able to find anything
explicit in the standard about the number of axis in WKT1
LOCAL_CS</div>
<div><br>
</div>
<div>Thanks.<br>
</div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<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>