Skip to content

Commit

Permalink
Merge pull request #38 from NOAA-MDL/bugfix/37
Browse files Browse the repository at this point in the history
Replaced deprecated GML type polygonPatches
  • Loading branch information
mgoberfield authored Nov 22, 2022
2 parents 0836115 + 916826b commit 0cdcaa2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ __pycache__
/.pytest_cache
driver.py
sfstns.db
/wiki/
2 changes: 1 addition & 1 deletion gifts/swaEncoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def airspaceVolume(self, parent, token, fltlvls=None):
indent3.set('srsName', des.srsName)
indent3.set('axisLabels', des.axisLabels)
indent3.set('gml:id', deu.getUUID())
indent4 = ET.SubElement(indent3, 'polygonPatches')
indent4 = ET.SubElement(indent3, 'patches')
indent4.set('xmlns', self.NameSpaces['gml'])
indent5 = ET.SubElement(indent4, 'PolygonPatch')
indent6 = ET.SubElement(indent5, 'exterior')
Expand Down
4 changes: 2 additions & 2 deletions gifts/tcaEncoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,15 @@ def airspaceVolume(self, parent, token):
indent3.set('srsDimension', des.srsDimension)

if token['type'] == 'polygon':
indent4 = ET.SubElement(indent3, 'gml:polygonPatches')
indent4 = ET.SubElement(indent3, 'gml:patches')
indent5 = ET.SubElement(indent4, 'gml:PolygonPatch')
indent6 = ET.SubElement(indent5, 'gml:exterior')
indent7 = ET.SubElement(indent6, 'gml:LinearRing')
indent8 = ET.SubElement(indent7, 'gml:posList')
indent8.set('count', str(len(token['pnts'])))
indent8.text = ' '.join(token['pnts'])
else:
indent4 = ET.SubElement(indent3, 'polygonPatches')
indent4 = ET.SubElement(indent3, 'patches')
indent4.set('xmlns', self.NameSpaces['gml'])
indent5 = ET.SubElement(indent4, 'PolygonPatch')
indent6 = ET.SubElement(indent5, 'exterior')
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = IWXXM encoders for Annex3 TAC products
author = Mark Oberfield - NOAA/NWS/OSTI/MDL/WIAD
author_email = [email protected]
maintainer = Mark Oberfield
version = 1.4.2
version = 1.4.3
classifiers = Programming Language :: Python :: 3
Operating System :: OS Independent
Topic :: Text Processing :: Markup :: XML
Expand Down

0 comments on commit 0cdcaa2

Please sign in to comment.