Opened 16 years ago
Closed 15 years ago
Last modified 14 years ago
#673 closed bug (fixed)
msexport creates wrong LAYER PROJECTION
|Reported by:||Owned by:||nobody|
|Must Fix for Release:||No||Platform:||Windows|
|Platform Version:||Awaiting user input:||yes|
In my test case, I set a custom projection in QGIS for the map, however the msexport utility outputs a mapfile with the LAYER PROJECTION set to latlong for some reason (the MAP PROJECTION object is correctly set to the custom projection).
If there is no way in QGIS to set a LAYER projection, then the msexport utility should just use the projection from the project properties for the mapfile's MAP projection object, and then not include any projection objects at the layer level.
Change History (12)
comment:1 by , 16 years ago
|Platform:||Debian → Windows|
comment:2 by , 16 years ago
comment:3 by , 16 years ago
|Awaiting user input:||set|
by , 16 years ago
project file with 1 layer and a custom MAP projection
comment:4 by , 16 years ago
why is 'sourcesrs' set to latlong?
comment:5 by , 16 years ago
That's the default map projection if you don't specify one. Try setting the projection using Project Properties. If you have already done that, try setting the default projection for QGIS using the Projection tab under Options. Then save your project file and see if sourcesrs is correct. Sounds like the bug is either in the project output code, or the python mapserver export script.
comment:6 by , 16 years ago
I already set a custom projection in the Project Properties, so I also set the "Global default projection" in Options to this same custom projection...but the 'sourcesrs' in the .qgs file is still set to latlong for some reason.
Is it possible that I am not setting these projections properly? (is sourcesrs set correctly for other people?)
comment:7 by , 16 years ago
The sourcesrs should be the same as the SRS for the layer. In your sample, province2.shp is in WGS84 (4326). Is this true? The destination SRS is your projected coordinate system. In the map file I exported, it had the map projection set properly and defined the layer projection as WGS84. This is correct, assuming province2.shp is actually in WGS84.
comment:8 by , 16 years ago
This bug has to do with this source SRS being incorrectly set: here is part of my original entry into this bug:
"In my test case, I set a custom projection in QGIS for the map, however the msexport utility outputs a mapfile with the LAYER PROJECTION set to latlong for some reason (the MAP PROJECTION object is correctly set to the custom projection)."
province2.shp is in the custom projection that I mentioned (not latlong), yet msexport assigns a latlong projection to the LAYER incorrectly.
I would assume that the msexport utility would output the custom projection to the mapfile's MAP projection object (which it does correctly), and then outputs no LAYER projection in my case.
comment:9 by , 15 years ago
|Status:||new → closed|
I think this is fixed. Due to some internal constraints, the PROJECTION section is always written out for the layer but should be correct.
comment:10 by , 15 years ago
|Milestone:||Version 0.8.2 → Version 0.9.1|
comment:11 by , 14 years ago
Milestone Version 0.9.1 deleted
Can you provide (attach) the .qgs file? My tests indicate that layer PROJECTION sections are written out properly.