Lately, I found some cadastral data in dwg format in order to extract parcels for a research of mine. Through use of Draftsight I converted this kind of file in dxf format, much more readable in a Gis Open Source like QGIS. But, when I was opening those files I discovered that Draftsight doesn’t have assigned any reference system to my data, leaving it in x-y undefined coordinates.
Because of convenience reasons, I performed a one more conversion, now in shapefile format. Then,I compared the own vectorial in dxf with one having known coordinates in WGS84 in order to extrapolate GCP – Ground Point Control by Catch Coordinates of QGIS.
Gathering the set of common points, I assigned the georeferencing operation by ogr2ogr by command line in a linux shell. Here, we can see the command sintax for perfoming this kind of operation:
ogr2ogr -t_srs [srs_def] -gcp x_nongeoref y_nongeoref x_georef y_georef out.shp in.shp
- -t_srs [srs_def] is an option for the output reference system
- -gcp declares gcp points
- in.shp input file ( x-y coordinates)
- out.shp output file (georeferenced file)