I think you are trying to use org.geotools.GML, which is in gt-xml. Do 
you have a dependency on this artifact in your pom.xml, like the 
declaration on this page?
http://docs.geotools.org/latest/userguide/library/xml/index.html

Kind regards,
Ben.

On 03/04/13 23:59, Alexander Melchior wrote:
> Hi,
>
> I'd like to use geotools to parse some Ordinance Survey Mastermap
> Topology Layer GML data, or easily put: some GML2.
>
> I've made a new project in Eclipse using Maven and added all the
> geotools dependencies with version 10-SNAPSHOT (see screenshot at
> http://home.a-eskwadraat.nl/~alexander/gml.jpg). Unfortunately I can't
> seem to find the org.geotools.gml class and as such the following code
> refuses to as it doesn't know what a GML object is:
>
>          GML gml = new GML(Version.GML3);
>          CRSAuthorityFactory crsFac =
> ReferencingFactoryFinder.getCRSAuthorityFactory("EPSG", null);
>          CoordinateReferenceSystem osgbCrs =
> crsFac.createCoordinateReferenceSystem("EPSG:27700");
>          gml.setCoordinateReferenceSystem(osgbCrs);
>          SimpleFeatureIterator iter = gml.decodeFeatureIterator(in);
>          while (iter.hasNext())
>          {
>
>          }
>
> Everything else seems works fine, I've tried the tutorial and was able
> to show some OS Mastermap shp files with geotools.
>
> Does anyone have a suggestion what I'm doing wrong or how I could
> configure maven so that I do have the org.geotools.gml (and relevant
> version) class(es)?
>
> Thanks in advance,
>
> Alexander Melchior

-- 
Ben Caradoc-Davies <[email protected]>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to