The OGR style is the variable that is returned in the variable that is casted.
Please look at the Layer definitions that I sent yesterday in the mapfile
example.
DATA "SELECT Name as NAME, CAST(OGR_STYLE AS character(32)) AS STYLE FROM
'Fibertech solution' WHERE OGR_GEOMETRY='LINESTRING'"
CLASSITEM "STYLE"
LABELITEM "NAME"
CLASS
EXPRESSION "@msn_ylw-pushpin4"
That is the STYLE value used in the CLASSITEM expression.
The description is shown in the label that uses the labelitem. Also shown in
the mapfile example yesterday.
If You only want to get the features with the style ‘@msn_ylw-pushpin4' with
ogrinfo you should write it like this:
ogrinfo -ro doc_test.kml \
-sql "SELECT *, CAST(OGR_STYLE AS character(255)) AS STYLE FROM 'Fibertech
solution' \
WHERE OGR_GEOMETRY='LINESTRING' AND OGR_STYLE='@msn_ylw-pushpin4'" –al
That returns the geometry and variables according to this criteria, i.e. only
lines and specific style.
But I guess that You most likely would like to do this filtering in the Class
section of the mapfile and not in the DATA statement.
/Lars
From: [email protected]
[mailto:[email protected]] On Behalf Of alok mathur
Sent: den 11 mars 2015 05:46
To: [email protected]
Subject: [mapserver-users] KML reading through OGR
Hi,
I am unable to get the Styleurl using Ogrinfo. I am trying the command
ogrinfo -al doc_test.kml -where "ogr_style='@msn_ylw-pushpin4'"
but the result is
Layer name: Fibertech solution
Geometry: 3D Unknown (any)
Feature Count: 0
Layer SRS WKT:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9108"]],
AUTHORITY["EPSG","4326"]]
Name: String (0.0)
Description: String (0.0)
Also i want to show the description of placemark on map.
Thanks!
[https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif]
--
Alok Mathur | Software Engineer 2A | Ciena
Mobile +91 9899413266
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users