[mapserver-users] Re: Import of KML

2011-09-02 Thread kaipi
You can do that with EXPRESSION and ANGLE.
I am not sure if this works with KML - maybe you need to convert to
shapefile before (eg. with ogr2ogr).

  LAYER
NAME WINDS
EXTENT -180 -90 180 90
TYPE POINT

CONNECTIONTYPE ogr
CONNECTION C:/MapData/maps/KML/wind1.kml
DATA wind1

CLASS
  EXPRESSION ([ATTRIBUTE_FIELD] = 'windstyle') # only points with
attribute 'windstyle' will be rendered
  NAME windstyle
  STYLE
COLOR 32 32 128
SYMBOL circle
ANGLE [ROTATION] # if your points have an attribute field ROTATION
with an angle given in degrees the value will be used to rotate the symbol
SIZE 6
  END
END
  END 

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Import-of-KML-tp6747216p6753628.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE: Import of KML

2011-09-02 Thread xander
Kaipi,

Thanks - that's really helpful.

The use of EXPRESSION([ATTRIBUTE_FIELD]] = '...') and ANGLE[ROTATION] will 
solve half of my problem.  It looks like the other half is a GDAL/OGR issue, 
not Mapserver.  The KML IconStyle element of a point appears to be ignored 
by ogr (and by ogr2ogr).  I tried several output formats (including shapefile) 
and it just isn't there.  Ideally I would be able to select the rotation angle 
from this part of a Placemark: IconStyle ... 
heading190/heading.../IconStyle.

Xander


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Import-of-KML-tp6747216p6753696.html
Sent from the Mapserver - User mailing list archive at Nabble.com.___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users