Feature request #2093

Provide configuration options for new project (map) CRS and OTFR

Added by marisn - over 7 years ago. Updated about 4 years ago.

Status:Closed Start Date:
Priority:Low Due date:
Assigned to:Borys Jurgiel % Done:


Category:Projection Support
Target version:Future Release - Nice to have
Platform:All Resolution:fixed
Platform version: Pull Request or Patch supplied:No
Status info:0 Tag:


Currently there is an option what to do when layer without CRS is loaded, still there are no options how to specify new project (map) CRS options. There are some other bugs requesting some parts or caused by user-unfriendly new project CRS handling (#1355 #363 #2092 #1688 and probably others).

Here is my offer how it could be handled (sorry, no code). Settings-> Options-> CRS should offer following options:
  • Ask new project CRS (a-la GRASS mode)
  • Use first layer CRS (a-la ArcGIS mode)
  • Use global default CRS
  • Enable OTFR by default (checkbox disabled by default) (#363)

It will change QGIS default as neither of those options assume WGS84 by default as QGIS seems to do now. Still it's possible to mimic current QGIS behavior by setting global default to WGS84 and enabling "Use global CRS" option with OTFR disabled.

Bug #1688 was closed with reason "what to do when layer has no CRS?". There IS a solution already present in QGIS. QGIS already offers three options how to determine layers CRS when layer has no CRS. Just let layer CRS detection to work at first and then set project (map) CRS to layer's CRS (real one or one determined by "layer without CRS" options).


Updated by Micha Silver over 7 years ago

Not sure I agree with your suggestion.
First I'd rather not see Project specific options mixed in with Global options.
Second, I'm afraid that enabling OTF by default would cause more problems than it would solve (esp. when adding rasters in another CRS...). Also I don't particularly like the "Arcview mode" (project CRS set by the first loaded layer) for the same reason.

Perhaps the prob of specifying the CRS for a new project could be solved by popping up a window when the "New Project" button is pressed to select the CRS for that project? This will not help when first starting up QGIS, but the current behavior seems reasonable to me.

Updated by marisn - over 7 years ago

Micha, please, reread my proposal twice. People have different workflows and needs. For quick data preview "ArcGIS mode" is the best. For serious analysis "GRASS mode" works better. Your suggestion is "GRASS mode". I would love to have OTFR enabled by default (most of my data are in LKS-92/TM or Baltic93 with only difference in false northing).

This wish item is not about "forcing" OTFR or any other oprions but about providing choice to users.

Updated by Borys Jurgiel over 7 years ago

We still have the idea of better handling of the skeleton project files. You can create a few skeletons for CRSes you use and call qgis with appropriate one. We just could make loading them more automagical and prevent them from saving.

Updated by Micha Silver over 7 years ago

The Global CRS setting is, as you said, to determine what to do with layers that lack a CRS. Enabling OTF doesn't really solve that problem, so perhaps it shouldn't be mixed into that section of the CRS tab.

How about this suggestion:

1- Leave the three "When a new layer is loaded..." as is

2- Below that section add a checkbox: "Always use this global CRS for new projects.

3- And another checkbox: "Always enable on-the-fly projection".

So setting these two options would work best for users that are usually in one particular CRS. It would also keep the user in her popular CRS even if she happened to first load some layer in a different CRS (solve the "ArcGIS mode" problem). The only cases where this might be a cause for confusion are:
  • loading raster layers in a different CRS.
  • a need to change units (this is "locked" when OTF is enabled)

Users that need to switch between different CRS might also want an option to: "Always prompt for project CRS" (i.e. "GRASS mode") so that each Cntl-N will first pop-up a window asking which CRS for the new project. So #3906 above might be a choice between two options: "Always use Global CRS", or "Always prompt".

But I think this should still be separate from the choice of what to do with layers that lack a CRS definition.


Updated by marisn - about 7 years ago

See also this discussion:
([Qgis-developer] CRS for a start)

Updated by Borys Jurgiel about 6 years ago

See also reopened #363 and #1688

Updated by Borys Jurgiel about 6 years ago

  • Status changed from Open to In Progress

Partially fixed in 7de1303c (SVN r15375) (options 3 i 4).

Updated by Borys Jurgiel about 6 years ago

I believe c2190016 (SVN r15425) fulfills the second option (use first layer CRS).

Updated by Borys Jurgiel over 5 years ago

  • % Done changed from 0 to 60
  • Pull Request or Patch supplied set to No

So, what is missing are three radio buttons on top of the CRS tab:

For new projects:
  • ask for CRS
  • use last used
  • use the default: (and the existing crs selector)

Updated by Borys Jurgiel over 5 years ago

See also #4333 - also add a "set CRS from first laded layer" option. It could be either another radio button in the group mentioned above (note: which CRS should be displayed in the CRS indicator before the first layer is loaded?) or a separate checkbox.

Note 2: One may check both 'set layer CRS to project (if unknown)' and 'set project CRS to first layer'.

Updated by Giovanni Manghi over 5 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

Updated by Giovanni Manghi almost 5 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

Updated by Pirmin Kalberer over 4 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

Updated by Giovanni Manghi about 4 years ago

  • Status changed from In Progress to Closed
  • Resolution set to fixed

original requests are pretty much all available in qgis master.

Also available in: Atom