Opened 15 years ago

Closed 15 years ago

#1604 closed bug (fixed)

Projection recognition fails when a .qml file exists

Reported by: dassau Owned by: homann
Priority: major: does not work as expected Milestone: Version 1.2.0
Component: Projection Support Version: Trunk
Keywords: .prj recognition .qml Cc: pcav
Must Fix for Release: Yes Platform: Debian
Platform Version: Ubuntu 9.04 Awaiting user input: no

Description

I have two shape files showing graticules, both projected in EPSG:4326 and both shapefiles provide a .prj file with the same content:

cat graticule.prj: GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223 563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

cat graticule_small.prj: GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223 563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

when I load the two files in QGIS (svn trunk from today) only for the graticule.shp the projection is recognized and displayed in the "General" tab of the layer properties dialog. The projection of the other shape file graticule_small.shp is not recognized.

AFAICS it seems, that the projection is not recognized when I change the symbology and save it as graticule_small.qml. When I delete the *.qml file, the projection is recognized again correctly. This happens in QGIS head and in the current stable release.

This means every time I want to use "OTF projection" support for a shape with a saved style file (.qml) I have to define a CRS first before it works, although a correct .prj file exists.

I put the two shapefiles here for testing: http://www.nature-consult.de/dassau/muell/projrecog.zip

regards,

Otto

Change History (4)

comment:1 by lutra, 15 years ago

Cc: pcav added
Platform Version: Ubuntu 9.04

Hi,

I replicated this using the qgis sample dataset (i.e. "airports" and "alaska" shapefiles). Used qgis 1.2 from trunk under Ubuntu 9.04

comment:2 by homann, 15 years ago

Owner: changed from nobody to homann

Interesting. Can be it an OGR problem?

comment:3 by lutra, 15 years ago

Note:

it happens only if the .qml has the same name of the .shp file, so the .qml is loaded together with the shape/project.

In these cases the field in the general tab where usually the crs string appears is blank.

comment:4 by homann, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in r11406.

Note: See TracTickets for help on using tickets.