[Qgis-user] clip is working but CRS transformation not

Reginald Carlier Reginald.Carlier at ingelmunster.be
Fri Sep 2 05:39:57 PDT 2016


Hi,

The clip function is working properly. The problem is the fact that by changing the CRS the extend is not transformed. In ArcMap the same happens except if you use the tools available in the toolbox (under Data Management). In this projection tool you can choose a transform parameter which places the changed shapefile in the right location. So far I did not find this transformation options in QGIS and whatever I try, after changing a Lambert 72 shape to WGS 84, the file is not placed in the right spot. I used the QMS Service and added Mapsurfer OSM Roads. The osm shapefile shows in the right place but the shape of the town is not transformed to this WGS 84 coordinates and is placed far above the place where the osm shapefile is placed.

Regards,


Reginald Carlier
Deskundige GIS

[http://www.ingelmunster.be/ingelmunster.gif]

Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T +32 51 33 74 39 www.ingelmunster.be<http://www.ingelmunster.be>

[http://www.ingelmunster.be/fb.jpg]<https://www.facebook.com/Ingelmunster/> [http://www.ingelmunster.be/go.jpg] <https://plus.google.com/+ingelmunster>  [http://www.ingelmunster.be/in.jpg] <https://www.instagram.com/ingelmunster/>  [http://www.ingelmunster.be/pi.jpg] <https://www.pinterest.com/ingelmunster/>  [http://www.ingelmunster.be/tw.jpg] <https://twitter.com/ingelmunster>
Van: Nicolas Cadieux [mailto:nicolas.cadieux at archeotec.ca]
Verzonden: vrijdag 2 september 2016 14:17
Aan: Reginald Carlier
Onderwerp: Re: clip still not working on osm shape

Hi,

By "extent", I now understand the you mean that the layer is not in the correct spot.  (In my mind, extent only changes once the clipping is done.).

The coordinates may not change much depending on the type of transformation you are asking.   The idea is to get both layer to overlap in the right spot.  Then to clip the layers using the clipping tools.

For both layers (clipping and osm), ask yourself the following:  Are both layers overlapping? Are both in the correct CRS?  Are both correctly georeferenced? If so, then you should be able to clip them.

If the layers overlap, then does the clipping tool work?  Try with a simple file and test with different files formats.  It may be that the osm file format is giving you problems.  The OSM is a vector file?

Make sure you turn off the "on the fly CRS".  If it's activated,  the layer will be reprojected on the fly using the project CRS that you see in the lower right corner of the screen.  I usually use a wms server as a background to help georeferenced things.

Nicolas

Envoyé de mon iPad

Le 2 sept. 2016 à 02:20, Reginald Carlier <Reginald.Carlier at ingelmunster.be<mailto:Reginald.Carlier at ingelmunster.be>> a écrit :
Hi,

I tried the Reprojection layer tool but that doesn’t change the extent. The reprojected layer appears in the same spot as the old layer.

Reginald,


Reginald Carlier
Deskundige GIS



Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T +32 51 33 74 39 www.ingelmunster.be<http://www.ingelmunster.be>

[http://www.ingelmunster.be/fb.jpg]<https://www.facebook.com/Ingelmunster/> [http://www.ingelmunster.be/go.jpg] <https://plus.google.com/+ingelmunster>  [http://www.ingelmunster.be/in.jpg] <https://www.instagram.com/ingelmunster/>  [http://www.ingelmunster.be/pi.jpg] <https://www.pinterest.com/ingelmunster/>  [http://www.ingelmunster.be/tw.jpg] <https://twitter.com/ingelmunster>
Van: Nicolas Cadieux [mailto:nicolas.cadieux at archeotec.ca]
Verzonden: donderdag 1 september 2016 16:31
Aan: Reginald Carlier
CC: qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>
Onderwerp: Re: clip still not working on osm shape

Hi,
You are correct.  Sorry, I was working from memory.  Try Qgis geoalgorithms, Reprojection layer. You can search the processing plugin with"reprojection".

The right click is to activate toolbars for the "digitizing"and "advanced digitizing toolbars."

Nicolas

Envoyé de mon iPad

Le 1 sept. 2016 à 09:57, Reginald Carlier <Reginald.Carlier at ingelmunster.be<mailto:Reginald.Carlier at ingelmunster.be>> a écrit :
Hi Nicolas,

I’m a little lost here. I use QGIS 2.16.1. When I right click next to the toolbars I see no plugin that changes the CRS.
When I save a file there is no option to choose the input CRS and output CRS. You can choose the CRS and there’s a checkbox to choose the extent which is not checked by default. So I don’t know what to do if I want to change the extent to the new CRS.
Which of the 111 geo algorithms should I use to change the CRS and reproject the extent?

Regards,


Reginald Carlier
Deskundige GIS

[http://www.ingelmunster.be/ingelmunster.gif]

Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T +32 51 33 74 39 www.ingelmunster.be<http://www.ingelmunster.be>

[http://www.ingelmunster.be/fb.jpg]<https://www.facebook.com/Ingelmunster/> [http://www.ingelmunster.be/go.jpg] <https://plus.google.com/+ingelmunster>  [http://www.ingelmunster.be/in.jpg] <https://www.instagram.com/ingelmunster/>  [http://www.ingelmunster.be/pi.jpg] <https://www.pinterest.com/ingelmunster/>  [http://www.ingelmunster.be/tw.jpg] <https://twitter.com/ingelmunster>
Van: Nicolas Cadieux [mailto:nicolas.cadieux at archeotec.ca]
Verzonden: donderdag 1 september 2016 15:24
Aan: Reginald Carlier
CC: qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>
Onderwerp: Re: clip still not working on osm shape

Hi,
To modify the shape files, you need to activate the toolbars by right clicking next to a toolbar.  You will find a number of plugins also to help modify object.

When you save a file, I think you have a input CRS and a output CRS.  Make sure the add both.  If it's not there, look in the processing toolbar for Qgis reprojection tools.  What version of Qgis are you working with?

Nicolas

Envoyé de mon iPad

Le 1 sept. 2016 à 09:11, Reginald Carlier <Reginald.Carlier at ingelmunster.be<mailto:Reginald.Carlier at ingelmunster.be>> a écrit :
Hi,

No as I used QGIS Browser there is no option to save the changes. Also it would be great if there was an option to copy, paste or delete a shape.
I guess I have to load the shape in QGIS and change the CRS and then use ‘save as’, but when I do that the saved shp shows in the same place as the unchanged shp.
How can I adjust the extent so that it shows in the right location?

Regards,


Reginald Carlier
Deskundige GIS

[http://www.ingelmunster.be/ingelmunster.gif]

Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T +32 51 33 74 39 www.ingelmunster.be<http://www.ingelmunster.be>

[http://www.ingelmunster.be/fb.jpg]<https://www.facebook.com/Ingelmunster/> [http://www.ingelmunster.be/go.jpg] <https://plus.google.com/+ingelmunster>  [http://www.ingelmunster.be/in.jpg] <https://www.instagram.com/ingelmunster/>  [http://www.ingelmunster.be/pi.jpg] <https://www.pinterest.com/ingelmunster/>  [http://www.ingelmunster.be/tw.jpg] <https://twitter.com/ingelmunster>
Van: Nicolas Cadieux [mailto:nicolas.cadieux at archeotec.ca]
Verzonden: donderdag 1 september 2016 14:50
Aan: Reginald Carlier
Onderwerp: Re: clip still not working on osm shape

Hi,
Did you resave the file in a new projection or just specified the layer projection by clicking on the layer in the layer manager?

You need to save the file for the changes to be permanent.  There are also more complex reprojection tools in Qgis.

Nicolas

Envoyé de mon iPad

Le 1 sept. 2016 à 08:35, Reginald Carlier <Reginald.Carlier at ingelmunster.be<mailto:Reginald.Carlier at ingelmunster.be>> a écrit :
Hi,

I found that the problem was the conversion of the CRS. When I select the shape of the town (Lambert 72) in QGIS Browser and choose WGS 84 as CRS the extent is still in Lambert coordinates. I tried the same in ArcMap and there I got the same result. Then I tried a function in the toolbox under Data Management > Projections and Transformations > Project where you can choose the CRS and also the transformation algorithm. Then the shape of the town was shown in the right spot. I wonder if there is such a tool in QGIS.

Regards,


Reginald Carlier
Deskundige GIS

[http://www.ingelmunster.be/ingelmunster.gif]

Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T +32 51 33 74 39 www.ingelmunster.be<http://www.ingelmunster.be>

[http://www.ingelmunster.be/fb.jpg]<https://www.facebook.com/Ingelmunster/> [http://www.ingelmunster.be/go.jpg] <https://plus.google.com/+ingelmunster>  [http://www.ingelmunster.be/in.jpg] <https://www.instagram.com/ingelmunster/>  [http://www.ingelmunster.be/pi.jpg] <https://www.pinterest.com/ingelmunster/>  [http://www.ingelmunster.be/tw.jpg] <https://twitter.com/ingelmunster>
Van: Nicolas Cadieux [mailto:nicolas.cadieux at archeotec.ca]
Verzonden: donderdag 1 september 2016 13:36
Aan: Reginald Carlier
Onderwerp: Re: clip still not working on osm shape

Hi,
Are you running the latest Qgis 2.16? If so, vector tool should be in the processing toolbox and not in the vector menu.  I have only worked one day with 2.16 but it was long enough to see that it needed a complete removal of all previous versions as the menu had a mixe of the old and the new version.  After that, vector tools disappeared from the vector menu and reappeared in the new processing menu.  I had read about this in a French blog so I was expecting it.  Could this be the cause of your problem?

If not, make sure both layers are in the same CRS (like you did) but that they also align properly when the "CRS on the fly" is not activated.  Try loading only those two layers.  You could test to see if it's the osm file format that is giving you problems by testing the two .shp file.

Nicolas

Envoyé de mon iPad

Le 1 sept. 2016 à 05:33, Reginald Carlier <Reginald.Carlier at ingelmunster.be<mailto:Reginald.Carlier at ingelmunster.be>> a écrit :
Hi Nicolas,

I changed the CRS of the shapefiles so they match (EPSG 4326).
It takes about 30 seconds before the algorithm (Vector > Geoprocessing > Clippen) finisches.
Then it loads the resulting shapefile in QGIS but the attributetable is empty and the resulting shp is 1 kB.
It looks as the Clip function doesn’t work.

Regards,


Reginald Carlier
Deskundige GIS

[http://www.ingelmunster.be/ingelmunster.gif]

Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T +32 51 33 74 39 www.ingelmunster.be<http://www.ingelmunster.be>

[http://www.ingelmunster.be/fb.jpg]<https://www.facebook.com/Ingelmunster/> [http://www.ingelmunster.be/go.jpg] <https://plus.google.com/+ingelmunster>  [http://www.ingelmunster.be/in.jpg] <https://www.instagram.com/ingelmunster/>  [http://www.ingelmunster.be/pi.jpg] <https://www.pinterest.com/ingelmunster/>  [http://www.ingelmunster.be/tw.jpg] <https://twitter.com/ingelmunster>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160902/a69d4a3a/attachment.html>


More information about the Qgis-user mailing list