4

(please excuse my poor english)

I do have a polygone shapefile of an archaelogical site with elevation data of 10cm steps and I dont get hands on the raster data as it was collected by the drone.

My problem is, that I need to move and resize the polygones, due to even though the shape say's it is a DHDN/GK3, the lower-left corner of the collected data is 0,0 and the x & y extends seam to be decimenter relative to this origin.

Is there any useful way to solve the problem with QGIS + tools (using Ubuntu Linux) ?

My so far best thought is....

a) CSV-Geometry export via MMQGIS (temp-nodes.csv, temp-attributes.csv) The CSV counts ~8.500.000 nodes b) Suggest origin from so far data (kept as variable) c) pipe node-csv through script to convert decimeter to meter, to get the new delta x/y from the origin d) add the new delta x/y to the origin and save e) CSV-Geometry improt via MMQGIS

Is there any way to solve this easier? It's been years since I have written scripts.

Chris

Pallasch
  • 143
  • 7
  • This question might give you further hints: http://gis.stackexchange.com/questions/83861/using-customized-coordinate-system-for-archaeological-site-data – AndreJ Dec 06 '14 at 06:04

1 Answers1

3

1) Since version 1.10, you can use ogr2ogr (GDAL) to agjust/"georeference" a shapefile with control points or GCPs (as Spatial adjustment in ArcGIS, look at How to georeference a vector layer with control points? or Add ability to transform vectors based on GCPs in ogr2ogr)

Example

ogr2ogr -gcp 5 -135 0 0 \
     -gcp 283 -135 1000 0 \
     -gcp 5 278 0 1000 \
     -gcp 283 278 1000 1000 \
     -f "ESRI shapefile" gcppolyg2.shp gcppolyg.shp

Simple result with scaling, translation, rotation and shearing of a simple original shapefile

enter image description here

Two QGIS plugins and a processing python script were created to take advantage of this feature:

Plugins:

  1. VectorBender: does to vectors what georeferencers does to raster. This feature is also known as "rubber sheeting"
  2. vectorgeoref : a visual tool to georeferencing vector layers

Processing Python script (in French):

2) You can also use affine transformations with the QGIS plugin Affine or the command v.transform in GRASS GIS or in the Processing Toolbox of QGIS

enter image description here

There are equivalent commands in GVSIG or OpenJump

enter image description here

Affine transformation in OpenJump

gene
  • 54,868
  • 3
  • 110
  • 187