Skip to main content

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

see examples

Dependencies

  • xsdata - Naive XML Bindings for python.
  • shapely - a widely used library for editing and analyzing geometric objects.
  • numpy - you know it, you love it

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.3.tar.gz (49.9 kB view details)

Uploaded Source

Built Distribution

isoxml-0.0.3-py3-none-any.whl (94.6 kB view details)

Uploaded Python 3

File details

Details for the file isoxml-0.0.3.tar.gz.

File metadata

  • Download URL: isoxml-0.0.3.tar.gz
  • Upload date:
  • Size: 49.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.13

File hashes

Hashes for isoxml-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bcdb3d849b215eb7dee46c50ee4283c09bd478844606b7b7d1fa52303bd081fd
MD5 82f292d8f14ad34f89192c489e7cad46
BLAKE2b-256 fd878c4dbba42953d949082b02222b17bb05f71a684995f730bf76b28a42e438

See more details on using hashes here.

File details

Details for the file isoxml-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: isoxml-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 94.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.13

File hashes

Hashes for isoxml-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bad9f908aa7dbdc5e7e24a29f6c2910e6ac2e5aab1b46a615cda1f6b5dda4b14
MD5 177eec84efe3750ac722dc7dd642158e
BLAKE2b-256 c9d359f3a713cc0b263d7642e5cd6fc5359dd1f857536264f26ae0bb3922ee94

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page