Error on adding EPSG code

Richard Greenwood richard.greenwood at GMAIL.COM
Thu Oct 11 07:34:20 EDT 2007


On 9/28/07, Mark de Blois <mdeblois at maplecroft.net> wrote:
> Hi there,
>
> I Am trying to add an EPSG code for Winkel Triple to my MapServer proj
> file but I keep getting the error:
>
>     msProcessProjection(): Projection library error. no options found in
> 'init' file
>
> I added the entry:
>
>     # Winkel Triple
> <1234567> +proj=wintri +lat_1=45 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84
> +units=m +no_defs  <>
>
> to the file epsg (located at /usr/share/proj on my Ubuntu machine) and
> rebooted.
>
> Ogrinfo tells me the following about the shapefile I am trying to serve:
>
> Extent: (-16707480.310734, -10018754.171395) - (16920780.652974,
> 9320947.177797)
> Layer SRS WKT:
> PROJCS["World_Winkel_Tripel_NGS",
>     GEOGCS["GCS_WGS_1984",
>         DATUM["WGS_1984",
>             SPHEROID["WGS_1984",6378137.0,298.257223563]],
>         PRIMEM["Greenwich",0.0],
>         UNIT["Degree",0.0174532925199433]],
>     PROJECTION["Winkel_Tripel"],
>     PARAMETER["False_Easting",0.0],
>     PARAMETER["False_Northing",0.0],
>     PARAMETER["Central_Meridian",0.0],
>     PARAMETER["Standard_Parallel_1",45.0],
>     UNIT["Meter",1.0]]
>
> In the mapfile I am referencing this shapefile through:
>
> LAYER
>  NAME 'WTCountries'
>  DATA 'maplecroft_countries_winkel_45'
>  STATUS off
>  TYPE Polygon
>
>  METADATA
>   WMS_SRS  'epsg:1234567'
>   WMS_TITLE 'Countries_WT'
>   WMS_FEATURE_INFO_MIME_TYPE 'text/html'
>  END #METADATA
>
>  PROJECTION
>    'init=epsg:1234567'
>  END
>
> Does anyone have any idea what I am doing wrong? Your help would be
> greatly appreciated!
>
> cheers,
> Mark de Blois
> Maplecroft
>

Sounds like it is having trouble finding, or reading, your epsg file.

1. In your map file you can explicitly poit to your epsg file with:
    CONFIG PROJ_LIB " /usr/share/proj /"

2. You can put a coordinate system definition in a map file without an
epsg code like:
PROJECTION	# wyoming west NAD83
	"proj=tmerc"
	"ellps=GRS80"
	"to_meter=0.3048006096012192"
	"lon_0=-110.0833333333"
	"lat_0=40.5"
	"x_0=800000"
	"y_0=100000"
	"k=0.9999375"
	"no_defs"
END

Using your values of course!

Rich

-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the mapserver-users mailing list