[Mapserver-users] mapfile generation problem

Murat Isik muratisik at megatek.com.tr
Thu Oct 9 10:47:33 EDT 2003


This is a multi-part message in MIME format.

------=_NextPart_000_010A_01C38E8D.6AE48540
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Hello,

I am a newbei about mapservers. I have setup mapserv-3-6-0 and also =
installed 3-5 demo and eventually got them to work together, displaying =
the maps successfully.I did these through implementing rpms rather than =
compling. Upon this, I have been handed map layers of our neighbourhoodi =
so that I "insert" them into the mapserver. It consists of 20 layers and =
for each layer there are proper files of .dbf, .shp, .shx extensions. =
However there are no mapfiles. I have read all of mapfile reference and =
worked on the mapfile of the 3-5 demo. I wrote one for the nighbour maps =
but it gave me the error when pressed "Initialize". I have arranged the =
demo_init.html and demo.html accordingly beforehand. The error is:

loadHashTable(): Unknown identifier

Anybody have an idea. My mapfile is the following:

#
# Start of map file
#
NAME ERENKOY
STATUS ON
SIZE 667 447
EXTENT 388107.634400379 5203120.88405952 500896.339019834 =
5310243.30613897
UNITS METERS
SHAPEPATH "erenkoy"
IMAGECOLOR 255 255 255


# you may need to change this to match your MapServer build
IMAGETYPE PNG


#
# Projection definition, consult the PROJ.4 documentation for parameter =
discussion
#
#PROJECTION
#  "proj=3Dutm"
#  "ellps=3DGRS80"
#  "zone=3D15"
#  "north"
#  "no_defs"
#
#  OR:
#
#  "init=3Depsg:26915"
#END

#
# Start of web interface definition (including WMS enabling metadata)
#
WEB
  HEADER demo_header.html
  TEMPLATE demo.html
  FOOTER demo_footer.html
  MINSCALE 1000
  MAXSCALE 1550000
  IMAGEPATH "set in demo_init.html"
  IMAGEURL "set in demo_init.html"
  METADATA
    WMS_TITLE "ERENKOY HARITA"
@
WMS_ABSTRACT "This is the UMN MapServer demonstration application for =
ERENKOY County located in north central ISTANBUL."
    WMS_ACCESSCONSTRAINTS none

    # change this value to match your setup
    WMS_ONLINERESOURCE "http://localhost/mapser/itasca/demo_init.html"

    WMS_SRS "EPSG:26915"
  END
END


QUERYMAP
  SIZE 200 200
  STATUS ON
  STYLE HILITE
  COLOR 255 0 0
END

#
# Start of reference map
#
REFERENCE
  IMAGE graphics/reference-erenkoy.png
  EXTENT 393234.393701263 5205405.16440722 495769.579718949 =
5307959.02579127
  SIZE 120 120
  STATUS OFF
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
END

#
# Start of legend
#
LEGEND
  KEYSIZE 18 12
  LABEL
    TYPE BITMAP
    SIZE MEDIUM
    COLOR 0 0 89
  END
  STATUS ON
END

#
# Start of scalebar
#
SCALEBAR
  IMAGECOLOR 255 255 255
  LABEL
    COLOR 255 255 255
    SIZE tiny
  END
  STYLE 1
  SIZE 80 2
  COLOR 255 255 255
  UNITS KILOMETERS
  INTERVALS 1
  TRANSPARENT TRUE
  STATUS TRUE
END

#
# Start of symbol definitions (we're only using a few)
#
SYMBOL
  NAME 'circle'
  TYPE ELLIPSE
  POINTS 1 1 END
  FILLED TRUE
END

#
# Start of layer definitions
#

LAYER
  NAME ERENKOY_ORNEKMAHALLE_PG_region=20
  TYPE POLYGON
  STATUS DEFAULT
  DATA ERENKOY_ORNEKMAHALLE_PG_region

  CLASSITEM 'cty_name'
  CLASS
    EXPRESSION 'Erenkoy'
    OUTLINECOLOR 128 128 128
    COLOR 225 225 185
  END
  CLASS # every other county in the state
    EXPRESSION /./
    OUTLINECOLOR 128 128 128
    COLOR 255 255 255
  END
  METADATA
    WMS_TITLE "Erenkoy-genel"
    WMS_ABSTRACT "Erenkoy"
    WMS_SRS "EPSG:26915"
  END
END
#TAMAM

LAYER
  NAME ERENKOY_ORNEKSOKAK_PL_polyline
  GROUP sokaklar
  TYPE POLYGON
  DATA ERENKOY_ORNEKSOKAK_PL_polyline
  STATUS OFF
  CLASSITEM city_name
  CLASS
    NAME "Sokaklar"
    EXPRESSION /./
    COLOR 255 225 90
    TEMPLATE "mcd90py2.html"
  END

  HEADER "mcd90py2_header.html"
  FOOTER "mcd90py2_footer.html"

  DUMP TRUE # allow GML export

  METADATA
    WMS_TITLE "Sokak"
    WMS_ABSTRACT "Minor civil divisions for Erenkoy County. (sokaklar =
only)"
    WMS_SRS "EPSG:26915"
  END
END

LAYER
  NAME ERENKOY_ORNEKILCE_PG_region
  TYPE POLYGON
  DATA ERENKOY_ORNEKILCE_PG_region
  STATUS OFF
  CLASS
    SYMBOL 'circle'
    SIZE 2
    NAME 'Ilceler'
    OUTLINECOLOR 181 181 145
  END
  METADATA
    WMS_TITLE "Ilceler Boundaries"
    WMS_ABSTRACT Ilceler boundaries for Erenkoy County. See MURAT for =
more information."
    WMS_SRS "EPSG:26915"
  END
END


LAYER
  NAME ERENKOY_ORNEKCADDE_PL_polyline
  TYPE POLYGON
  STATUS OFF
  DATA ERENKOY_ORNEKCADDE_PL_polyline

  CLASS
    NAME 'Caddeler'
    TEMPLATE "lakespy2.html"
    COLOR 49 117 185
  END

  HEADER "lakespy2_header.html"
  FOOTER "lakespy2_footer.html"

  TOLERANCE 3

  DUMP TRUE # allow GML export

  METADATA
    WMS_TITLE "Caddeler"
    WMS_ABSTRACT "Caddeler"
    WMS_SRS "EPSG:26915"
  END
END

Erenkoy is the name of neighbourhood, sokak-ilceler and other stuff =
looking unfamiliar for you, are the Turkish for streets-towns etc.
I had to keep TEMPLATE, FOOTER and HEADER for my layer same as the =
demo's since I also have no idea of making my own templates, footers and =
headers.=20
Overall, I am in a bottleneck, stuck up.

Please help me:)

Thanks in advance.....

Have a nice day

Murat Isik
Istanbul-Turkey
------=_NextPart_000_010A_01C38E8D.6AE48540
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am a newbei about mapservers.&nbsp;I =
have setup=20
mapserv-3-6-0 and also installed 3-5 demo and eventually got them to =
work=20
together, displaying the maps successfully.I did these through =
implementing rpms=20
rather than compling.&nbsp;Upon this, I have been handed map layers of =
our=20
neighbourhoodi so that I "insert" them into the mapserver. It consists =
of 20=20
layers and for each layer there are proper files of .dbf, .shp, .shx =
extensions.=20
However there are no mapfiles. I have read all of mapfile reference and =
worked=20
on the mapfile of the 3-5 demo. I wrote one for the nighbour maps but it =
gave me=20
the error when pressed "Initialize". I have arranged the demo_init.html =
and=20
demo.html accordingly beforehand. The error is:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>loadHashTable(): Unknown =
identifier</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Anybody have an idea. My mapfile is the =

following:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#<BR># Start of map file<BR>#<BR>NAME=20
ERENKOY<BR>STATUS ON<BR>SIZE 667 447<BR>EXTENT 388107.634400379 =
5203120.88405952=20
500896.339019834 5310243.30613897<BR>UNITS METERS<BR>SHAPEPATH=20
"erenkoy"<BR>IMAGECOLOR 255 255 255<BR></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2># you may need to change this to match =
your=20
MapServer build<BR>IMAGETYPE PNG<BR></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#<BR># Projection definition, consult =
the PROJ.4=20
documentation for parameter discussion<BR>#<BR>#PROJECTION<BR>#&nbsp;=20
"proj=3Dutm"<BR>#&nbsp; "ellps=3DGRS80"<BR>#&nbsp; =
"zone=3D15"<BR>#&nbsp;=20
"north"<BR>#&nbsp; "no_defs"<BR>#<BR>#&nbsp; OR:<BR>#<BR>#&nbsp;=20
"init=3Depsg:26915"<BR>#END</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#<BR># Start of web interface =
definition (including=20
WMS enabling metadata)<BR>#<BR>WEB<BR>&nbsp; HEADER =
demo_header.html<BR>&nbsp;=20
TEMPLATE demo.html<BR>&nbsp; FOOTER demo_footer.html<BR>&nbsp; MINSCALE=20
1000<BR>&nbsp; MAXSCALE 1550000<BR>&nbsp; IMAGEPATH "set in=20
demo_init.html"<BR>&nbsp; IMAGEURL "set in demo_init.html"<BR>&nbsp;=20
METADATA<BR>&nbsp;&nbsp;&nbsp; WMS_TITLE "ERENKOY =
HARITA"<BR>@<BR>WMS_ABSTRACT=20
"This is the UMN MapServer demonstration application for ERENKOY County =
located=20
in north central ISTANBUL."<BR>&nbsp;&nbsp;&nbsp; WMS_ACCESSCONSTRAINTS=20
none</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; # change this value =
to match=20
your setup<BR>&nbsp;&nbsp;&nbsp; WMS_ONLINERESOURCE "<A=20
href=3D"http://localhost/mapser/itasca/demo_init.html">http://localhost/m=
apser/itasca/demo_init.html</A>"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; WMS_SRS =
"EPSG:26915"<BR>&nbsp;=20
END<BR>END<BR></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>QUERYMAP<BR>&nbsp; SIZE 200 =
200<BR>&nbsp; STATUS=20
ON<BR>&nbsp; STYLE HILITE<BR>&nbsp; COLOR 255 0 0<BR>END</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#<BR># Start of reference=20
map<BR>#<BR>REFERENCE<BR>&nbsp; IMAGE =
graphics/reference-erenkoy.png<BR>&nbsp;=20
EXTENT 393234.393701263 5205405.16440722 495769.579718949=20
5307959.02579127<BR>&nbsp; SIZE 120 120<BR>&nbsp; STATUS OFF<BR>&nbsp; =
COLOR -1=20
-1 -1<BR>&nbsp; OUTLINECOLOR 255 0 0<BR>END</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#<BR># Start of =
legend<BR>#<BR>LEGEND<BR>&nbsp;=20
KEYSIZE 18 12<BR>&nbsp; LABEL<BR>&nbsp;&nbsp;&nbsp; TYPE=20
BITMAP<BR>&nbsp;&nbsp;&nbsp; SIZE MEDIUM<BR>&nbsp;&nbsp;&nbsp; COLOR 0 0 =

89<BR>&nbsp; END<BR>&nbsp; STATUS ON<BR>END</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#<BR># Start of =
scalebar<BR>#<BR>SCALEBAR<BR>&nbsp;=20
IMAGECOLOR 255 255 255<BR>&nbsp; LABEL<BR>&nbsp;&nbsp;&nbsp; COLOR 255 =
255=20
255<BR>&nbsp;&nbsp;&nbsp; SIZE tiny<BR>&nbsp; END<BR>&nbsp; STYLE =
1<BR>&nbsp;=20
SIZE 80 2<BR>&nbsp; COLOR 255 255 255<BR>&nbsp; UNITS =
KILOMETERS<BR>&nbsp;=20
INTERVALS 1<BR>&nbsp; TRANSPARENT TRUE<BR>&nbsp; STATUS =
TRUE<BR>END</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#<BR># Start of symbol definitions =
(we're only=20
using a few)<BR>#<BR>SYMBOL<BR>&nbsp; NAME 'circle'<BR>&nbsp; TYPE=20
ELLIPSE<BR>&nbsp; POINTS 1 1 END<BR>&nbsp; FILLED =
TRUE<BR>END</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#<BR># Start of layer =
definitions<BR>#</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>&nbsp; NAME=20
ERENKOY_ORNEKMAHALLE_PG_region&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; TYPE POLYGON<BR>&nbsp; STATUS=20
DEFAULT<BR>&nbsp; DATA ERENKOY_ORNEKMAHALLE_PG_region</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; CLASSITEM 'cty_name'<BR>&nbsp;=20
CLASS<BR>&nbsp;&nbsp;&nbsp; EXPRESSION 'Erenkoy'<BR>&nbsp;&nbsp;&nbsp;=20
OUTLINECOLOR 128 128 128<BR>&nbsp;&nbsp;&nbsp; COLOR 225 225 =
185<BR>&nbsp;=20
END<BR>&nbsp; CLASS # every other county in the =
state<BR>&nbsp;&nbsp;&nbsp;=20
EXPRESSION /./<BR>&nbsp;&nbsp;&nbsp; OUTLINECOLOR 128 128=20
128<BR>&nbsp;&nbsp;&nbsp; COLOR 255 255 255<BR>&nbsp; END<BR>&nbsp;=20
METADATA<BR>&nbsp;&nbsp;&nbsp; WMS_TITLE =
"Erenkoy-genel"<BR>&nbsp;&nbsp;&nbsp;=20
WMS_ABSTRACT "Erenkoy"<BR>&nbsp;&nbsp;&nbsp; WMS_SRS =
"EPSG:26915"<BR>&nbsp;=20
END<BR>END<BR>#TAMAM</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>&nbsp; NAME=20
ERENKOY_ORNEKSOKAK_PL_polyline<BR>&nbsp; GROUP sokaklar<BR>&nbsp; TYPE=20
POLYGON<BR>&nbsp; DATA ERENKOY_ORNEKSOKAK_PL_polyline<BR>&nbsp; STATUS=20
OFF<BR>&nbsp; CLASSITEM city_name<BR>&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp; =
NAME=20
"Sokaklar"<BR>&nbsp;&nbsp;&nbsp; EXPRESSION /./<BR>&nbsp;&nbsp;&nbsp; =
COLOR 255=20
225 90<BR>&nbsp;&nbsp;&nbsp; TEMPLATE "mcd90py2.html"<BR>&nbsp; =
END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; HEADER =
"mcd90py2_header.html"<BR>&nbsp;=20
FOOTER "mcd90py2_footer.html"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; DUMP TRUE # allow GML =
export</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; METADATA<BR>&nbsp;&nbsp;&nbsp; =
WMS_TITLE=20
"Sokak"<BR>&nbsp;&nbsp;&nbsp; WMS_ABSTRACT "Minor civil divisions for =
Erenkoy=20
County. (sokaklar only)"<BR>&nbsp;&nbsp;&nbsp; WMS_SRS =
"EPSG:26915"<BR>&nbsp;=20
END<BR>END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>&nbsp; NAME=20
ERENKOY_ORNEKILCE_PG_region<BR>&nbsp; TYPE POLYGON<BR>&nbsp; DATA=20
ERENKOY_ORNEKILCE_PG_region<BR>&nbsp; STATUS OFF<BR>&nbsp;=20
CLASS<BR>&nbsp;&nbsp;&nbsp; SYMBOL 'circle'<BR>&nbsp;&nbsp;&nbsp; SIZE=20
2<BR>&nbsp;&nbsp;&nbsp; NAME 'Ilceler'<BR>&nbsp;&nbsp;&nbsp; =
OUTLINECOLOR 181=20
181 145<BR>&nbsp; END<BR>&nbsp; METADATA<BR>&nbsp;&nbsp;&nbsp; WMS_TITLE =

"Ilceler Boundaries"<BR>&nbsp;&nbsp;&nbsp; WMS_ABSTRACT Ilceler =
boundaries for=20
Erenkoy County. See MURAT for more information."<BR>&nbsp;&nbsp;&nbsp; =
WMS_SRS=20
"EPSG:26915"<BR>&nbsp; END<BR>END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV><FONT face=3DArial =
size=3D2>
<DIV><BR>LAYER<BR>&nbsp; NAME ERENKOY_ORNEKCADDE_PL_polyline<BR>&nbsp; =
TYPE=20
POLYGON<BR>&nbsp; STATUS OFF<BR>&nbsp; DATA =
ERENKOY_ORNEKCADDE_PL_polyline</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp; NAME =
'Caddeler'<BR>&nbsp;&nbsp;&nbsp;=20
TEMPLATE "lakespy2.html"<BR>&nbsp;&nbsp;&nbsp; COLOR 49 117 =
185<BR>&nbsp;=20
END</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; HEADER "lakespy2_header.html"<BR>&nbsp; FOOTER=20
"lakespy2_footer.html"</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; TOLERANCE 3</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; DUMP TRUE # allow GML export</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; METADATA<BR>&nbsp;&nbsp;&nbsp; WMS_TITLE=20
"Caddeler"<BR>&nbsp;&nbsp;&nbsp; WMS_ABSTRACT =
"Caddeler"<BR>&nbsp;&nbsp;&nbsp;=20
WMS_SRS "EPSG:26915"<BR>&nbsp; END<BR>END</DIV>
<DIV>&nbsp;</DIV>
<DIV>Erenkoy is the name of neighbourhood, sokak-ilceler and other stuff =
looking=20
unfamiliar for you, are the Turkish for streets-towns etc.</DIV>
<DIV>I had to keep TEMPLATE, FOOTER and HEADER for my layer same as the =
demo's=20
since I also have no idea of making my own templates, footers and =
headers.=20
</DIV>
<DIV>Overall, I am in a bottleneck, stuck up.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Please help me:)</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks in advance.....</DIV>
<DIV>&nbsp;</DIV>
<DIV>Have a nice day</DIV>
<DIV>&nbsp;</DIV>
<DIV>Murat Isik</DIV>
<DIV>Istanbul-Turkey</FONT></DIV></BODY></HTML>

------=_NextPart_000_010A_01C38E8D.6AE48540--




More information about the mapserver-users mailing list