1

I've got a vector layer in my project which isn't aligned with the rest of the project (see attached JPEG). These are work files so I'm not sure when they were created or how they might have been messed with since they were created. We moved from ArcGIS to QGIS a couple of years ago.

The infilled blue vector layer is the one I need to move, slightly north and east, so that it correlates to the blue line (also a vector). All layers (and the project) are currently in EPSG:27700 - OSGB 1936.

If I need to create a new CRS based on OSGB 1936 and give it some new parameters, then how would I go about this?

Further information: This is on Exmoor in SW England, and the data is uniformly almost exactly 8m out to the SW point to point - i.e I need to shift it 8m NE.

Misaligned Vector Layers

  • It this infilled blue layer a vector or a raster? It's not clear from the image and description. – Pawel Jan 20 at 16:44
  • They're both vectors. – Watrevir Jan 20 at 16:46
  • There are a few things that might help if you include them in your question: Do you know what other potential CRS(s) the data may be in? Approximately where in Britain is this (this can help as distortions change depeding on location)? how many metres out is it? Is the incorrect layer shifted uniformly or is it distorted differently in different locations? – TeddyTedTed Jan 20 at 16:50
  • Changes made... – Watrevir Jan 20 at 16:56
  • If you select all the polys in the blue layers then in edit shift the upper left node of the blue layer to the same node in the blue line layer with snapping on, does it now match the blue line everywhere? – johns Jan 20 at 17:44
2

You could shift the features to their correct locations by using the command line tool ogr2ogr. If you wanted to shift all the features at 8 meters at a 45 degree angle (northeast) then use the following code

ogr2ogr shifted_data.shp original_data.shp -dialect sqlite -sql "SELECT ShiftCoords(geometry,5.657,5.657) FROM original_data"

Ogr2ogr is part of GDAL and is included with QGIS. Mine is located at C:\Program Files\QGIS 3.4\bin

The 5.657 above are the x and y shifts in metres.

| improve this answer | |
  • Along the same vein, see the options described in gis.stackexchange.com/questions/13433/… for moving single features or whole layers. You can either use these to move the whole layer, or to move one feature until you figure out the precise x- and y- delta and then use the answer above to move everything. Of course, seems likely a projection error, but if it's a one off in this layer likely not worth figuring out reprojection. – Houska Jan 20 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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