-
-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test case gml namespace, missing will cause a warning. #751
Conversation
Hi Sandro, regress/core/regress_buffer_params .. failed (diff expected obtained: /tmp/pgis_reg/test_51_diff)--- ./regress/core/regress_buffer_params_expected 2023-11-10 04:30:53.558070129 +0000
|
rebase from master, should fix the CI failure. |
I don't find that omitting the namespace causes an error.
|
When logging_collector=on, it will be printed in the log but not on the console. Please check the logs. |
I found the warning location. |
The namespace definition should be in the document header, we don't want to repeat it on every geometry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually ok with the change, doesn't hurt for sure
ST_AsGML is normal, but warnings are issued during conversion, such as ST_GeomFromGML. |
I've merged your change as of dc000e9 - thank you |
Missing namespace definition will cause a warning See #751
gml does not add the namespace when converting, which causes libxml2 to throw a warning.
postgis 3.4.0
CGAL 5.4.5
PROJ="8.2.1
LIBXML="2.9.11"
LIBJSON="0.15"
2023-11-10 12:18:36.706 CST [23404] LOG: execute : SET SESSION search_path TO 'public'
namespace warning : Namespace prefix gml is not defined
<gml:LineString srsName="EPSG:4269">
^
2023-11-10 12:18:36.715 CST [23404] LOG: execute : SELECT ST_GeomFromGML($$
<gml:LineString srsName="EPSG:4269">
gml:coordinates
-71.16028,42.258729 -71.160837,42.259112 -71.161143,42.25932
</gml:coordinates>
</gml:LineString>
$$)
reference https://www.ogc.org/standard/gml/
《 5.1 XML namespaces 》
All components of the GML schema are defined in the namespace with the identifier "http://www.opengis.net/gml/3.2", for which the prefix gml or the default namespace is used within this International Standard.
2023-11-10 12:29:49.619 CST [23404] LOG: execute : SELECT ST_GeomFromGML($$
<gml:LineString xmlns:gml="http://www.opengis.net/gml"
srsName="EPSG:4269">
gml:coordinates
-71.16028,42.258729 -71.160837,42.259112 -71.161143,42.25932
</gml:coordinates>
</gml:LineString>
$$)