Yes, I just recently reported that bug. And fixed it in my branch, which will be a pull request in the near future.
From: andrea.a...@gmail.com [mailto:andrea.a...@gmail.com] On Behalf Of Andrea Aime Sent: Friday, October 31, 2014 2:44 PM To: Jody Garnett Cc: Farwell, Michael D - Exelis; geotools-gt2-users@lists.sourceforge.net Subject: Re: [Geotools-gt2-users] WFS 1.0.0 GetFeature BBOX filter Hi Jody, if memory serves me right we also had a report (or was it a pull requst?) that wfs-ng just ignores the mapserver mode Cheers Andrea On Fri, Oct 31, 2014 at 5:33 PM, Jody Garnett <jody.garn...@gmail.com<mailto:jody.garn...@gmail.com>> wrote: Both are valid - because GML is insane. Ideally we would like MapServer to relax - we could introduce a strategy object for different dialects of WFS to record implementation glitches (such as which flavour of GML they prefer). I did not see from your example what version of the protocol you were trying to use? Jody Garnett On Fri, Oct 31, 2014 at 5:50 AM, Farwell, Michael D - Exelis <michael.farw...@exelisinc.com<mailto:michael.farw...@exelisinc.com>> wrote: Jody asked me to move this question to the user’s list. My apologies. He also asked about the version. I’m using a slightly modified 13-SNAPSHOT. All, I’m trying to use Geotools to query a Mapserver instance. Map params = new HashMap(); params.put("WFSDataStoreFactory:GET_CAPABILITIES_URL", capUrl); params.put("WFSDataStoreFactory:WFS_STRATEGY", "mapserver"); String typeName = "ms_cities"; WFSDataStoreFactory fact = new WFSDataStoreFactory(); WFSDataStore dataStore = fact.createDataStore(params); SimpleFeatureSource sfs = dataStore.getFeatureSource(typeName); FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints()); Query query = new Query(); query.setTypeName(typeName); GeometryDescriptor geometryDesc = dataStore.getSchema(typeName).getGeometryDescriptor(); CoordinateReferenceSystem crs = geometryDesc.getCoordinateReferenceSystem(); ReferencedEnvelope env = new ReferencedEnvelope(-59, -58, -35, -34, crs); Filter filter = ff.bbox(ff.property("msGeometry"), env); query.setFilter(filter); The code above (with some slight modifications to the wfs-ng module) produces a BBOX filter in the following format: <gml:coord><gml:X>-59.0</gml:X><gml:Y>-35.0</gml:Y></gml:coord><gml:coord>< gml:X>-58.0</gml:X><gml:Y>-34.0</gml:Y></gml:coord> Unfortunately, the Mapserver instance wants the coordinates in the following format: <gml:coordinates cs="," decimal="." ts=" ">-59,-35 -58,-34</gml:coordinates> Is there any way to accomplish this? I’ve tried setting the geometry factory on the dataStore object and the query object (through the Hints), which unfortunately, didn’t work. Does anyone know how to change this behavior? Thanks, Mike ________________________________ This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by any virus transmitted by this e-mail. ------------------------------------------------------------------------------ _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net<mailto:GeoTools-GT2-Users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users ------------------------------------------------------------------------------ _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net<mailto:GeoTools-GT2-Users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users -- == GeoServer Professional Services from the experts! Visit http://goo.gl/NWWaa2 for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it AVVERTENZE AI SENSI DEL D.Lgs. 196/2003 Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003. The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc. -------------------------------------------------------
------------------------------------------------------------------------------
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users