[Mapserver-users] ArcView created layer not working in mapscript

Stephen Clark stephen.clark at focus.ca
Thu Dec 18 11:26:33 EST 2003


This is a multi-part message in MIME format.

------=_NextPart_000_09EE_01C3C540.A5505530
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Try this:



LAYER
  NAME proposed_point
  STATUS OFF
  DATA "d:/folder/to/point_symbol/point"
  TYPE POINT
  LABELITEM "DESCRIPT"
  CLASS
    NAME 'Name'  # the field in the DBF file to use to display as a =
label
    COLOR 0 255 0
    SYMBOL 'circle'
    SIZE 10
    LABEL
      MINFEATURESIZE 100
      MINDISTANCE 150
      POSITION CC
      SIZE TINY
      COLOR 255 0 0
    END
  END
   =20
  METADATA
    WMS_TITLE "Point Labelled"
    WMS_ABSTRACT "N/A "
    #WMS_SRS "EPSG:26910"
  END
END=20





  ----- Original Message -----=20
  From: Murat Isik=20
  To: mapserver-users at lists.gis.umn.edu=20
  Sent: Thursday, December 18, 2003 2:46 AM
  Subject: [Mapserver-users] ArcView created layer not working in =
mapscript


  Hello,
  I am trying to make my own tiny, amatuer layer in ArcView 3.x and =
display it in mapscript but I am failing, I will be very glad if anyone =
can help...

  This alyer of mine is just a single point at a certain coordinate, =
with a single label. I had learned how to make point layers from this =
list before but when it comes to adding label, I am stuck.

  What I do in ArcView 3.x is:

  1. Export data into a textfile
  2. Choose Table->Add and select your Textfile
  3. Choose View->Add Event Theme and select txt-table, the X- and=20
  the Y-field.
  4. Choose Theme->Convert to shapefile

  My text file is:

  "X","Y","NAME"
  29.0708,40.9678,HELLO

  So it is supposed to print thi point at the X and Y and also label it =
with HELLO

  The shapefile I create works in Arcview itself but not under =
php/mapscript with this layer definition in the mapfile:

  LAYER
    NAME mylayer
    TYPE point
    STATUS ON
    DATA mylayer
    LABELCACHE ON
    LABELITEM 'NAME'
    CLASS
     NAME 'NAME'
     SYMBOL 'circle'
     SIZE 5
     COLOR 64 0 64
      LABEL
        TYPE truetype
  #      FORCE true
        FONT arial
        COLOR 64 0 64
        ANGLE AUTO
        POSITION AUTO
        MINSIZE 2
        SIZE 6
     END
    END
  END

  It gives an error about the NAME column.=20

  Any ideas on creating a simple, labelled point layer?

  Have a nice day.

  Murat Isik
------=_NextPart_000_09EE_01C3C540.A5505530
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.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Try this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>&nbsp; NAME =
proposed_point<BR>&nbsp;=20
STATUS OFF<BR>&nbsp; DATA "d:/folder/to/point_symbol/point"<BR>&nbsp; =
TYPE=20
POINT<BR>&nbsp; LABELITEM "DESCRIPT"<BR>&nbsp; =
CLASS<BR>&nbsp;&nbsp;&nbsp; NAME=20
'Name'&nbsp; # the field&nbsp;in the DBF&nbsp;file to use to =
display&nbsp;as a=20
label<BR>&nbsp;&nbsp;&nbsp; COLOR 0 255 0<BR>&nbsp;&nbsp;&nbsp; SYMBOL=20
'circle'<BR>&nbsp;&nbsp;&nbsp; SIZE 10<BR>&nbsp;&nbsp;&nbsp;=20
LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINFEATURESIZE=20
100<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINDISTANCE=20
150<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION=20
CC<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE =
TINY<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
COLOR 255 0 0<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp; =
END<BR>&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp; METADATA<BR>&nbsp;&nbsp;&nbsp; WMS_TITLE "Point=20
Labelled"<BR>&nbsp;&nbsp;&nbsp; WMS_ABSTRACT "N/A =
"<BR>&nbsp;&nbsp;&nbsp;=20
#WMS_SRS "EPSG:26910"<BR>&nbsp; END<BR>END <BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Dmuratisik at megatek.com.tr =
href=3D"mailto:muratisik at megatek.com.tr">Murat=20
  Isik</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  title=3Dmapserver-users at lists.gis.umn.edu=20
  =
href=3D"mailto:mapserver-users at lists.gis.umn.edu">mapserver-users at lists.g=
is.umn.edu</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, December 18, =
2003 2:46=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Mapserver-users] =
ArcView=20
  created layer not working in mapscript</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>I am trying to make my own tiny, =
amatuer layer in=20
  ArcView 3.x and display it in mapscript but I am failing, I will be =
very glad=20
  if anyone can help...</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>This alyer of mine is just a single =
point at a=20
  certain coordinate, with a single label. I had learned how to make =
point=20
  layers from this list before but when it comes to adding label, I am=20
  stuck.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>What I do in ArcView 3.x =
is:</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>1. Export data into a textfile<BR>2. =
Choose=20
  Table-&gt;Add and select your Textfile<BR>3. Choose View-&gt;Add Event =
Theme=20
  and select txt-table, the X- and <BR>the Y-field.<BR>4. Choose=20
  Theme-&gt;Convert to shapefile</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>My text file is:</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial=20
  size=3D2>"X","Y","NAME"<BR>29.0708,40.9678,HELLO</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>So it is supposed to print thi point =
at the X and=20
  Y and also label it with HELLO</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>The shapefile I create works in =
Arcview itself=20
  but not under php/mapscript with this layer definition in the=20
  mapfile:</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>LAYER<BR>&nbsp; =
NAME&nbsp;mylayer<BR>&nbsp; TYPE=20
  point<BR>&nbsp; STATUS ON<BR>&nbsp; DATA mylayer<BR>&nbsp; LABELCACHE=20
  ON<BR>&nbsp; LABELITEM 'NAME'<BR>&nbsp; CLASS<BR>&nbsp;&nbsp; NAME=20
  'NAME'<BR>&nbsp;&nbsp; SYMBOL 'circle'<BR>&nbsp;&nbsp; SIZE =
5<BR>&nbsp;&nbsp;=20
  COLOR 64 0 64<BR>&nbsp;&nbsp;&nbsp; =
LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  TYPE truetype<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FORCE=20
  true<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FONT=20
  arial<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 64 0=20
  64<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANGLE=20
  AUTO<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION=20
  AUTO<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINSIZE=20
  2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 6<BR>&nbsp;&nbsp; =
END<BR>&nbsp;=20
  END<BR>END<BR></FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>It gives an error about the NAME =
column.=20
  </FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Any ideas on creating a simple, =
labelled point=20
  layer?</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Have a nice day.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Murat =
Isik</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_09EE_01C3C540.A5505530--




More information about the mapserver-users mailing list