3

I'm working in a project with whole Europe data. I'm working with WGS84 (4326), and sometimes I overlay my polygons with Google maps layer (in QGIS) to see some details. When I do this, I have to reproject all the data to EPSG:3857, and it shows without problems.

In the image, Portugal coast matches with the polygons. enter image description here

The problem comes when working with switzerland data. I'm seeing that not overlays 100%, but it shows a difference of +-500 meters.

In the second image, coast of a lake in Switzerland, is 500 meters moved. enter image description here Does someone knows why could could be happening this?

The rest of countries don't show any problem too. The only problem I see is In switzerland.

3
  • Where did you get the swiss shapefile from? Some sources are heavily generalized. That's not a fault of QGIS or the Openlayers plugin.
    – AndreJ
    Aug 12, 2014 at 17:38
  • The dataset is from GDAM Switzerland boundaries gadm.org I've tried with the official Swiss topographic data, and the results are better Aug 13, 2014 at 10:18
  • 1
    GADM is known for its generalized data. You can not expect much accuracy from that source.
    – AndreJ
    Aug 13, 2014 at 17:50

2 Answers 2

2

Since all the other countries seem to match, the problem seems to be with the swisserland data. Check again if u have set the right coordinate system for the layer. If it checks out, its probably a faulty dataset.

If u know the offset, you could try to reproject the layer with the qgsaffine plugin.

Martin

Update on how to use it:

-Install the plugin, you can find it as "Affine Transformations" in the plugin installer.

-Put your layer in edit mode.

-Press the plugin icon to open the plugin window

-Enter your x and y offset into the last boxes of the respective columns

-Press Transform

Here is an expample with a 0.1° offset in x and y for a point layer.

Point Transformation with qgsaffine

4
  • 1
    Pls dnt use txtspk.
    – user2856
    Aug 13, 2014 at 4:55
  • I didn't know about qgsaffine. I've downloaded it. Any clue on how to use it? Aug 13, 2014 at 12:32
  • Ok Thanks. Now I know how to use it, but I don't get the expected results. I find missing polygons, are not moving the same distance. What I'm looking for is something simmilar to manual move. I can't use manual move because of the big amount of polygons in may dataset. Aug 13, 2014 at 16:05
  • 1
    Hm, not sure what you did. I just did it with the swisserland data you linked above and it worked fine. Make sure you select "Whole Layer" and that you enter the displacement in the right unit. E.g. i used -0.0025 degree in y direction.
    – martin
    Aug 13, 2014 at 16:40
0

Ok finally I found the solution with postGIS st_translate

select id, st_translate(geom, -0.00045, -0.00073)  from tmp_che_adm3

The most important part is to find the correct offset in degrees.

I think, for simply move geometries in XY is faster than qgsaffine

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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