[Qgis-user] On-the-Fly Projections Versus Manual Re-projections

Nicolas Cadieux nicolas.cadieux at archeotec.ca
Thu Nov 1 13:52:41 PDT 2018


Not a problem:

See below


On 2018-11-01 4:13 PM, Aj Hollenbach wrote:
> Thanks so much Nicolas---this is extremely helpful! Two more quick 
> questions, and then I will stop pestering you! :-)
>
> First, if I change my project back to 4326 now, will that cause any 
> problems given that I have already loaded 12-15 layers into the project?
When In doubt, save the project before making a big change.  In this 
case, you can move back and forth without trouble.
>
> Second, are there circumstances in which it would important to have 
> the project set to a geographically-specific EPSG (and ensure that all 
> the files are in that same EPSG)? For example, if you are using an 
> elevation model to delineate a particular river basin or wanting to 
> measure the acreage of intact forest in a county in the US, will your 
> results be significantly different based on whether you have 
> transitioned all of the files to the "local" EPSG? Basically, I am 
> just trying to get a feel for when one needs to worry about changing 
> the EPSG.

Your example is very good.  Let's add more info.  Imagine the following:

  * Raster DEM Elevation is in WGS84 Long/lat (epsg 4326) (a global
    Geographic CRS).  With this, you make a basin file.
  * County file is in WGS84/UTM ZONE 20N (in metres) (epsg 32620) (local
    CRS)
  * Your spatial query: What county is in what basin?

If you create the basin in 4326 you need to know exactly how the spatial 
query will be made by the software.  If there is no reprojection, files 
will not align and the query does not work. If the software (or plugin) 
does a reprojection, you need to know what algorithm will be used and 
trust it.  Results can change according to the method used.  See the 
documentation with the plugins or contact the person responsible.

The other way is to do all the work yourself so you don't have to trust 
a coder. You could

  * Reproject the Raster from 4326 to 32620 then make the vector basin
    file or
  * Make the vector basin file in 4326 then reproject that in 32620. 
    This is probably better and will lead to better results as
    reprojecting a raster does change the raster a lot depending on the
    algorithm chosen (nearest neighbour, bilinear, cubic...) (
    https://www.gdal.org/gdalwarp.html)

Basically, you need to evaluate the impact of the reprojection on each 
data source and make the best decision... or trust that the software is 
doing a good job.  If your research depends on it, you better do it 
yourself.

Nicolas

>
> Thanks Again,
> Allen
>
> On Thu, Nov 1, 2018 at 2:45 PM Nicolas Cadieux 
> <nicolas.cadieux at archeotec.ca <mailto:nicolas.cadieux at archeotec.ca>> 
> wrote:
>
>     Hi,
>
>     Unless you have a specific problem with the project being in a
>     certain CRS like 3125, there is no need to change that in the
>     project.  If Project on the fly is working with every layer, all
>     is good.  If your project is in 3125, have one file in 3125 and 10
>     in 4326, then you need to know that QGIS is reprojecting 10 files
>     to 3125.  That takes time especially if you have very big .shp
>     files or rasters.  In that case, it may be faster to change the
>     project in 4326 to speed rendering up.  Occasionally,  you will
>     have plugins that do not work unless all the files and the project
>     have the same CRS.  Keep that in mind.
>
>     Apart from that, it comes down to the look and feel of the map and
>     even that can now be changed in printing layout (since Qgis 3 I
>     think).
>
>     Cheers!
>
>     Nicolas
>
>
>     On 2018-11-01 2:26 PM, Aj Hollenbach wrote:
>>     Thanks much for your advice Nicolas. I have indeed been using a
>>     basemap (google satellite) and all layers are well georeferenced
>>     even though I have made no changes to the files themselves in
>>     terms of changing the CRS. The only changes that I have made have
>>     made are at the project level, whereby I have assigned the
>>     project a CRS of EPSG 3125. Are you recommending that I just
>>     change the project-level CRS back to 4326? Put differently, is
>>     there any advantage to using EPSG 3125?
>>
>>     Thanks Much,
>>     Allen
>>
>>     On Thu, Nov 1, 2018 at 1:57 PM Nicolas Cadieux
>>     <nicolas.cadieux at archeotec.ca
>>     <mailto:nicolas.cadieux at archeotec.ca>> wrote:
>>
>>         Hi,
>>
>>         These are two very different projections. I would load a base
>>         map from Quickmap services plugin to see if files are being
>>         loaded correctly.  If the files are in 4326, and are loaded
>>         in 4326, then all is good if they are well georeferenced (use
>>         the Quickmap base map to make sure).  If files don't have a
>>         CRS, they may been incorrectly loaded if you have the "use
>>         project CRS" or "Use a default CRS" in the options/CRS/CRS
>>         for new layers menu.
>>
>>         If a file is in 4326 but incorrectly loaded in another
>>         projection, you need to correct the CRS not reproject it with
>>         GDAL WARP.    Simply right click on the layer in the layers
>>         panel, change the CRS (Set CRS/set layer CRS) (Qgis 3x) and
>>         save the file under a new name.  That should change the CRS
>>         and the file position on the map.  If you are still in the
>>         wrong place, you need to make some guess work.
>>
>>         Nicolas
>>
>>
>>         Extent: -180.00, -90.00, 180.00, 90.00 Proj4: +proj=longlat
>>         +datum=WGS84 +no_defs
>>
>>
>>         Extent: 123.73, 4.76, 126.65, 21.97 Proj4: +proj=tmerc
>>         +lat_0=0 +lon_0=125 +k=0.99995 +x_0=500000 +y_0=0
>>         +ellps=clrk66
>>         +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06
>>         +units=m +no_defs
>>
>>
>>         On 2018-11-01 1:02 PM, Aj Hollenbach wrote:
>>>         Hi QGIS Community,
>>>
>>>         I have what I believe may be a fairly straight-forward
>>>         question on coordinate reference systems and projections in
>>>         QGIS. I am currently working on some maps in the southern
>>>         Philippines and thus have set my "project-level" coordinate
>>>         reference system (CRS) to EPSG 3125. I have noticed,
>>>         however, that when I open a vector file or raster file that
>>>         is loaded into this project, the CRS still reads as EPSG
>>>         4326. Thus, my question is whether it is necessary to
>>>         "manually" go in and change the EPSG of each new layer to
>>>         EPSG 3125 (i.e. use the Warp Tool for a raster file or the
>>>         "Reproject Layer" tool for a vector file), or if there is
>>>         any issue with leaving them as EPSG 4326. I note that I am
>>>         not having any issues "seeing" the newly added
>>>         files--meaning the "on-the-fly" projection seems to be
>>>         working fine. Appreciate any insights that you might have.
>>>
>>>         Regards,
>>>         Allen
>>>
>>>
>>>         _______________________________________________
>>>         Qgis-user mailing list
>>>         Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>>>         List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>         Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20181101/7c411edb/attachment.html>


More information about the Qgis-user mailing list