0

I have a file in DXF format. I am trying to convert this format to shapefile, but CRS does not match. The information I have is that the Coordination System is in DXF format and has UTM-based information belonging to the topographic map of the Chinese government. Also, all coordinates belong to UTM Zone 50 North and use the Bejing 1954 datum. I am converting this file to WGS84.

Here is a link to the DXF file: https://drive.google.com/file/d/1SkvwBe4Y9FAvZPyn4b-O0p5BfnL0IsgE/view?usp=sharing. I want to be able to view it in WGS84 coordinates in QGIS.

5
  • Could you tell us some sample coordinate values and their approximate location in lat-long, or which city they should be? Also, do you have a GIS package you are using?
    – Spacedman
    Jul 19 at 7:42
  • I am using QGIS. I am very new to QGIS. I want to send the files I want to convert to the experts if they can help. And I want to learn how to transform. Jul 19 at 8:07
  • Here is a link to the DXF file. I want to be able to view it in WGS84 coordinates in QGIS. please help me. drive.google.com/file/d/1SkvwBe4Y9FAvZPyn4b-O0p5BfnL0IsgE/… Jul 19 at 8:21
  • File isn't public, have sent an access req but its easier if you can make it public.
    – Spacedman
    Jul 19 at 9:11
  • I'm sorry. I thought it would be shared immediately after linking, but it doesn't. Now it is shared. Jul 19 at 9:18

2 Answers 2

2

The ogrinfo command line utility tells me its coordinate extent is:

Extent: (627.649021, 4665.315550) - (652.503142, 4698.809243)

And its coordinate reference system is:

Layer SRS WKT:
(unknown)

The "unknown" means anything we do now will be guesswork. Assuming these numbers are derived from UTM they are possibly in metres - does that make sense? Is your data from an area approximately 25 metres by 33 metres (the difference in the extent X and Y limits)? Or is it more like 25 kilometres by 33 kilometres? These numbers might make more sense if they are kilometres, otherwise they are very close to the (0,0) reference point.

Once that's established, the problem is going to be finding out where the reference (0,0) point is. This is related to the choice of UTM zone. If you know which UTM zones the points might come from you can try several until you hit the right spot. Maps of UTM zone codes are available if you search.

For your second example, survlimits, the coordinates are in metres, but there's still no reference system associated:

Extent: (399497.662923, 4666343.184640) - (415616.488522, 4679517.726046)
Layer SRS WKT:
(unknown)

If I load it into QGIS it appears but it has no coordinate system, so I need to use the menus to give it one. But which one? There are several UTM 50N zones, but the WGS84 (EPSG code 32650) locates it here:

enter image description here

which for wider context is the red dot here:

enter image description here

If the UTM zone is correct then that should be in roughly the right place. If the longitude is wildly out then maybe its UTM49N or UTM51N.

I'm not sure what effect the Beijing 1954 datum will have at the moment though. I did also try WGS72 UTM zone 50N which moved the polygon slightly.

5
  • Thank you very much for your kind reply. From my information, I know that the unit of measurement is km. I have one more DXF file adjacent to the file you just mentioned. In the case of this file, it displays the correct coordinates. I tried applying the same coordinate system as this file, but it didn't work, so I asked this question. Should I find the most likely UTMs individually through trial and error? Can't you check the DXF file that comes out well when you have time? This file is adjacent to the previous file and Polygon. Jul 19 at 10:59
  • In the case of the second file, if you map it using the removed EPSG:3829, it comes out correctly. So the survlimits.dxf file is fine. However, I couldn't find the right CRS in the first linked file, so I'm trying. Jul 19 at 19:16
  • You'll need to multiply all the numbers by 1000 to make it work with most ready-made EPSG codes, which are defined in metres, or you need to create a custom code with the WKT epsg.io/3829 and change the unit to km.
    – Spacedman
    Jul 19 at 19:23
  • I appreciate your answer. You gave a solution, but since I'm a beginner in QGiS, I need help understanding what procedure to do next for your answer. I tried to convert the DXF file from the site you linked, but it didn't work, so I would like to know how to do it again. Jul 19 at 19:55
0

If the coordinates of the "wrong" DXF in the same CRS are given in kilometers instead of meters, you can create a custom CRS that has the appropriate parameters.

Example EPSG:3829 Proj.4 Original (+units=m):

+proj=utm +zone=51 +ellps=intl +towgs84=-637,-549,-203,0,0,0,0 +units=m +no_defs"

Adjusted (+units=km):

+proj=utm +zone=51 +ellps=intl +towgs84=-637,-549,-203,0,0,0,0 +units=km +no_defs"

enter image description here

1
  • In the case of the second file, if you map it using the removed EPSG:3829, it comes out correctly. So the survlimits.dxf file is fine. However, I couldn't find the right CRS in the first linked file, so I'm trying. Jul 19 at 16:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.