Skip to main content

Gml cleaner is a python library for manupulating data and meta data in gml files.

Project description

GML cleaner

Python package to clean gml files. With this package, you can:

  • read gml files as xml files (not as geo files with e.g. fiona)
  • read the schema file that contains the meta data (usually a .xsd or .gfs file)
  • replace commas by points in float properties
  • change the datatype of properties (works only for .xsd files)
  • save the changed gml and schema file

Usually, gml file are read by packages such as GeoPandas or Fiona. Yet, this package accesses the raw data directly, which the geo packages cannot do.

Installation

pip install gml-cleaner

Usage

from clean_gml.gml import Gml

# set example file path
filepath = 'example.gml'

# optional: use dictionary to change the datatype of one or more properties
datatype_changes = {'PROPERTY': 'xsd:float'}

# instantiate the Gml class. It will automatically load the corresponding .xsd schema file
gml = Gml(filepath)
# optional: change datatypes
gml.datatype_changes(changes=datatype_changes)
# replace commas by dots and set number of decimals (default is 2)
gml.replace_commas(ndigits=3)
# save files
gml.save()  # saves files in new directory 'adjustud/'

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

GML cleaner-1.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

GML_cleaner-1.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file GML cleaner-1.1.tar.gz.

File metadata

  • Download URL: GML cleaner-1.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for GML cleaner-1.1.tar.gz
Algorithm Hash digest
SHA256 80c41fc7a1ad3754947aed2e64e6ad3abec5e4b8c377abd098eb0156f87e2bc2
MD5 977759f8f91b4876f7fc26e2922ff4b5
BLAKE2b-256 c0d012528ef52bcc8190c5c0e55800b23536762deb106fdec7f3db3830cb27da

See more details on using hashes here.

File details

Details for the file GML_cleaner-1.1-py3-none-any.whl.

File metadata

  • Download URL: GML_cleaner-1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for GML_cleaner-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 232cf61672060db19afbe3f13a93a6ef6456939e098c07b48df10ab16e0c0732
MD5 de02b2e12daa0c2bfea0c14adb1cab8d
BLAKE2b-256 30c7ee5812aff03fafc6040c0a4c31581781992997a8a049b5967b1ed66edabb

See more details on using hashes here.

Supported by

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