Projection Issues

Neil Saunders n.j.saunders at GMAIL.COM
Mon Feb 6 05:13:09 EST 2006


Hello

I'm having trouble projecting a map to anything other than the default
simple cylindrical projection.

Our data source is PostGIS enabled database populated with data from a
shapefile. I've tried loading the data using different SRIDs via the
-s switch, but to no avail.

All I know is that the original shapefile is :

Coordinate system: Latitude/Longitude in decimal degrees.
Coordinate precision: Double.

I'd like to set the projection to a mercator WGS84.

All I have is a simple mapfile with the map projection set to :
PROJECTION
   "proj=merc"
   "ellps=WGS84"
END

I've tried few combinations of setting the layer to different
projections and the map to different projections but always with the
same result (either nothing rendered or just a simple cylindrical
projection).

I am pretty sure i have my proj4 all set up correctly as well.

Can anybody suggest what it might be I'm doing wrong? Is there a set
of steps that I can perform to validate my setup? I've appended my
mapfile - Any advice gratefully received!

Kind Regards,

Neil..


MAP
EXTENT -180.2 -73.6257461547851 180.2 196.674253845215
IMAGECOLOR 171 212 241
IMAGETYPE png24
SIZE 800 600
UNITS DD
# CONFIG PROJ_LIB "d:/Progra~1/FWTools1.0.0a7/proj_lib/"
NAME "MS"

OUTPUTFORMAT
   NAME "png24"
   MIMETYPE "image/png; mode=24bit"
   DRIVER "GD/PNG"
   EXTENSION "png"
   IMAGEMODE "RGB"
   TRANSPARENT FALSE
END

PROJECTION
   "proj=tmerc"
   "ellps=GRS80"
END

LAYER
   CONNECTION "dbname=TVC user=postgres password=hampster
host=localhost port=5432"
   CONNECTIONTYPE POSTGIS
   DATA "the_geom from (SELECT the_geom, gid FROM tmp_world) AS nt
USING UNIQUE gid "
     METADATA
     END
   NAME "postgis_outline"
   SIZEUNITS PIXELS
   STATUS DEFAULT
   TOLERANCEUNITS PIXELS
   TYPE POLYGON
   UNITS DD
   CLASS
     METADATA
     END
     STYLE
       ANGLE 360
       COLOR 246 242 217
       OUTLINECOLOR 150 150 150
       SIZE 10
       SYMBOL 0
     END
   END
END

END



More information about the mapserver-users mailing list