Several of the answers provided here are no longer options for QGIS 3, and/or only allow for linear transformations of the vector file being georeferenced. This may answer the OP's question, but others who look at this post may want other transformation options for georeferencing vector files.
Issues with some of the solutions for georeferencing vector files:
The qgsAffine plugin only allows for linear transformations. This
means it can scale, rotate, and move the vector file, but it cannot
bend or warp the vector file. The Georeferencer for raster files
provides more options, and allows for a variety of transformations,
including second order polynomial and thin plate spline. Also, it
does not appear that the qgsAffine plugin is still available in QGIS 3.
The GRASS module v.transform is similar to the qgsAffine plugin, and
only allows for linear transformations.
The Vector Bender plugin looks like it was a good option, but it has
not been fully ported to QGIS 3, so isn't currently an option. It
does not look like it is being maintained anymore.
Using ogr2ogr, as is suggested in HeikkiVesanto's post, is a good option. It allows one to use GCPs (Ground Control Points), and specify what type of transformation you would like. I could not find instructions anywhere on how to do this, so I have included some instructions below:
Generate a set of GCP pairs, with one point being the original
location in the ungeoreferenced vector file, and the other point
being the desired location in your georeferenced workspace.
There are a variety of ways to generate GCPs. I used the
Georeferencer GDAL plugin in QGIS. This is available under the
Raster dropdown menu, after it is installed using the Plugin manager.
It only works on raster files, so you first must convert the vector
file to a raster file. This is possible with "Processing Toolbox:
GDAL: Vector conversion: Rasterize (vector to raster)". Set the
resolution to number that still allows you to see the features of the
vector file.
The Georeferencer has a nice interface, that allows you to add many
GCP points. You can also test out different transformations, and see
which works best. And you can see if any of your GCP points are
likely to be in error, by looking at their residuals. Once you have
added all your GCP points, and checked that you like the output, you
can export the GCP file from the Georeferencer to use for georeferencing the original vector file.
The GCP file needs to be changed to be in the following format. You
can add as many GCP points as you like, each is proceeded by a -gcp
and separated by a space. I ran this with 800+ GCP points, and it worked great.
-gcp <ungeoref_x1> <ungeoref_y1> <georef_x1> <georef_y1> -gcp <ungeoref_x2> <ungeoref_y2> <georef_x2> <georef_y2>
There are a variety of ways that one could change the GCP points
into the right format. I imported them into Excel as a csv file,
and created a column to output the right format for each point.
Then I pasted that column into TextEdit and replaced the line ends
with spaces.
The vector file that you want to georeference should be imported
into your workspace using the same SRS that you want for the final
georeferenced file, which should be the same SRS as your workspace.
It might be a long ways from where it should be, if it originally
used a different SRS, but the transformation will move it to the
correct location.
Access ogr2ogr through "Processing Toolbox: GDAL: Vector conversion:
Convert format". This allows you to select the vector file you want
to georeference, and your output file. In the "Additional creation
options" field, add a command specifying what transformation type you
want, and then the line with all your GCP points.
Commands for different transformation types include:
- "-order 1" for linear
- "-order 2" for second order polynomial
- "-order 3" for third order polynomial
- "-tps" for Thin Plate Spline.
For example, the code added into the "Additional creation options" field might look like:
-order 2 -gcp <ungeoref_x1> <ungeoref_y1> <georef_x1> <georef_y1> -gcp <ungeoref_x2> <ungeoref_y2> <georef_x2> <georef_y2>