Ian,

Projections are only done on the vertices of the objects. So the 4 corners of the rectangle, which by the way should have a projection block, will get re-projected BUT then straight lines are drawn between the corners. If you want the rectangle edges to be reprojected with curvature, then you have to subdivide the edges into many points so the straight lines between the points give the appearance of curvature.

PROJECTION ... END blocks need to appear in two places.

in the MAP block the projection defines the output projection to use. If a LAYER does NOT have a PROJECTION block then DATA for that layer is assumed to be in the output projection.

If the data for a LAYER is in some other projection then you need to have a PROJECTION block to define the LAYER's data projection.

-Steve W

On 9/1/2011 12:07 AM, Ian Walberg wrote:
I thought I understood how PROJECTION worked in map files....

The map file below renders the earth/countries outline and a rectangle
with the overall map projection set to init=epsg:4326 and EXTENT -180
-90 180 90.

However when I change the overall map projection to "proj=ortho" and
EXTENT -8000000 -8000000 8000000 8000000 I get a globe drawn the
rectangle has not been projected onto the globe.

I have various other layers with city names etc and all of these project
ok.

What have I misunderstood here?

Thanks

Ian

LAYER

NAME "box"

STATUS DEFAULT

TYPE polygon

FEATURE

WKT "POLYGON ((180.0 0.0, -180.0 0.0, -180.0 90.0, 180.0 90.0, 180.0 0.0))"

END

CLASS

STYLE

COLOR 0 0 100

END

END

PROJECTION

"init=epsg:4326"

END

END

LAYER

NAME world

TYPE polygon

DATA World_Countries.shp

STATUS DEFAULT

CLASS

STYLE

COLOR 50 128 50

OUTLINECOLOR 10 10 10

WIDTH 1

END

END

PROJECTION

"init=epsg:4326"

END

END

PROJECTION

"init=epsg:4326"

# "proj=ortho"

# "lat_0=0.0"

# "lon_0=-90.0"

END



_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to