Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raster's and vector's projection never recognized in "Prompt for projection" mode #548

Closed
qissue-bot opened this issue Mar 8, 2019 · 14 comments

Comments

@qissue-bot
Copy link
Owner


Author Name: Redmine Admin (Redmine Admin)
Original Redmine Issue: 561, https://issues.qgis.org/issues/561

Original Assignee: Magnus Homann


QGIS fails to recognize a valid projection info in rasters and vectors and defaults to WGS84. Please see that the raster and vector in question do have a valid projection info:

$ gdalinfo tmp/lzn_32633.tif Driver: GTiff/GeoTIFF
Size is 720, 360
Coordinate System is:
PROJCS["WGS 84 / UTM zone 33N",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.2572235629972,
                AUTHORITY[[EPSG""7030]],
            AUTHORITY[[EPSG""6326]],
        PRIMEM[[Greenwich]],
        UNIT[[degree]],
        AUTHORITY[[EPSG""4326]],
    PROJECTION[[Transverse_Mercator]],
    PARAMETER[[latitude_of_origin]],
    PARAMETER[[central_meridian]],
    PARAMETER[[scale_factor]],
    PARAMETER[[false_easting]],
    PARAMETER[[false_northing]],
    UNIT["metre",1,
        AUTHORITY[[EPSG""9001]],
    AUTHORITY[[EPSG""32633]]

The problem is present with all the rasters and vectors I tried. An example [[GeoTIFF]] and shapefile are attached.

Using QGIS 0.8 SVN 6474, GDAL 1.4.0

Maciek


@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Magnus Homann (Magnus Homann)
Original Date: 2007-02-03T09:35:37.000Z


Qgus can only handle projections that are defined in its database. Please define your own projection with the values above, and see if it works.

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Redmine Admin (Redmine Admin)
Original Date: 2007-02-04T03:39:03.000Z


Replying to [comment:2 homann]:

Qgus can only handle projections that are defined in its database. Please define your own
projection with the values above, and see if it works.

This projection is defined in QGIS database. It's the QGIS SRSID: 2267, ie. [[PostGIS]]/EPSG SRID: 32633.

This bug is valid for any GIS data I tried with any projection, defined or not in QGIS database. QGIS will not recognize the projection info of the raster or vector, and assign the defualt or the user specified projection, or ask for the projection - depending on the setting in Settings > Options > Projection.

BTW - I really think it is not a good idea to set latlong/WGS84 by default if projection unknown. Or any other. If the projection info is unknown, simply a non-projected XY with 0,0 in the lower left should be set.

Maciek

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Magnus Homann (Magnus Homann)
Original Date: 2007-02-04T06:51:06.000Z


With 0.8 and 0.9 (trunk) I get the following result, which is QGIS SRSID 2267.

"+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Redmine Admin (Redmine Admin)
Original Date: 2007-02-05T12:28:59.000Z


Replying to [comment:4 homann]:

With 0.8 and 0.9 (trunk) I get the following result, which is QGIS SRSID 2267.

"+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"e this

Hi,

That's cool. But I wonder why it doesn't for me. It always gives me:
"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"

I have this problem on 3 different machines with Ubuntu Dapper. QGIS and several other FOSS GIS packages built from source, including PROJ.4 and GDAL.

PROJ is 4.5 and GDAL is 1.4.0. What are yours? All my software built from source is installed in /usr/local. Could that matter? Where is yours? What elase could be the culprit (besides me, but I don't have any idea yet what I could be doing wrong here).

I'm not sure if closing the ticket by "worksforme" was the right thing. I guess this option should be left for hopeless cases without any feedback from the reporter, while I'm still here, having an issue.

Maciek

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Magnus Homann (Magnus Homann)
Original Date: 2007-02-05T15:55:05.000Z


I have proj 4.4.9 and gdal 1.3.1. Edgy eft standard installation I believe. It also works on my win32 machine with svn 0.8 (but 0.8.0 release crashes)

Update qgis to latest svn, compile with debug, and pipe the output to a file. Open qgis, open raster, check proj, close qgis. Attach the file, and I'll have a look.

(In bash)

$ qgis &> ticket561.log

I prefer to close ticket I can not do anything more about. Please re-open when new info arrives.

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Redmine Admin (Redmine Admin)
Original Date: 2007-02-06T01:39:45.000Z


Thanks for the instruction.

  1. built QGIS 6540 with debug

  2. run QGIS, set Settings->Options->Projection->Prompt for projection, exit

  3. qgis --lang=en tmp/topo.tif &> ticket561.log

  4. the "Layer Projection Selector" pops up - apparently the projection was not recognized

  5. ll/WGS84 is suggested - I press OK, then I exit QGIS

The log is attached. Line 378 is when qgis#3908 takes place. It reads:

Item selected full string : +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs

Which doesn't match the raster's projection. However, in at least 4 lines before this, a correct string:

+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs

is present. As I can see, in line 354 a correct QGIS srsid 2267 is returned. What happens next I don't understand, but for some reason this correct choice is dropped in favor of 2585.

Maciek

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Magnus Homann (Magnus Homann)
Original Date: 2007-02-06T02:33:07.000Z


Thanks! Using Prompt for projection, qgis crashes for me (which I'll look into). Can you repeat with using 'Global' setting? It might be two different errors, or it might not.

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Redmine Admin (Redmine Admin)
Original Date: 2007-02-06T05:30:39.000Z


Replying to [comment:8 homann]:

Thanks! Using Prompt for projection, qgis crashes for me (which I'll look into).

For me it never crashed here.

Can you repeat with using 'Global' setting?

Yes, it is still the same. The log looks somewhat different (attached), yet the result is still that when I enter Settings->Project Properties->Projection still I can see that latlon/WGS84 (QGIS srid: 2585) is selected there, instead of utm33/WGS84 (QGIS srid: 2267). However, it is interesting that when I move cursor over the canvas, UTM x,y coordinates are returned, not lat,lon.

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Magnus Homann (Magnus Homann)
Original Date: 2007-02-06T06:30:19.000Z


Okay, a couple of things:

  1. The crash is something you might see, but not directly related to this (see map composer not using antialiasing in map rendering #571).

  2. It should never ask for projection as you have a [[GeoTIFF]] with proj info, that's a bug (and it is fixed in 'trunk' / 0.9)

  3. Settings->Project Properties->Projection does not get set by reading raster/vector. You have to do that manually. Right-click on the layer, select 'Properties' and the 'General' tab, to confirm that the layer SRS is ni fact 2267.

  4. Do you have 'Enabled on the fly projection' ticked? If you do have that, have the layer SRS 2276 and the project projection 2585 and zoom to layer extent, you will reproduce map composer not using antialiasing in map rendering #571.

If you have the possibility to join #qgis at freenode IRC, we could discuss this more.

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Redmine Admin (Redmine Admin)
Original Date: 2007-02-06T12:21:46.000Z


Replying to [comment:10 homann]:

  1. The crash is something you might see, but not directly related to this (see map composer not using antialiasing in map rendering #571).

You propably mean #574 I guess.

  1. It should never ask for projection as you have a [[GeoTIFF]] with proj info, that's a bug (and it is fixed in 'trunk' / 0.9)

Will that be backported to 0.8? Please note that the same happens for eg. an shp with a valid prj file (sorry if that was obvious; I'm writing this just in case).

  1. Settings->Project Properties->Projection does not get set by reading raster/vector.

Ah, right. I got confused due to problems with "Prompt for projection" mode.

You have to do that manually. Right-click on the layer, select 'Properties' and the 'General' tab, to confirm that the layer SRS is ni fact 2267.

Works fine.

  1. Do you have 'Enabled on the fly projection' ticked? If you do have that, have the layer SRS 2276 and the project projection 2585 and zoom to layer extent, you will reproduce map composer not using antialiasing in map rendering #571.

I can reproduce, only that it's #574 ;).

If you have the possibility to join #qgis at freenode IRC, we could discuss this more.

Thanks for your kind proposition but I don't IRC. If I did, I would dissaper from the real world for good :).

Maciek

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Magnus Homann (Magnus Homann)
Original Date: 2007-02-07T03:16:50.000Z


It's #574, that's right. I don't think it will ge backported, projection implementation has changed for 0.9, and we don't want to mess it up in 0.8.

I hope it's ok to set as fixed in 0.9?

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Redmine Admin (Redmine Admin)
Original Date: 2007-02-07T07:59:43.000Z


Replying to [comment:12 homann]:

It's #574, that's right. I don't think it will ge backported, projection implementation has changed for 0.9, and we don't want to mess it up in 0.8.

I hope it's ok to set as fixed in 0.9?

It is execellent this bug is fixed in 0.9 but it is still there in 0.8. Why close it for 0.8 then?

If it cannot be fixed in 0.8.1 - too bad, but so be it. But closing it is pretending there is no problem.

Regards,
Maciek

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Magnus Homann (Magnus Homann)
Original Date: 2007-02-07T10:10:14.000Z


Closing it means that we have a fix for it. Please, we have many more bugs without any fix at all to worry about.

@qissue-bot
Copy link
Owner Author


Original Redmine Comment
Author Name: Anónimo (Anónimo)
Original Date: 2009-08-21T22:45:00.000Z


Milestone Version 0.9 deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment