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

Stephen Clark stephen.clark at focus.ca
Thu Dec 18 08:26:33 PST 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> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>  NAME =
proposed_point<BR> =20
STATUS OFF<BR>  DATA "d:/folder/to/point_symbol/point"<BR>  =
TYPE=20
POINT<BR>  LABELITEM "DESCRIPT"<BR>  =
CLASS<BR>    NAME=20
'Name'  # the field in the DBF file to use to =
display as a=20
label<BR>    COLOR 0 255 0<BR>    SYMBOL=20
'circle'<BR>    SIZE 10<BR>   =20
LABEL<BR>      MINFEATURESIZE=20
100<BR>      MINDISTANCE=20
150<BR>      POSITION=20
CC<BR>      SIZE =
TINY<BR>     =20
COLOR 255 0 0<BR>    END<BR>  =
END<BR>   =20
<BR>  METADATA<BR>    WMS_TITLE "Point=20
Labelled"<BR>    WMS_ABSTRACT "N/A =
"<BR>   =20
#WMS_SRS "EPSG:26910"<BR>  END<BR>END <BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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> </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> </DIV>
  <DIV><FONT face=3DArial size=3D2>What I do in ArcView 3.x =
is:</FONT></DIV>
  <DIV> </DIV>
  <DIV><FONT face=3DArial size=3D2>1. Export data into a textfile<BR>2. =
Choose=20
  Table->Add and select your Textfile<BR>3. Choose View->Add Event =
Theme=20
  and select txt-table, the X- and <BR>the Y-field.<BR>4. Choose=20
  Theme->Convert to shapefile</FONT></DIV>
  <DIV> </DIV>
  <DIV><FONT face=3DArial size=3D2>My text file is:</FONT></DIV>
  <DIV> </DIV>
  <DIV><FONT face=3DArial=20
  size=3D2>"X","Y","NAME"<BR>29.0708,40.9678,HELLO</FONT></DIV>
  <DIV> </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> </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> </DIV>
  <DIV><FONT face=3DArial size=3D2>LAYER<BR>  =
NAME mylayer<BR>  TYPE=20
  point<BR>  STATUS ON<BR>  DATA mylayer<BR>  LABELCACHE=20
  ON<BR>  LABELITEM 'NAME'<BR>  CLASS<BR>   NAME=20
  'NAME'<BR>   SYMBOL 'circle'<BR>   SIZE =
5<BR>  =20
  COLOR 64 0 64<BR>    =
LABEL<BR>     =20
  TYPE truetype<BR>#      FORCE=20
  true<BR>      FONT=20
  arial<BR>      COLOR 64 0=20
  64<BR>      ANGLE=20
  AUTO<BR>      POSITION=20
  AUTO<BR>      MINSIZE=20
  2<BR>      SIZE 6<BR>   =
END<BR> =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> </DIV>
  <DIV><FONT face=3DArial size=3D2>Any ideas on creating a simple, =
labelled point=20
  layer?</FONT></DIV>
  <DIV> </DIV>
  <DIV><FONT face=3DArial size=3D2>Have a nice day.</FONT></DIV>
  <DIV> </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