[Qgis-user] importing dwg/dxf

John Layt j.layt at lparchaeology.com
Mon Nov 22 01:40:52 PST 2021


Hi,

We regularly have these issues, architects and civil engineers love their
local coordinate systems. If it's engineers, they usually do have a
transform available, as they need it to set out their site, but architects
have no clue... And then you get the weirdos who trim random digits off the
real-world co-ords!

Our usual solution is to first convert any DWG to DXF using ODA File
Converter (https://www.opendesign.com/guestfiles/oda_file_converter). Then
we usually use the AnotherDxfImporter plugin to import as Shapefiles or
GeoPackage, as it better imports attributes and styles than the built-in
QGIS support. Finally we use the VectorBender plugin to transform the data
using real-world points. AnotherDxfImporter supposedly can also transform
the data during the import, but I've never got it to work properly, the
whole plugin is a little quirky :-)

We'd love QGIS to improve it's DXF/DWG support, at least to pull in the
attributes like AnotherDxfImporter does. If there was a fundraiser I could
probably convince the bosses to throw in some coin.

Cheers!

John.


On Mon, 22 Nov 2021 at 01:05, Richard Greenwood <richard.greenwood at gmail.com>
wrote:

> Any AutoCAD drawing *can* be on real world coordinates. They're often not
> because no real world coordinates were readily available for the project
> and there wasn't a compelling need for real world coordinates. AutoCAD
> Map3D and subsequent versions with different names like "Civil 3D" have
> support for coordinate system conversions, but that doesn't mean that a
> DWG/DXF that was produced in vanilla AutoCAD can't be on a real world
> coordinate system.
>
> AutoCAD is always Cartesian projected coordinates (not spherical
> geography) so you can open a DXF into a QGIS project and then use the QGIS
> move tool to move it onto whatever reference data you have in the project.
> The AutoCAD data might be in different units that you need but you can take
> a guess and use the QGIS scale tool. A common problem in the USA is an
> AutoCAD file that's in inches but your project is in feet. So scaling by 12
> fixes that. And QGIS has a rotate tool that allows for aligning
> different "norths". So with the three QGIS tools move, scale and rotate you
> can do an affine transformation. Maybe not as accurate or as clean as you
> might hope for, but it's a solution that I've used many many times.
>
> On Sun, Nov 21, 2021 at 11:59 AM Nicolas Cadieux <
> njacadieux.gitlab at gmail.com> wrote:
>
>> Hi,
>>
>> Only AutoCAD Map3D was a certain comprehension of what a CRS is.  To my
>> knowledge all other Autodesk Pilotdo not used any CRS.  It is my honest
>> opinion that AutoCAD Map is the worst attempt to make a GIS.
>>
>> Nicolas Cadieux
>> https://gitlab.com/njacadieux
>>
>> Le 21 nov. 2021 à 13:52, Bernd Vogelgesang <bernd.vogelgesang at gmx.de> a
>> écrit :
>>
>> 
>> On 21.11.21 15:35, Nicolas Cadieux wrote:
>>
>> Hi,
>>
>> .dwg or dxf have no CRS.  They can be in inches, feet, mm, cm, m...
>> Usually meter in a local CRS like a local WGS84 UTM ZONE is used.  You can
>> usually find this in the metadata if available.
>>
>> Nicolas
>>
>> I have no deep technical insight into dwg or dxf, but I am pretty sure
>> that those  CAD-"products" are able to be produced with valid coordinates,
>> fitting to a common CRS. Most people using CAD-systems simply seem to be
>> either too stupid for that, or just do not care.
>>
>> One of the reasons, CAD-"data" is produced with a local reference system
>> instead with a normal CRS is, according to an CAD-operator I once asked
>> about this, that some CAD-systems just slow down to in-operability when
>> using real-world coordinates because of the huge numbers, compared to the
>> small coordinates in their own system.
>>
>> So, I would not even try to fix this, but instead ask those guys to stop
>> scratching their balls and better send you proper real-world data and tell
>> you which CRS they are in . The handling of this "data" is punishment
>> enough afterwords.
>>
>> Hope my dislike for this "technology" was not too obvious ;)
>>
>> Cheers,
>>
>> Bernd
>>
>>
>>
>> On 2021-11-21 9:07 a.m., Greg Troxel wrote:
>>
>> Boaz Bar Ilan<boazprosie at gmail.com> <boazprosie at gmail.com>  writes:
>>
>> i always have problem importing dwg or dxf .  the layers  dont fit the
>> coardinations and even when i set the layers crs it doesnt work.
>>
>> I am far from an expert, but recently tried to deal with a dwg.
>>
>> My impression is that they are almost always in local coordinates, and
>> the path to success is something like using GeoScience plugin to define
>> a local CRS based on control points where you know global coordinates
>> and local, and then to use that CRS for the data.
>>
>> I recently imported some "PNEZD" data (csv with point it, northing,
>> easting, vertical, and description, all in an unspecified local grid,
>> from a total station data collector) and used geoscience to align it
>> wtih RTK obsservations of a few points, and things fit quite well.
>>
>> How are you getting dwg?  Are you using the proprietary dwg library with
>> gdal, or is there some open source path?
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>>
>>
>> _______________________________________________
>> Qgis-user mailing listQgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>
> --
> Richard W. Greenwood
> www.greenwoodmap.com
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20211122/9ecda02b/attachment.html>


More information about the Qgis-user mailing list