Check the test cases for examples of how to parse styles; I read over them
and was able to make some docs here:
- http://docs.geotools.org/latest/userguide/extension/xsd/kml.html

Indeed that is where you are pulling that sample data from! Have a look at
the parsing example:
- there is one showing how to parse features
- and another showing how to parse a "FeatureTypeStyle"

You can use the parser in two ways (parse everything; or streaming the
content as it is parsed). The examples show both ways; you can use the
parser to parse either style or features in one gulp. Or perhaps if you ask
for the right thing you will get a Map with matching feature and style; give
it a go and report back success/failure/code example.

Jody

On Tue, Jul 26, 2011 at 3:42 AM, mortac8 <ashley_c_m...@raytheon.com> wrote:

> Is there an example of how to parse the styles from a KML file?  For
> example,
> I'd like to parse the styles for each state in
> http://docs.geotools.org/latest/userguide/_downloads/states.kml.  Can
> anyone
> help out?
>
> I see the test classes like PolyStleTypeBindingTest.java but do I need to
> extend KMLTesetSupport in my production class and can GeoTools handle
> styles
> that come from <styleUrl> like in states.kml?
>
> Thanks!!
> Ashley
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/parsing-KML-styles-tp6619248p6619248.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Storage Efficiency Calculator
> This modeling tool is based on patent-pending intellectual property that
> has been used successfully in hundreds of IBM storage optimization engage-
> ments, worldwide.  Store less, Store more with what you own, Move data to
> the right place. Try It Now!
> http://www.accelacomm.com/jaw/sfnl/114/51427378/
> _______________________________________________
> Geotools-gt2-users mailing list
> Geotools-gt2-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to