dwg2geo (Python)
Convert engineering DWG drawings to GeoJSON from Python — the pure-Rust dwg2geo converter as a native extension. No AutoCAD, no LibreDWG, no GDAL needed.
pip install dwg2geo
import json
import dwg2geo
result = dwg2geo.convert_file("drawing.dwg") # or dwg2geo.convert(raw_bytes)
fc = json.loads(result["geojson"]) # GeoJSON FeatureCollection (local drawing coords)
print(result["feature_count"], "features")
print(result["converted"]) # per-entity-type counts
print(result["skipped"], result["failed"]) # with reasons — auditable
Options: convert(data, polygonize_closed=False, curve_tolerance=None).
The result dict mirrors dwg2geo's EmbedResult:
| key | meaning |
|---|---|
geojson |
FeatureCollection string in the drawing's local coordinates |
feature_count, model_space_entities |
totals |
converted / skipped / failed |
per-entity-type outcomes with reasons |
warnings |
conversion warnings |
bbox |
[minx, miny, maxx, maxy] or None |
source_sha256 |
hash of the input bytes (audit trail) |
Features carry resolved CAD style metadata (layer, color_rgb, color_index, linetype, lineweight_mm, text properties…). Coordinates are local — georeference with e.g. pyproj using the drawing's known CRS; dwg2geo never guesses one:
from pyproj import Transformer
transformer = Transformer.from_crs("EPSG:31983", "EPSG:4326", always_xy=True)
lon, lat = transformer.transform(x, y)
Deterministic: the same bytes always produce byte-identical GeoJSON on a given platform (across platforms — native vs WebAssembly — a few floating-point values may differ in the last digit).
License: MIT.
Metadata
Release files for dwg2geo 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dwg2geo-0.2.5.tar.gz | 171.2 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| dwg2geo-0.2.5-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| dwg2geo-0.2.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| dwg2geo-0.2.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| dwg2geo-0.2.5-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64, macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64) | Details |
Total release size: 7.0 MB
Release files / dwg2geo-0.2.5.tar.gz
| Download URL | dwg2geo-0.2.5.tar.gz |
|---|---|
| Size | 171.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c71cafd7696b840ec8a1e46e68ad7980fa5437380910a701bc413c27985de279
|
|
BLAKE2b-256 checksum How to use checksums |
79366cf53272d7a88bc497f09516983591dddcf50a0aaf1701c136a9cd1a6378
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logRelease files / dwg2geo-0.2.5-cp39-abi3-win_amd64.whl
| Download URL | dwg2geo-0.2.5-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b9be9cace65bbcbba7bf3b3564633f9cf36b548bd21cfb4cc9f3bfbaffa246bd
|
|
BLAKE2b-256 checksum How to use checksums |
2cdc0bc8349c954973059b2e89d9bddc029c1f0ddd98817b7944a8288752c9fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logRelease files / dwg2geo-0.2.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | dwg2geo-0.2.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f7d70a7f091d22969a1a6d2f4090162c757f0a0ed69580356488af8f90dfcabc
|
|
BLAKE2b-256 checksum How to use checksums |
f16daba4a86b0ba78a0ed2fc13ff7f075e26d955122e3da6158edfe23dbcc0da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logRelease files / dwg2geo-0.2.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | dwg2geo-0.2.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
61d8934678b0e4aa0b365d696dfa4aeaf598b2058b287c5b4617d71e3c14521a
|
|
BLAKE2b-256 checksum How to use checksums |
8ec76e061c852dc42afc9a5a59005718bcfed5633d8af49d0b8977e17f7e82e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logRelease files / dwg2geo-0.2.5-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | dwg2geo-0.2.5-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
30709a9345e5bbb84b4db3762c7c530fdd239366d9c1c4fc6b141399761676f9
|
|
BLAKE2b-256 checksum How to use checksums |
73deb694205824f3228cd46cba59c518e4efe725b664b991a855a261e0cf01bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logSecurity for dwg2geo 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 5 files in this release have been uploaded with provenance metadata.
Attestation for dwg2geo-0.2.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.