geomet is a pure Python library designed for converting between various common geospatial data formats, including Well-Known Text (WKT), Well-Known Binary (WKB), GeoJSON, and EsriJSON. The current version is 1.1.0, with releases occurring a few times a year, primarily for compatibility updates and bug fixes.
pip install geometVerified import paths — ran on the pinned version, not inferred.
This example demonstrates converting a WKT string into a GeoJSON dictionary and then dumping it back into a GeoJSON string using the `wkt` and `geojson` modules.
Upgrade your Python environment to 3.7 or newer to use `geomet>=1.0.0`. Alternatively, pin `geomet` to an older version if Python upgrade is not possible.
Upgrade to `geomet>=1.1.0` to ensure correct and reliable GeoJSON to EsriJSON conversions, including proper handling of coordinate arrays and SRIDs.
Upgrade to `geomet>=1.0.0` for improved precision and robust handling of floating-point numbers in geospatial data conversions. If on older versions, carefully validate converted geometries.
Update import statements. For encoding functionality, use `from geomet.encode import geojson`. For decoding functionality, use `from geomet.decode import geojson`.
Update import statements. Instead of `from geomet import geojson`, import the `geojson` library directly (e.g., `import geojson`). For conversion functions, consider using `geomet.util` or external libraries directly.
pip install geomet
Ensure that the GeoJSON object contains valid coordinates for its geometry type before converting it to WKB, or handle empty geometries by filtering them out or converting them to a non-binary format.
Review and correct the WKT string to strictly adhere to the OGC Simple Feature Access specification. Common issues include missing parentheses, incorrect coordinate formats, or invalid geometry types.
Import the specific submodule for the desired format (e.g., `from geomet import wkt` or `from geomet import geojson`) and then call the function from that submodule (e.g., `wkt.loads(...)` or `geojson.loads(...)`).
No dependency data recorded yet.