Error on adding EPSG code

Jérôme Martin gooogle at FREE.FR
Mon Oct 1 16:39:06 EDT 2007


Hello,

I'm perhaps telling you something wrong, but I think it's only because 
EPSG codes are stocked on a short in programming system,
because the last epsg:code is 32766 (# WGS 84 / TM 36 SE).
A short is a 16 bit signed value, so the max value for a short is 
2^(16-1) = 2^15 = 32768.

I suggest you to try just to take a code number not used in the epsg 
file code less than 32768, and try again if it's working, because your 
1234567 should be so big in mapserv.

Moreover, if you want to add a new epsg code, you should use your 
personal namespace and personal code number.

when you put EPSG:code, it's means you want use an epsg code.
if you use ESRI:code, it's means you want to use an esri code.
So, create your personal file and put yours personal definitions. You 
after could use PERSONALNAMESPACE:mycode to set up the projection.
Be sure your PROJ_LIB variable is setted to /usr/share/proj and your put 
your file "PERSONALNAMESPACE" on the same directory.

You perhaps could use the PROJ_LIB variable to 
/home/my_name/path/to/my/own/share/proj/ and put it your file 
"PERSONALNAMESPACE" if you are only using this namespace (no EPSG code).
This method is better if you don't have the write access to the folder 
/usr/share/proj.
If you want this method and use an epsg code (or esri code...) just do a 
symbolic link to the file "epsg" in your personal share proj directory.

I hope it's could be useful for you,

Jérôme Martin


Mark de Blois a écrit :
> 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



More information about the mapserver-users mailing list