When I ran the process without the -a srs option the transformation didn’t work. I tried specifying it as EPSGS:4326 as well in testing and it still converted fine. I used the EPSG that I want to transform my DXF to (EPSG:26910). Important: must specify a source SRS/CRS with -a_srs EPSG:xxxx option. In the Convert Format window: Select your input DXF (if you added to the TOC then it should be auto filled)Ĭheck the box to Convert all layers from dataset In the Processing Toolbox panel > GDAL > Vector Conversion > Convert Format.ĭouble click Convert Format to open the window. See documentation for more info on usage of the ogr2ogr command. If option 1 did not give you a good transformation (since it only uses 2 points) and you want to try using all 4 GCPs (or more) to georeference the DXF then you can use the GDAL org2org Vector Convert option. Here is my QGIS project with the DXF file that has no CRS (default project CRS will be EPSG 4326, OK to leave as is). If you try to capture the coordinates in a single QGIS project/view then you won’t get the right coordinates to do the translation. Note: you need to do this in 2 different QGIS projects or views since the DXF has an unknown CRS. With the two QGIS projects open, use the Coordinate Capture tool to get the XY coordinates of the GCPs. So, what you do is open up 2 QGIS projects: one with just the DXF file and the other with a basemap or some other layer that has the CRS that you want to georeference the DXF to. These will be used to link the points in the DXF file to some real world locations. To georeference the DXF file you will need to generate some GCPs. Install Another DXF Importer - this plugin will allow you to import DXF files as well as georeference using a world (*.wld) file. Install Coordinate Capture - this plugin allows you to capture XY coordinates in different CRS and is useful for getting the coordinates for GCPs used in the georeferencing. To install plugins, in QGIS: go to Plugins menu > Manage and Install Plugins. The following 2 QGIS plugins should be installed. If you’re using this site, disregard the CRS/SRS that’s noted in the download section - see example snapshot below, which shows a small sample area of Ladd’s Addition neighborhood in Portland. You can use this site to download publicly available data such as OSM and USGS as DXF files - free for areas up to 1 km2. The demo DXF file used here was downloaded from CAD Mapper website. Only use the Import/ DWG/DXF tool in QIGS (Project menu > Import/Export > Import Layers from DWG/DXF) to convert to a geopackage when the DXF is in real world coordinates and you know what the CRS is. This is just explicitly telling the software what the CRS of the DXF is. has real world coordinates) then you can just specify what that CRS is in QGIS and it should be correctly placed. If you have a DXF file that is already in geographic space (i.e. I use the free Windows desktop app AutoCAD TrueView Viewer. But if you have a DWG file that QGIS cannot read then you may have to downgrade for convert. QGIS can read most DXF and DWG version 2000 and below (e.g. I’m using QGIS 3.24.2 but other 3.x versions may also work. Georeference DXF using: Another DXF Importer with the wld file or ogr2ogr via the QGIS Processing Toolbox (GDAL > Vector conversion > Convert format)įirst, some useful notes and tips that are good to know. Generate GCPs by: setting up 2 QGIS projects and using Coordinate Capture to get ungeoreferenced and georeferenced XY coordinates for the GCPsĬreate world (*.wld) file using the GCPs coordinates Install QGIS Plugins: Coordinate Capture and Another DXF Importer Below is a quick summary of the workflow: This posting goes over the workflow I use for working with CAD data in QGIS, specifically how to georeference a DXF file. So for those who don’t have access to ArcGIS, here’s an alternative for working with CAD (dwg/dxf files) using QGIS. I know not everyone has access to ArcGIS and/or CAD software. It makes my workflow more efficient, and I can get things done faster. Over the last few years, ESRI/ArcGIS has been advancing data interoperability between CAD and GIS – using ArcGIS, I love the ease with which I can pull in CAD data in GIS and vice versa for the Engineers and Architects I work with who need to pull in GIS data into their CAD software. I often work with CAD data that is often in paper space (not in geographic space that has real world coordinates), so I need to georeference the CAD file and be able to bring it into GIS and view it along with other GIS layers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |