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.3.tar.gz (171.8 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.3-cp39-abi3-win_amd64.whl (890.0 kB view details)

Uploaded CPython 3.9+Windows x86-64

dwg2geo-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (952.9 kB view details)

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

dwg2geo-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (882.7 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

dwg2geo-0.2.3-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (1.7 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.3.tar.gz.

File metadata

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

File hashes

Hashes for dwg2geo-0.2.3.tar.gz
Algorithm Hash digest
SHA256 4a07bcc2d67c84d4939ac44fbe677a9ff3ed646f620a1f2dccc2f49fca3d72b0
MD5 21c384e3d01ebada67b17e9f311f99b8
BLAKE2b-256 5429f7b07fb49ccb490f13c37b9128f9221efb52441d0c7579ae2363eef5ccdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for dwg2geo-0.2.3.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.3-cp39-abi3-win_amd64.whl.

File metadata

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

File hashes

Hashes for dwg2geo-0.2.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9b05fe8da83dc40e70e5368391a33411c9ab4055cfcd1ab969750cc07b1be1e1
MD5 42faab5e76708db28619ccb0ac492c96
BLAKE2b-256 b451655d6b9d912d7fec2e3c654f3ee8aee984297d21336b74d31a02fc7ca9a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for dwg2geo-0.2.3-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.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dwg2geo-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e1427503a828dc60e90cadb9006b0e59f5db6a3799a4c3f6a973f0ceebb7dcfc
MD5 6cbd52805e8d30a14a9cc7d67eab7485
BLAKE2b-256 bee032ae32fb76456243fc6070aa245457a25761a757a27a3c4e2941ecd19c2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dwg2geo-0.2.3-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.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dwg2geo-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7b49f1bc17361a2a4178c946f413727ea8b1d7d80acafe809c7904e17b725464
MD5 93e88e9c4eb386e484e08a8534f42962
BLAKE2b-256 210e7e91c0579e93d72617d51d69571cf918ecccdec1df8b7ea1ca9d50959a10

See more details on using hashes here.

Provenance

The following attestation bundles were made for dwg2geo-0.2.3-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.3-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.3-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 411f8cc264978d8a0f1494a75075140ce4fc466f2e21a75349fa3ed3deb11bcc
MD5 200dd1eb924733cf8212e032d143957f
BLAKE2b-256 890679cd2bc55496377fc852a6f1c916867f448d2918cd20c5694af05a03676b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dwg2geo-0.2.3-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

0.2.4

5 files

This release

0.2.3 This release

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