Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have shapefiles containing polygons and lines that are used in a mapfile for projecting them through Mapserver. Is there a way in changing the projection of the layers by 180 degrees(i.e. upside down)?

Cheers!

share|improve this question
    
Out of curiosity can I ask why you want to have your map upside down? –  geographika Mar 18 '11 at 21:30
    
in order to be as close to reality as possible. The shapes were drawn on a wrong raster file. Once scenario would be to simply flip the raster file 180 degrees and then redraw all the shape once again. But even then the map does not appear as it should be. It's simply displayed in mirror. –  bo6 Mar 18 '11 at 21:42
add comment

2 Answers

Theoretically, I think this will work. If the map projection you're using has a scale factor, make it negative. If the false easting and false northing values are non-zero, make them negative too.

I haven't used MapServer so I don't know if it's possible or the details on how to do it.

share|improve this answer
    
found the scaling factor parameter you're talking about. trac.osgeo.org/proj/wiki/GenParms but in the projection object I inserted the factor is missing.if I were to insert the factor, what value should I assign to it? (be it negative as you suggested) –  bo6 Mar 18 '11 at 22:06
    
-1.0. It's possible that the projection implementation won't understand what to do with the parameter. –  mkennedy Mar 19 '11 at 1:10
    
i tried it for the projection inside the map object as well as within the layer definitions. Got: Projection library error. k <= 0 and no projection at all. :( –  bo6 Mar 19 '11 at 14:28
add comment

If you want to rotate all of your layers, this can easily be accomplished by using the ANGLE attribute of the MAP object.

MAP ANGLE 180

Take a look at this wiki page for more info: http://trac.osgeo.org/mapserver/wiki/MapRotation

There are also some good caveats in the mapfile documentation: http://mapserver.org/mapfile/map.html#ANGLE

For instance, if you specify a layer angle, it will be calculated relative to the map angle.

share|improve this answer
    
I've followed the instructions and inserted a PROJECTION object in the MAP object as well as in the LAYER objects and it displays the map NOT upside down(or in the mirror as I would say). Furthermore, it blows all the panning and zooming now. Whenever I try to zoom in the features simply disappear (well, they're down and I have to pan to find them) and when I get to see them with panning upon reload they disappear(move down) again. I have not changed the extent or anything, but simply introduced the sample PROJECTION object attributes from the mapfile documentation. –  bo6 Mar 18 '11 at 20:14
    
It sounds like you are using some sort of client to view the requests to MapServer. What do you get if you send a basic mode=map request to MapServer or use shp2img? –  DavidF Mar 20 '11 at 4:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.