[Mapserver-users] mapserver orthographic projections, was "project onto globe"

Tom H tom at ecnow.co.uk
Tue Aug 12 11:08:01 EDT 2003


Hi group,

I'm using a world basemap from http://www.vdstech.com/map_data.htm 

I've got a orthographic on-the-fly projection working, it is here;
http://www.scriptsupport.co.uk/images/mapserv.png

the map file for this is pasted below;

I've got a couple of problems though.

The first is that there is obviously some background
through the projection. I have tried using the BACKGROUNDCOLOR value in the CLASS object
to mask this but I can't seem to get this tag to effect any of my objects. 
A workaround for this was to get a ocean shapefile and fill it with sea colour to mask out 
the background, but so far I only have ocean shapefiles for australia, but my initial effort at 
that is here;
http://www.scriptsupport.co.uk/images/mapserv2.png
It seems to cause shards of what should be on the background to be printed over the foreground.
And as my background masking ocean shapefile falls over the edge of the earth, it too causes shards
across my map image like so;
http://www.scriptsupport.co.uk/images/mapserv3.png

The second problem is the EXTENTS for the map output, you can see that it is;
EXTENT -10000000 -90 10000000 90
which seems to be in meters in the x direction and dd in the y direction, which is most
odd.
setting "UNITS DD" makes no difference either. I would prefer it to be in decimal degress 
rather than meters, as that seems easier to work with on orthograhic projections.

Many Thanks for any help in advance,

T.

mymap.map file;

	NAME oz1
	SIZE 400 400
	EXTENT -10000000 -90 10000000 90
	SHAPEPATH "../data"
	IMAGETYPE PNG
	IMAGECOLOR 40 40 180
	DEBUG on
	
	WEB
		#LOG "./log.txt"	
	END

	PROJECTION
	  #"proj=laea"
	  "proj=ortho"
	  "ellps=WGS84"
	  "lat_0=51.0000"
	  "lon_0=0.0000"
	  "x_0=0.00"
	  "y_0=0.00"
	END
	
	LAYER
		NAME world
		TYPE POLYGON
		STATUS DEFAULT
		DATA world
		CLASS
			COLOR 0 88 0
			OUTLINECOLOR 0 0 0
			BACKGROUNDCOLOR 40 40 180
		END
		PROJECTION
			"proj=latlong"
			"ellps=WGS84"
		END
		METADATA
		    WMS_TITLE "world layer1"
		END
	END
END





More information about the mapserver-users mailing list