Python ISOXML read/write
Project description
ISOXML library for python
a python library that handles import and export of ISOXML TaskData files as specified in ISO11783 part 10. inspired by isoxml-js and powered by xsdata XML bindings.
The main features:
- supports v3 and v4
- read/write directly from zip, TASKDATA-dir or any string
- conversion between shapely and isoxml geometries
- conversion of numpy array to grid data binary files
- generate code from existing TASKDATA.XML (via xsdata)
Installation
pip install isoxml
Usage Examples
import
from isoxml.util.isoxml_io import isoxml_from_zip
task_data, bin_data = isoxml_from_zip('/path/to/TASKDATA.zip')
export
import isoxml.models.base.v4 as iso
from isoxml.util.isoxml_io import isoxml_to_text
customer = iso.Customer(
id="CTR0001",
last_name="demo_customer"
)
farm = iso.Farm(
id="FRM0001",
designator="demo farm",
customer_id_ref=customer.id
)
task_data = iso.Iso11783TaskData(
management_software_manufacturer="josephinum research",
management_software_version="0.0.0",
data_transfer_origin=iso.Iso11783TaskDataDataTransferOrigin.FMIS,
customers=[customer],
farms=[farm]
)
xml_content = isoxml_to_text(task_data)
print(xml_content)
<ISO11783_TaskData VersionMajor="4" VersionMinor="3" ManagementSoftwareManufacturer="josephinum research" ManagementSoftwareVersion="0.0.0" DataTransferOrigin="1">
<CTR A="CTR0001" B="demo_customer"/>
<FRM A="FRM0001" B="demo farm" I="CTR0001"/>
</ISO11783_TaskData>
more
Dependencies
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
isoxml-0.0.4.tar.gz
(51.0 kB
view details)
Built Distribution
isoxml-0.0.4-py3-none-any.whl
(96.0 kB
view details)
File details
Details for the file isoxml-0.0.4.tar.gz
.
File metadata
- Download URL: isoxml-0.0.4.tar.gz
- Upload date:
- Size: 51.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb218293a621a5ad1ee9c72fd428d4d965b9a6f69f6bbfe2044811fa6b6e0d9b |
|
MD5 | f4cf33f08afdc5683069ca5586d11346 |
|
BLAKE2b-256 | ee9f3fdb24c47efa4d9e608c96cda2cbd34adb111808a9e3546e585622e31acc |
File details
Details for the file isoxml-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: isoxml-0.0.4-py3-none-any.whl
- Upload date:
- Size: 96.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ca87ffecab64f559367c6535fc25a69541fdabb89e3dc7bf620474f49c34307 |
|
MD5 | 09cb51af358f3d9de26e5b3fe962dc03 |
|
BLAKE2b-256 | 8ba26809000c8c7d3665dd273ed169429cfa8158a631e405c614c405f3f780d7 |