[solved] convert dxf from custom CRS via dwgmapconvert

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
pechnik
Newbie Member
Posts: 7
Joined: Wed Feb 17, 2021 3:52 pm

[solved] convert dxf from custom CRS via dwgmapconvert

Post by pechnik » Thu Mar 25, 2021 8:58 am

Hello,

I need to generate map tiles from dxf files. This dxf files contains data in custom CRS(it does not represented in known EPSG projection).

Here(changelog 3.24.3 (2020/03/17)) i found that we can pass custom projection in JSON configuration file. But there is no examples how to do it.

Thanks.

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: convert dxf from custom CRS via dwgmapconvert

Post by andrew » Thu Mar 25, 2021 4:03 pm

That method has been dropped as QCAD now uses the PROJ library which supports lots of projections.

Do you know the ESRI WKT (well known text) for your projection? If so, you should be able to pass that to dwgmapconvert instead of the name/code. ESRI WKT looks for example like this:

Code: Select all

PROJCS["CH1903+_LV95",GEOGCS["GCS_CH1903+",DATUM["D_CH1903+",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],PARAMETER["azimuth",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",2600000],PARAMETER["false_northing",1200000],UNIT["Meter",1]]
So your command could look for example like this:

Code: Select all

./dwgmapconvert -segment-length=0.5 -crs-in=EPSG:3857 -crs-out=PROJCS["CH190.+_LV95",GEOGCS["GCS_CH1903+",DATUM["D_CH1903+",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],PARAMETER["azimuth",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",2600000],PARAMETER["false_northing",1200000],UNIT["Meter",1]] -f -o epsg2056.dxf epsg3857.dxf

pechnik
Newbie Member
Posts: 7
Joined: Wed Feb 17, 2021 3:52 pm

Re: convert dxf from custom CRS via dwgmapconvert

Post by pechnik » Fri Mar 26, 2021 12:10 pm

Yes, with ESRI WKT string it works fine!

Thanks

Post Reply

Return to “QCAD 'How Do I' Questions”