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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file GML cleaner-1.3.tar.gz.
File metadata
- Download URL: GML cleaner-1.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
062ea232cf0a91e80257e5e9bc20e4a10039ba4a79d3e16fa51a60e931fdcc55
|
|
| MD5 |
c4be026c1e783029888fa0b55bb80f06
|
|
| BLAKE2b-256 |
460a195c2314396cd949e3658e9cd85cb1299dde24350ed4b8ad699ba497e011
|
File details
Details for the file GML_cleaner-1.3-py3-none-any.whl.
File metadata
- Download URL: GML_cleaner-1.3-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c096bb5e2cf149b678c9359d3f76796202f91bfb34d62afb4277beed75b6c27f
|
|
| MD5 |
09c38a0a9ceebe8dcc07d4c05d6af840
|
|
| BLAKE2b-256 |
0f8b02c3c2cf676f4703619e567e9befcf6bc0ef345859e07c9d3d4ef72e8e2c
|