Bug report #2148

shapefile layers disappear when enabling reprojection

Added by Giovanni Manghi over 14 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Projection Support
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:12208

Description

I'm seeing a problem with otfr and trunk on both linux and windows. On qgis 1.3 it works fine, but I'm pretty sure it worked fine also on trunk until a few days ago.

Take two vector layers with different crs, define the project crs and enable on the fly reprojection.

Try now "zoom to layer extent", it works only if the layer has a crs that matches the project crs, otherwise nothing show in the canvas.

History

#1 Updated by Maxim Dubinin over 14 years ago

I confirm.
Weirdly, if you remove the layer after it disappears after you "zoom to layer" and add it back via add vector - it will show up fine in reprojected form, until you do "zoom to layer" again.

#2 Updated by Giovanni Manghi over 14 years ago

This is the same problem that was already noticed for spatialite layers. See #1977.

Resuming:

Add a layer then enable OTFR and choose a crs for the project.

1) If the layer crs is equal to the project crs, than is all ok

2) if the layer crs is different from the project crs than it doesn't show in map canvas

You may also want to try this:

Open a new project, enable OTFR, choose a crs for project and then add a layer

1) Even if the project crs is different from the layer crs it seems to work fine, but...

2) If you then choose another crs for the project (different from the layer crs), then again the layer will not show in map canvas.

#3 Updated by Giovanni Manghi over 14 years ago

Confirmed also for Postgis layers.

#4 Updated by Marco Hugentobler over 14 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed

Fixed in 0e76f1dd (SVN r12319)

#5 Updated by Giovanni Manghi over 14 years ago

Hi Marco,

thanks for the fix. This solves just shapes or also postgis/SL?

thanks in advance

#6 Updated by Marco Hugentobler over 14 years ago

It is generic (on maplayer level), so should work for any layer type.

Also available in: Atom PDF