Re: [Geotools-gt2-users] Parse feature collection
I'm currently using geotools version 2.4.4, and I want to parse a WFSFeatureCollection. But I found something interesting now: it is possible to parse a feature collection from an input stream, when a xsi:schemaLocation for the wfs namespace is provided! If this schemaLocation is not provided (as in my test-file), the parser seems to ignore wfs elements in the document. Probably this was my mistake. --- Matthias Drews phone: +49 (89) 121528-0mailto:[EMAIL PROTECTED] fax: +49 (89) 121528-79 http://www.gaf.de GAF AG Arnulfstr. 197 D-80634 Muenchen Germany Vorstand: Dr. Peter Volk, Aufsichtsratsvorsitzender: Marcello Maranesi Amtsgericht Muenchen HRB 140 509, Firmensitz: Muenchen -Ursprüngliche Nachricht- Von: Justin Deoliveira [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 5. Juni 2008 21:01 An: Matthias Drews Cc: geotools-gt2-users@lists.sourceforge.net Betreff: Re: [Geotools-gt2-users] Parse feature collection Hi Matthias, What version of geotools are you using? Also, is it a WFSFeatureCollection that you are parsing... or some other type of FeatureCollection? -Justin Matthias Drews wrote: Hello list, I have a problem parsing a FeatureCollection from an XMLFile using geotools org.xml.geotools.Parser with org.geotools.gml2.GMLConfiguration. As a result I get a HashMap containing 2 entries (the bounded-by-envelope and the one feature member of my feature collection) instead of the FeatureCollection itself. Isn't it possible to parse feature collections, or do you have another idea what I am doing wrong? Best regards, Matthias Drews !DSPAM:4007,48478174190861439371379! -- -- -- --- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php !DSPAM:4007,48478174190861439371379! -- -- ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users !DSPAM:4007,48478174190861439371379! -- Justin Deoliveira The Open Planning Project [EMAIL PROTECTED] - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] Parse feature collection
Hi Matthias, Yes, the schemaLocation is pretty critical to have the parsing work correctly on the 2.4.x branch. On 2.5 (aka trunk) the parser is more lax and should handle cases where the schemaLocation is not provided. Glad you got it to work :). -Justin Matthias Drews wrote: I'm currently using geotools version 2.4.4, and I want to parse a WFSFeatureCollection. But I found something interesting now: it is possible to parse a feature collection from an input stream, when a xsi:schemaLocation for the wfs namespace is provided! If this schemaLocation is not provided (as in my test-file), the parser seems to ignore wfs elements in the document. Probably this was my mistake. --- Matthias Drews phone: +49 (89) 121528-0 mailto:[EMAIL PROTECTED] fax: +49 (89) 121528-79 http://www.gaf.de GAF AG Arnulfstr. 197 D-80634 Muenchen Germany Vorstand: Dr. Peter Volk, Aufsichtsratsvorsitzender: Marcello Maranesi Amtsgericht Muenchen HRB 140 509, Firmensitz: Muenchen -Ursprüngliche Nachricht- Von: Justin Deoliveira [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 5. Juni 2008 21:01 An: Matthias Drews Cc: geotools-gt2-users@lists.sourceforge.net Betreff: Re: [Geotools-gt2-users] Parse feature collection Hi Matthias, What version of geotools are you using? Also, is it a WFSFeatureCollection that you are parsing... or some other type of FeatureCollection? -Justin Matthias Drews wrote: Hello list, I have a problem parsing a FeatureCollection from an XMLFile using geotools org.xml.geotools.Parser with org.geotools.gml2.GMLConfiguration. As a result I get a HashMap containing 2 entries (the bounded-by-envelope and the one feature member of my feature collection) instead of the FeatureCollection itself. Isn't it possible to parse feature collections, or do you have another idea what I am doing wrong? Best regards, Matthias Drews -- -- -- --- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php !DSPAM:4007,48478174190861439371379! -- -- ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users !DSPAM:4007,48478174190861439371379! -- Justin Deoliveira The Open Planning Project [EMAIL PROTECTED] - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users !DSPAM:4007,4848fde9220327180515871! -- Justin Deoliveira The Open Planning Project [EMAIL PROTECTED] - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] Parse feature collection
Hi Matthias, What version of geotools are you using? Also, is it a WFSFeatureCollection that you are parsing... or some other type of FeatureCollection? -Justin Matthias Drews wrote: Hello list, I have a problem parsing a FeatureCollection from an XMLFile using geotools org.xml.geotools.Parser with org.geotools.gml2.GMLConfiguration. As a result I get a HashMap containing 2 entries (the bounded-by-envelope and the one feature member of my feature collection) instead of the FeatureCollection itself. Isn't it possible to parse feature collections, or do you have another idea what I am doing wrong? Best regards, Matthias Drews !DSPAM:4007,48478174190861439371379! - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php !DSPAM:4007,48478174190861439371379! ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users !DSPAM:4007,48478174190861439371379! -- Justin Deoliveira The Open Planning Project [EMAIL PROTECTED] - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users