Hot answers tagged

9

The easiest would be to have your polygon centered on (0;0) and to use st_translate using the target point X;Y as the delta X and delta Y. Using any polygon, you would compute the delta by removing the polygon centroid X and Y from the target point X and Y: WITH pt AS (SELECT 'point(-75.5 47.2)'::geometry geom), poly AS (SELECT 'polygon((-70 41, -71 41, -...


3

Its a bit obscure, but the elide function in the maptools package can be used to move sp class objects. This works for all point, line, and polygon classes. Following the data setup in help(elide) here's a river polygon shifted 0.10 units up and across: > plot(rivers1) > plot(elide(rivers1, shift=c(.10,.10)),add=TRUE) > axis(1) For sf objects ...


3

If you need to shift the input layer, you can use the QGIS processing tools and in particular Translate: process: draw an origin point on a vertex and read the coordinates draw a second destination point and read the coordinates make the difference of the coordinates and use them in the Translate algorithm Move vector layer based on YX (Meters)


2

Yes, enable snapping. To show this tool go to view -> toolbars:


2

If you need only to move the input layer, you can use the great gdal/ogr ogr2ogr output.shp input.shp -dialect sqlite -sql "SELECT fieldOne,fieldTwo,ShiftCoords(geometry,-11.869,60.133) FROM input" -11.869,60.133 are shiftX and shiftY. Note: fieldOne,fieldTwo are all the input fields except the geometric one


2

I understand you want to place your point based on a field containing lat and long. There are multiple ways to do it with code and editing direcly the layer. What I would suggest is to build a temporary new layer based on the field and then choose either to replace your layer or only replace some point on your layer. Steps : Open Menu > Processing > ...


1

We can perform the same affine transformation to all the images. To create b.tif, wich is moved 20 m to the West and 10 m to the North, from a.tif, in its own coordinates reference system: gdalwarp -ct "+proj=affine +xoff=-20 +yoff=10" a.tif b.tif It can also be done in QGIS from the GDAL Warp (reproject) processing algortihm, including the -ct &...


1

There are several options. At least these two solutions should be easy to implement: You can create now, tranlated points using QGIS expressions (see here how to do it). Use the Geometry by expression option - this creates actual geometries (and a new layer), but might be the better option for a big numer of features. Check the box next to Selected features ...


1

Yes, it's possible. You need to: Click on the Enable Topological Editing button in the Snapping toolbar. Start the edit session on both your point and line layers. Click on Vertex Tool (All layers) (although, Vertex Tool (Current layer) also worked for me). This enables a tool that you can use to move a common vertex in both point and line layers, as you ...


1

I talked to the Editing team and this behavior is by design - they'll consider adding an option to change/disable it. In the meantime they suggested a workaround: if you hit Esc after the paste is completed, it will de-activate the tool. Hope this helps!


1

I verified that this (undesirable) behavior still occurs in 2.6.1 patched latest as of this answer. (Caveat: you're probably not gonna like my suggested solution.) First: this sure looks like an ESRI bug, IMHO, because if you simply create a feature, or simply select an existing feature, then the Edit > Move tool is not automatically activated. Post it to ...


1

A translation of coordinates is an affine conversion. It can be done, with pyproj, through a PROJ Affine Transformation pipeline: from pyproj import Transformer import numpy as np np.set_printoptions(precision=3,suppress=True) # points list in [X,Y,Z] points = [[0,0,0], [1,0,0], [0,1,0], [0,0,1], [-1,0,0], [0,-1,...


1

Create a copy of A as C. Use refator fields on C to delete all columns except the ID. Perform a join by attribute with C and B and bring all the information. The new layer C will have the geometries of A and the information of B.


Only top voted, non community-wiki answers of a minimum length are eligible