Relative Content

Tag Archive for gisopenlayersqgis

Georeferencing in OpenLayers

I am trying to implement georeferencing in OpenLayers. I’ve got most of it right. But when there is a difference in aspect ratio and rotation between the source and target control points the results are wrong. I looked into QGIS which has this scenario working when the transformation type is Polynomial 1 and the Resampling method is Lanczos. But my solution is using Helmert. I copied the code from the internet. I don’t understand how the different transformation types and resampling work. Can someone help in implmenting the QGIS solution in OpenLayers.

Create grid perimeter with OpenLayers

Given 2 coordinates and a width, I’m creating the perimeter of a grid in Openlayer with Google map in background.
The distance between the 2 coordinates is 500 meters.
And the width of the grid has to be 250 meters.
I was able to compute the 2 other points of the grid perimeter, but if I compare with the perimeter created on other software like QGIS, I have an error of about 1 or 2 meters, not in the length of the 250 meters but in the orientation. (the angle is not correct, the perimeter angle should be on the point ST2).