Skip to main content

Create ISO11783 Taskdata

Project description

python-isoxml-writer

Usage/Examples

from isoxml_writer import isoxml

taskdata = isoxml.Taskdata()

# Create field
# Partfield(id, designator, area in m^2)
partfield = isoxml.Partfield(1, "MyField", 2000)

# Create field boundary
polygon = isoxml.Polygon(1) # type 1 = Partfield Boundary

linestring = isoxml.Linestring(1) # type 1 = PolygonExterior
linestring.add_point(isoxml.Point(2, 49.0584197, 10.8901476))
linestring.add_point(isoxml.Point(2, 49.0600315,10.8932380))
linestring.add_point(isoxml.Point(2, 49.0589953,10.8938615))
linestring.add_point(isoxml.Point(2, 49.0580556,10.8905947))

polygon.add_linestring(linestring)

partfield.add_polygon(polygon)


taskdata.add_partfield(partfield)


xml_string = taskdata.get_taskdata()

# <?xml version="1.0" ?>
# <ISO11783_TaskData VersionMajor="4" VersionMinor="3" ManagementSoftwareManufacturer="python-isoxml-writer" ManagementSoftwareVersion="1.0" DataTransferOrigin="1">
#   <PFD A="PFD-1" C="MyField" D="2000">
#     <PLN A="1">
#       <LSG A="1">
#         <PNT A="2" C="49.0584197" D="10.8901476"/>
#         <PNT A="2" C="49.0600315" D="10.893238"/>
#         <PNT A="2" C="49.0589953" D="10.8938615"/>
#         <PNT A="2" C="49.0580556" D="10.8905947"/>
#       </LSG>
#     </PLN>
#   </PFD>
# </ISO11783_TaskData>

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_writer-0.0.3.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

isoxml_writer-0.0.3-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: isoxml_writer-0.0.3.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.8

File hashes

Hashes for isoxml_writer-0.0.3.tar.gz
Algorithm Hash digest
SHA256 e1fd55ac562bc59341b7e94da920c89737ee7bd1d84aa9c9f8f3b30de4a30624
MD5 e5f9bb342aee27e109994af8c4d1243d
BLAKE2b-256 2ceb36887a4aa5d5fa8dd95bce14f0037d301e2c58c19c96c0d885d12fd72617

See more details on using hashes here.

File details

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

File metadata

  • Download URL: isoxml_writer-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.8

File hashes

Hashes for isoxml_writer-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0e7685891f98f93d33f199391dddcb3106d40daba0e30a360bf89f9a3770db7b
MD5 45e9f5d01dee67fcd6c0bad28d93340a
BLAKE2b-256 a1d68561b82947736614650025fe2fc61986639c373b9fc002722ad7d05258d4

See more details on using hashes here.

Supported by

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