Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dwg2geo-0.2.4.tar.gz (169.3 kB view details)

Uploaded Source

Built Distributions

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

dwg2geo-0.2.4-cp39-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.9+Windows x86-64

dwg2geo-0.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

dwg2geo-0.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

dwg2geo-0.2.4-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.6 MB view details)

Uploaded CPython 3.9+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file dwg2geo-0.2.4.tar.gz.

File metadata

  • Download URL: dwg2geo-0.2.4.tar.gz
  • Upload date:
  • Size: 169.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dwg2geo-0.2.4.tar.gz
Algorithm Hash digest
SHA256 d6ad62c43022ae205d7c598ae7977ab9fa656046478e809d018968804a695bff
MD5 26d0388b5531ebe149a297ccbd204946
BLAKE2b-256 409d2dc943142c25286465e06199c61ce53b6f14a9bbd375d6a3986cee069daa

See more details on using hashes here.

Provenance

The following attestation bundles were made for dwg2geo-0.2.4.tar.gz:

Publisher: release-packages.yml on milkway/dwg2geo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dwg2geo-0.2.4-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: dwg2geo-0.2.4-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dwg2geo-0.2.4-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 cc9af2d16db74f43d93fafa42ed3841fb22d6197ee92c764de954adab28eeb0e
MD5 f12d7dd81cbad6ab3638e9d085a1ac77
BLAKE2b-256 466205a09705ff977e07eb6a01ee907a9d37f6705601257f89bcdc4542112828

See more details on using hashes here.

Provenance

The following attestation bundles were made for dwg2geo-0.2.4-cp39-abi3-win_amd64.whl:

Publisher: release-packages.yml on milkway/dwg2geo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dwg2geo-0.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dwg2geo-0.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e4d4420ad9ead12c47eb0c62776fc0314cd22c5faf60e721633116c5eba05b1e
MD5 dcef65bd6edce09bcce1d63c6f70ac3c
BLAKE2b-256 c38f37b10fd2f1879e5b519b57d8b5a2cf2f0b5fe38babfcb20d9612618ac6bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for dwg2geo-0.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-packages.yml on milkway/dwg2geo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dwg2geo-0.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dwg2geo-0.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 137a9cf44ca87d5c4c376297e6871d123e5bd11f5133a3d628be3a765d2c0ecc
MD5 a5001fccb86235b2b599c97284e425cd
BLAKE2b-256 e2824ffbad089561175c7641b0fccfb9bf7bf0e7f2fc747fc5849fe56e42498f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dwg2geo-0.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-packages.yml on milkway/dwg2geo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dwg2geo-0.2.4-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for dwg2geo-0.2.4-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e2a8f249775725a72f4314bc1ce10b4d2db7fa5ff2ede79bf305e0e2cefc68d9
MD5 e03595dcc5a5a65502f5c3aa18c5e942
BLAKE2b-256 519f3115f838e5bc0f08023f6b3fe926ad9704fd59a645f3edcd46e56b9c6d73

See more details on using hashes here.

Provenance

The following attestation bundles were made for dwg2geo-0.2.4-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release-packages.yml on milkway/dwg2geo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.4 This release

5 files

0.2.3

5 files

0.2.2

5 files

0.2.1

5 files

0.2.0

5 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page