I have a dwg (Autocad) drawing file which represents an extract of a map. This file contains about 50 layers (on per kind of object : trees, road etc). I have extracted all the layers in GeoJSON format (one GeoJSON file per layer).

What I am looking after is to georeference this map, basically I want 50 GeoJSON files so I can load them into a web interface and play with the opacity of each one.

The work had been partially done : One extracted layer (In GeoJSON format) is georeferenced. The layer is the one that represents the roads.

How to georeference the 49 other layers using this "master" layer?

I have already GDAL and python installed.

I am very new to the GIS environment.

  • @antonie if you load the other layers what' app? Apr 10, 2017 at 12:23
  • The layers are arbitrary georeferenced in the middle of the ocean... I guess this is what happens with the dwg > GEOJson conversion.
    – Antoine
    Apr 10, 2017 at 12:27
  • which converter are you using?@Antoine Apr 10, 2017 at 12:45
  • I'm using Gdal (ogr2ogr). ogr2ogr -f GeoJSON -a_srs epsg:3857 -dialect SQLite -sql "select * from entities where LAYER='NAME_LAYER'" layer.json myfile.dxf The "master" layer had been georeferenced AFTER the extraction of the different layers.
    – Antoine
    Apr 10, 2017 at 12:50
  • If you can identify the origin (0;0) of the road layer in decimal degrees, you can setup a custom transverse mercator projection based on that point for all layers.
    – AndreJ
    Apr 11, 2017 at 5:38

1 Answer 1


If you have time to redo the GeoJSONs, it could be possible to do this in the CAD environment using the AutoCAD World File Tool available here.

Step 1: Export the georeferenced shapefile into CAD. Right click on the shapefile name and select Data -> Export to CAD

Step 2: With the georeferenced shapefile open in CAD, type the XREF command. This will open a file reference box. Open the drop-down menu under the DWG icon and select DWG. Navigate to the AutoCAD drawing you want to georeference and select it. In the following window, under Scale de-select “Specify on Screen” and select Uniform Scale. Select “Specify On Screen” for Insertion Point and Rotation and leave Reference Type as “Overlay”. Click OK.
Select the point of insertion and rotation angle in order to place the floor plan.

Step 3: Use the ALIGN command to match it up perfectly to the georeferenced layer.

Step 4: Use the APPLOAD command and load the AutoCAD World File folder.

Step 5: Use the CREATEWORLDFILE command and select any/all layers you want to georeference. Do not change the name of the .wld file and make sure it is saved in the same folder as the dwg file you are bringing into GIS.

Step 6: Use the Features to JSON tool in GIS to create the georeferenced GeoJSONs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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