Opened 17 years ago

Closed 16 years ago

Last modified 15 years ago

#673 closed bug (fixed)

msexport creates wrong LAYER PROJECTION

Reported by: jmckenna@… Owned by: nobody
Priority: minor: annoyance Milestone:
Component: MapServer export Version: 0.8.1
Keywords: Cc:
Must Fix for Release: No Platform: Windows
Platform Version: Awaiting user input: yes

Description

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.

Attachments (1)

test.qgs (10.9 KB ) - added by jmckenna@… 17 years ago.
project file with 1 layer and a custom MAP projection

Download all attachments as: .zip

Change History (12)

comment:1 by anonymous, 17 years ago

Platform: DebianWindows

comment:2 by anonymous, 17 years ago

Platform Version: Windows

comment:3 by gsherman, 17 years ago

Awaiting user input: set

Can you provide (attach) the .qgs file? My tests indicate that layer PROJECTION sections are written out properly.

by jmckenna@…, 17 years ago

Attachment: test.qgs added

project file with 1 layer and a custom MAP projection

comment:4 by jmckenna@…, 17 years ago

why is 'sourcesrs' set to latlong?

comment:5 by anonymous, 17 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 jmckenna@…, 17 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 gsherman, 17 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 jeffmckenna@…, 17 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 gsherman, 16 years ago

Resolution: fixed
Status: newclosed

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 gsherman, 16 years ago

Milestone: Version 0.8.2Version 0.9.1

comment:11 by (none), 15 years ago

Milestone: Version 0.9.1

Milestone Version 0.9.1 deleted

Note: See TracTickets for help on using tickets.