Skip to content
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

Box and Point locations do not serialize into stable XML #387

Closed
Roel opened this issue Jun 7, 2023 · 0 comments · Fixed by #388
Closed

Box and Point locations do not serialize into stable XML #387

Roel opened this issue Jun 7, 2023 · 0 comments · Fixed by #388
Assignees
Labels
Milestone

Comments

@Roel
Copy link
Member

Roel commented Jun 7, 2023

  • PyDOV version: master
  • Python version: 3.10.6
  • Operating System: ubuntu

Description

The pydov.util.location.Box and pydov.util.location.Point classes use a random gml:id since pydov 3.0.0 and GML 3.2. This has as a consequence that they do not serialize into stable XML anymore, causing issues in the RepeatableLog(Recorder|Replayer).

What I Did

from pydov.util.location import Point
from owslib.etree import etree

p1 = Point(10, 10)
p1_xml = etree.tostring(p1.get_element())
print(p1_xml)

p2 = Point(10, 10)
p2_xml = etree.tostring(p2.get_element())
print(p2_xml)

print('XML is equal:', p1_xml == p2_xml)
b'<gml32:Point xmlns:gml32="http://www.opengis.net/gml/3.2" srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#31370" gml32:id="pydov.1D2pYSHo"><gml32:pos>10.000000 10.000000</gml32:pos></gml32:Point>'
b'<gml32:Point xmlns:gml32="http://www.opengis.net/gml/3.2" srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#31370" gml32:id="pydov.tlRGFRLY"><gml32:pos>10.000000 10.000000</gml32:pos></gml32:Point>'
XML is equal: False
@Roel Roel added the bug label Jun 7, 2023
@Roel Roel added this to the 3.1.0 milestone Jun 7, 2023
@Roel Roel self-assigned this Jun 7, 2023
@Roel Roel closed this as completed in #388 Jun 13, 2023
@Roel Roel mentioned this issue Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant