[mapserver-users] Symbology

Jay Kapalczynski jkapalczynski at ci.maple-grove.mn.us
Tue Sep 21 06:52:46 PDT 2010


I added a few things to my sym file and got a few  to work

I can now call circle and get a circle….BUT for some reason the image will not work, maybe an issue with the image?  You have any test images that are known to work?
I have the image like this IMAGE 'bike.png' because the images are in the same folder as the .sym file

Any other thoughts….greatly appreciated….thanks

THIS WORKS
                     CLASS
                           NAME 'Last Week'
                           STYLE
                                  SYMBOL "circle"
                                  COLOR 0 0 0
                                  OUTLINECOLOR 0 0 0
                                  #SIZE 12
                         END  # STYLE
                     END # CLASS
THIS DOES NOT WORK
                     CLASS
                           NAME 'Last Week'
                           STYLE
                                  SYMBOL "bike"
                                  COLOR 0 0 0
                                  OUTLINECOLOR 0 0 0
                                  #SIZE 12
                         END  # STYLE
                     END # CLASS
.SYM FILE

Symbol
Name 'circle'
Type ELLIPSE
FILLED TRUE
Points
1 1
END
END

SYMBOL
    NAME 'circle-dashed'
    TYPE ELLIPSE
    FILLED TRUE
    POINTS 1 1 END
    STYLE 5 5 END
  END

SYMBOL
       NAME 'bike'
       TYPE pixmap
       IMAGE 'bike.png'
END


From: Bob Basques [mailto:Bob.Basques at ci.stpaul.mn.us]
Sent: Monday, September 20, 2010 8:55 AM
To: Jay Kapalczynski; mapserver-users at lists.osgeo.org; 'adams'
Subject: RE: [mapserver-users] Symbology


try this instead:


   SYMBOLSET "../../htdocs/symbolsets/symbolset.sym"


bobb



>>> Jay Kapalczynski <jkapalczynski at ci.maple-grove.mn.us> wrote:


This is what I am trying…when I turn on the layer it all goes pink…so something is not correct


I have to move back 3 folders and go into the one housing the sym file


The images are in the sym file folder in their own file





[cid:image001.jpg at 01CB596A.5C833820]





MAP FILE





       PROJECTION


              'init=epsg:26915'


       END





       LEGEND


             STATUS ON


             LABEL


              TYPE TRUETYPE


              FONT vera_sans


              SIZE 8


              COLOR 0 0 0


             END


       END





       SYMBOLSET "../../../htdocs/symbolsets/symbolset.sym"





       LAYER


             NAME Burglaries


             DATA './Burglaries.shp'


             STATUS ON


             TYPE POINT





                     CLASS


                           NAME 'Last Weeks'


                           STYLE


                                  SYMBOL "bike"


                                  COLOR 0 0 0


                                  OUTLINECOLOR 0 0 0


                         END


                     END








SYMBOL FILE





SYMBOLSET





SYMBOL


  NAME 'bike'


  TYPE pixmap


  IMAGE '/symbol_images/bike.png'


  TRANSPARENT 2


END





SYMBOL


  NAME 'church'


  TYPE pixmap


  IMAGE '/symbol_images/church.png'


  TRANSPARENT 5


END









Folder structure:


Ms4w


Apps


maplegrove


Htdocs


                                Symbolset folder




.sym file


maps


                                maple_grove


                                                police




.map files


…


…


…





From:

Smith, Michael D ERDC-CRREL-NH [mailto:michael.smith at usace.army.mil]
Sent: Thursday, September 16, 2010 10:26 AM
To: Jay Kapalczynski; 'Fawcett, David (MPCA)'; 'Michael Schulz'
Cc: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Subject: Re: [mapserver-users] Symbology



Jay,

A couple of additional steps.

1). Add SYMBOLSET as the first line in your symbol file

2). In the mapfile, in the MAP section add a line

SYMBOLSET /path/to/symbolset_file

Mike


--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers
Hanover, NH



On 9/16/10  11:20 AM, "Jay Kapalczynski" <jkapalczynski at ci.maple-grove.mn.us> wrote:


Thanks guys for your thoughts...still green to this and trying to learn
I would make real sense to me to create the .sym file where I would not have to redefine the particular symbol sets

DO I HAVE THIS RIGHT?

1.  BUT how do I define the symbol set or point to the .sym file from the map file ?????

SYMBOL FILE: So in the Symbol file I would have this (example of two of them)

SYMBOL
  NAME 'bike'
  TYPE pixmap
  IMAGE '/home/mapserv/proj/pmap/bike.png'
  TRANSPARENT 2
END
SYMBOL
  NAME 'church'
  TYPE pixmap
  IMAGE '/home/mapserv/proj/pmap/church.png'
  TRANSPARENT 5
END


MAP FILE: I would simply call them?

CLASS
  STYLE
    SYMBOL "bike"
    COLOR 0 0 0
    OUTLINECOLOR 0 0 0
  END
END


-----Original Message-----
From: Fawcett, David (MPCA) [mailto:David.Fawcett at state.mn.us]
Sent: Thursday, September 16, 2010 9:50 AM
To: Jay Kapalczynski; 'Michael Schulz'
Cc: mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] Symbology

You can put the symbol definition in your map file, or in a symbols file (e.g. symbols.sym) and then set SYMBOLSET at the MAP level to point to your symbols.sym file.

David.

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jay Kapalczynski
Sent: Thursday, September 16, 2010 9:45 AM
To: 'Michael Schulz'
Cc: mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] Symbology

Ok that seems to make sense...but where do I place the image SYMBOL (your example below)?  DO I place that in the map file as well?
Little confused there....

Thanks Michael and Adam for your return replys.


-----Original Message-----
From: mandschulz at googlemail.com [mailto:mandschulz at googlemail.com] On Behalf Of Michael Schulz
Sent: Thursday, September 16, 2010 9:27 AM
To: Jay Kapalczynski
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Symbology

Hi,

yes, you have to define an image symbol in your symbolset and use that:

SYMBOL
  NAME 'church'
  TYPE pixmap
  IMAGE 'church.gif'
  TRANSPARENT 5
END

then use
SYMBOL 'church' in your style.

Cheers, Michael

2010/9/16 Jay Kapalczynski <jkapalczynski at ci.maple-grove.mn.us>:
> In a map file...Is there a way to use an image (jpg, bmp, png) instead of a
> marker symbol (star, circle etc) when symbolizing points
>
>
>
>        LAYER
>
>              DUMP TRUE
>
>              NAME 'Firestations'
>
>              DATA 'firestations'
>
>              TYPE POINT
>
>              STATUS ON
>
>              CLASS
>
>                NAME 'Fire Stations'
>
>                COLOR 254 0 0
>
>                     INSTEAD OF STAR PLACE AN IMAGE
>
>                SYMBOL "star"
>
>                    SIZE 8
>
>              END
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>




























_______________________________________________







mapserver-users mailing list





mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>





http://lists.osgeo.org/mailman/listinfo/mapserver-users









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100921/0738cc39/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 12997 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100921/0738cc39/attachment.jpg>


More information about the MapServer-users mailing list