AW: [Mapserver-users] Once again: no options found in 'init' file

Maul, Andreas-Alexander Andreas.Maul at bgr.de
Wed Aug 6 12:03:41 EDT 2003


Hi Bjoern, 
I do in my application a projection from lat/lon-WGS84 coordinates to Gauss-Krueger (9 deg meridian) coordinates because the coordinates in my shapefiles are related to WGS84 whereas the raster topography bought from Bundesamt für Kartographie und Geodaesie (BKG Germany) refers to Gauss-Krueger coordinates stripe 3 (9 deg east).
I specify the DHDN parameters without use of the epsg file. You can try to do your projection with similar parameters.
My projection section of the map file looks like:

PROJECTION
"proj=tmerc"
"ellps=bessel"
"towgs84=dx,dy,dz,rx,ry,rz,m" # see notes below 
# datum shift DHDN Zone 3, 
# note: if datum shift is applied here, then it must be specified in the 
# layer section too, eg. "datum=WGS84"
# 
"lat_0=0n"     # latitude of origin 
"lon_0=9e"     # meridian for stripe number 3
"x_0=3500000." # Stripe number 3 for 9 deg E, Offset: 500000
"y_0=0."       # offset y
"k=1."         # scale factor
"units=m"
END

In the layer section I have:
LAYER
  NAME "Border"
  DATA "..."
  TYPE LINE
  STATUS ON 
  PROJECTION
   "proj=latlong"
   "datum=WGS84"
  END
  ...
END

Note 1: If you need to perform a datum shift you have to take care about the signs of the translation and rotation parameters of the ellipsoid.

There were some discussions about the signs of translation and rotation parameters and the scale factor used by the Europeans and Americans (i.e. as defined in the proj.4 package) in the user list of the proj archive. See e.g. http://www.remotesensing.org/lists/proj_archive/msg00298.html

Note 2: If you need the Potsdam Datum parameters, you can find approximate numbers in http://ottmarlabonde.de/L1/datum.html
The official datum parameters for the Potsdam Datum from BKG are confidential. 

You can try the following numbers:
dx = 586 m, dy = 87 m, dz = 409 m, rx = 0.52 ", ry = 0.15 ", rz = -2.82 "
m = 1.000009 (9ppm)

therefore you can insert the following statement in the projection section:
"towgs84=586, 87, 409, 0.52, 0.15, -2.82, 1.000009"
and look whether the accuracy is sufficient for you.

Regards,
Andreas


-----Ursprüngliche Nachricht-----
Von: Bjoern Platzen [mailto:bplatzen at sosnetz.de] 
Gesendet: Dienstag, 5. August 2003 18:30
An: mapserver-users at lists.gis.umn.edu
Betreff: [Mapserver-users] Once again: no options found in 'init' file

Hello List,

by searching through the archives, I saw that this seems to be a common 
problem. But I did not find any solution that helped me...

I'm trying to project a lat/lon-WGS84-Layer on Gauss-Kruger-Layers. In 
my mapfile it looks like this:

# Start of map file
NAME mgla2
STATUS ON
SIZE 6400 6400
SYMBOLSET symbols/symbols.sym
EXTENT 2523000 5680000 2539000 5663000
UNITS METERS
SHAPEPATH "gis_data"
FONTSET /usr/local/httpd/htdocs/parkinfoneuss/font/font.list
IMAGECOLOR 255 250 238
IMAGETYPE png

#
# Start of web interface definition
#
WEB
  TEMPLATE rahmen.html
  MINSCALE 3500
  MAXSCALE 200000
  IMAGEPATH "/usr/local/httpd/htdocs/parkinfo/tmp/"
  IMAGEURL "tmp/"
  LOG "/usr/local/httpd/htdocs/parkinfo/mg.log"
  error "http://moers.office.sos/parkinfo/error.htm"
END

PROJECTION
  "init=epsg:31466"
END

LAYER
  NAME bebauung_de012w
  TYPE Polygon
  STATUS on
  DATA bebauung_de012w
      CLASS
        COLOR 255 165 165
        OUTLINECOLOR -1 -1 -1
     END  # CLASS
END  # LAYER

LAYER
  NAME industrie_de012w
  TYPE Polygon
  STATUS on
  DATA industrie_de012w
      CLASS
        COLOR 165 165 165
        OUTLINECOLOR -1 -1 -1
     END  # CLASS
END  # LAYER

#...some more layers...

LAYER
  NAME 'oe'#this is a lat/long-Layer
  TYPE Polygon
  STATUS on
  DATA oeffentl_einr_de012w
  CLASS
    COLOR 205 44 65
  END#CLASS
  PROJECTION
    "init=epsg:4326"
  END#projection
END#Layer

#...some more layers...
END
#End of mapfile

Now I get the Error
msProcessProjection(): Projection library error. no options found in 
'init' file

I tried as well
platzen at codefabrik:~/parkinfo/mg/karte> proj -v +init=epsg:31466
#Transverse Mercator
#       Cyl, Sph&Ell
# +init=epsg:31466 +proj=tmerc +lat_0=0 +lon_0=6 +k=1.000000 
+x_0=2500000
# +y_0=0 +ellps=bessel +units=m +no_defs
-> epsg:31466 seems to work

and 

platzen at codefabrik:~/parkinfo/mg/karte> proj -v +init=epsg:4326
Rel. 4.4.7, 31 March 2003
<proj>:
+proj=latlong unsuitable for use with proj program.
program abnormally terminated
-> epsg:4326 does _not_ seem to work

Then I checked my epsg-file unter /usr/local/share/proj/ and i found
# WGS 84
<4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs <>

So I think, the error comes because of epsg:4326 but I have no idea, why 
it comes and how to workaround...

Any help would be _very_ appreciated...

thanks,

Bjoern.

-- 
small office solutions
info at sosnetz.de  -  http://www.sosnetz.de

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list