mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 22:57:56 -05:00
35 lines
858 B
Python
35 lines
858 B
Python
|
##
|
||
|
##
|
||
|
|
||
|
|
||
|
#
|
||
|
# Adapter for com.vividsolutions.jts.geom.Envelope
|
||
|
#
|
||
|
#
|
||
|
# SOFTWARE HISTORY
|
||
|
#
|
||
|
# Date Ticket# Engineer Description
|
||
|
# ------------ ---------- ----------- --------------------------
|
||
|
# 05/29/13 2023 dgilling Initial Creation.
|
||
|
#
|
||
|
#
|
||
|
|
||
|
from dynamicserialize.dstypes.com.vividsolutions.jts.geom import Envelope
|
||
|
|
||
|
ClassAdapter = 'com.vividsolutions.jts.geom.Envelope'
|
||
|
|
||
|
def serialize(context, envelope):
|
||
|
context.writeDouble(envelope.getMinX())
|
||
|
context.writeDouble(envelope.getMaxX())
|
||
|
context.writeDouble(envelope.getMinY())
|
||
|
context.writeDouble(envelope.getMaxY())
|
||
|
|
||
|
def deserialize(context):
|
||
|
env = Envelope()
|
||
|
env.setMinX(context.readDouble())
|
||
|
env.setMaxX(context.readDouble())
|
||
|
env.setMinY(context.readDouble())
|
||
|
env.setMaxY(context.readDouble())
|
||
|
return env
|
||
|
|