[mapserver-users] WFS Expression and Dates
Hi list, I have been trying to find how to use the LAYER FILTER option to specify the features of the dataset that are to be included in the layer, with dates. Feature members in my layer are like this: gml:featureMember ms:my_layer fid=my_layer.1 gml:boundedBy gml:Box srsName=EPSG:4326 gml:coordinates-15.678700,26.44 -13.306000,28.00/gml:coordinates /gml:Box /gml:boundedBy ms:msGeometry gml:Polygon srsName=EPSG:4326 gml:outerBoundaryIs gml:LinearRing gml:coordinates-15.309400,28.00 -13.306000,28.209400 -13.705900,26.44 -15.678700,26.780200 -15.309400,28.00 /gml:coordinates /gml:LinearRing /gml:outerBoundaryIs /gml:Polygon /ms:msGeometry ms:id1/ms:id ms:coordsystemcWGS84/ms:coordsystemc ms:sensorERS/ms:sensor ms:starttime2010/02/14 2:08:00/ms:starttime ms:resolution2/ms:resolution ms:polygon_areaPOLYGON((-15.3094 28., -13.3060 28.2094, -13.7059 26.4400, -15.6787 26.7802, -15.3094 28.))/ms:polygon_area /ms:my_layer /gml:featureMember And the folllowing filter expresions are working ok in my map file: FILTER ([resolution]==2) FILTER ('[sensor]'='ERS') But I cant make work the temporal filter expresion, I have tried almost everything FILTER (`[starttime]` `2010-02-15`) (http://osdir.com/ml/mapserver-users-gis/2007-10/msg00519.html) --- and the closes I got to get it working it is with string comparisson: ('[starttime]''2010/2/15 00:00') But I wonder if anyone here knows the rigth format for temporal expressions. Thanks! Regards, Joaquín __ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. __ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. __ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] WFS Intersect with gml:box
I have found out that composed BBOX queries using AND return unexpected results too (when using mysql data source, they work correctly using postgres): Test Queries. 1.AND and 2 BBOX: Returns only the first feature (-10,-10) and that feature is out of the boundinx boxes http://localhost:8080/cgi-bin/mywfs?SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter And BBOX PropertyName?msGeometry/PropertyName Box coordinates decimal=. cs=, ts= -7.874614621788295,14.799588929907502 15.519013391777994,28.776978474820144/coordinates /Box /BBOX BBOX PropertyName?msGeometry/PropertyName Box coordinates decimal=. cs=, ts= -100.82219958499486,-57.14285725714286 100.82219958499486,57.14285725714286/coordinates /Box /BBOX /And /Filter 2. AND, but only the first BBOX. Returns the 3 features, but feature 1 (-10,-10) is out of the bounding box http://localhost:8080/cgi-bin/mywfs?SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter And BBOX PropertyName?msGeometry/PropertyName Box coordinates decimal=. cs=, ts= -7.874614621788295,14.799588929907502 15.519013391777994,28.776978474820144/coordinates /Box /BBOX /And /Filter 3. The First BBOX, without AND. This one works :) http://localhost:8080/cgi-bin/mywfs?SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter BBOX PropertyName?msGeometry/PropertyName Box coordinates decimal=. cs=, ts= -7.874614621788295,14.799588929907502 15.519013391777994,28.776978474820144/coordinates /Box /BBOX /Filter -Mensaje original- De: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] En nombre de Joaquín Rodriguez-Guerra Urcelay Enviado el: viernes, 01 de abril de 2011 21:09 Para: mapserver-users@lists.osgeo.org CC: Óscar Luengo Herrero Asunto: RE: [mapserver-users] WFS Intersect with gml:box Hello, Today I had time to try this test in 3 different systems, and I couldn make it work in any of them, so I think this is a bug, should I create a new ticket in http://trac.osgeo.org/mapserver/. I write the steps below to reproduce the problem PROBLEM: In wfs layer where the data is retrieved from a mysql table, the intersect filter only returns a result list when the first feature(the first inserted record in the table) is part of the result set. If the filter shall return results, but the first feature is not among them, then we get not list of features: ?xml version='1.0' encoding=ISO-8859-1 ? wfs:FeatureCollection... gml:boundedBy gml:Box srsName=EPSG:4326 gml:coordinates-1.00,-1.00 -1.00,-1.00/gml:coordinates /gml:Box /gml:boundedBy /wfs:FeatureCollection Which is diffrent to when a query shall not return any resultst: ?xml version='1.0' encoding=ISO-8859-1 ? wfs:FeatureCollection... gml:boundedBy gml:nullmissing/gml:null /gml:boundedBy /wfs:FeatureCollection TEST: 1. Create Spatial Data CREATE DATABASE mmi_spatial_db; USE mmi_spatial_db; CREATE TABLE positionReal (oid LONG, point POINT); INSERT INTO positionReal(oid, point) VALUES (3, GeomFromText('POINT(-10 -10)',4326)); INSERT INTO positionReal(oid, point) VALUES (2, GeomFromText('POINT(10 10)',4326)); INSERT INTO positionReal(oid, point) VALUES (1, GeomFromText('POINT(0 20)',4326)); 2. Map file: MAP NAME MMI_WFS UNITS METERS TRANSPARENT ON IMAGECOLOR 0 0 0 IMAGETYPE PNG SHAPEPATH . SYMBOLSET ../symbols.sym STATUS ON WEB IMAGEPATH /opt/fsg/tmp/ IMAGEURL /opt/fsg/ METADATA wfs_title WFS MMI Server for MapServer ## REQUIRED wfs_onlineresource http://localhost:8080/cgi-bin/mywfs?; ## Recommended wfs_srsEPSG:4326## Recommended wfs_abstract This text describes my WFS service. ## Recommended wfs_schemas_location http://schemas.opengeospatial.net; END END PROJECTION init=epsg:4326 END LAYER NAME PositionReal STATUS ON TYPE POINT CONNECTIONTYPE OGR CONNECTION MySQL:mmi_spatial_db,user=mmi,password=*,host=127.0.0.1,port=3306 DATA SELECT point from positionReal #CONNECTIONTYPE POSTGIS #CONNECTION host=127.0.0.1 port=5432 dbname=mmi_db user=postgres password=postgres #DATA point from positionreal DUMP TRUE ## REQUIRED #TOLERANCE 200 #TOLERANCEUNITS PIXELS METADATA #wfs_featureid oid wfs_srs epsg:4326 wfs_onlineresource http://localhost:8080/cgi-bin/mywfs?; ## Recommended wfs_title PositionReal gml_include_items all ## Optional (serves all attributes for lay gml_surface_occurances 0,UNBOUNDED wfs_extent -180 -90 180 90 gml_include_items all END END END # Map File 3. Intersect
RE: [mapserver-users] WFS Intersect with gml:box
Hi, Thank you both for your help, the filter is finally working :D The bug is fixed, gml:box works now with intersect. I wanted to confirm this in the bug report, but I havent found they way to write anything there (is it because the bug is now closed?) Yesterday I was not getting the results I expected because I think my connection to the mysql database had some problem. I tried with a shapefile and it was working perfectly, so I then played a bit with the mysql connection and now it is working :) Joaquín De: Yewondwossen Assefa [yass...@dmsolutions.ca] Enviado el: miércoles, 30 de marzo de 2011 22:48 Para: Rahkonen Jukka CC: mapserver-users@lists.osgeo.org; Joaquín Rodriguez-Guerra Urcelay Asunto: Re: [mapserver-users] WFS Intersect with gml:box On 30/03/2011 4:16 PM, Rahkonen Jukka wrote: Hi, Intersect means the same as not disjoint, that the two geometries have at least one point in common. Thus WFS Intersects should select the point that is inside the box in the query. I made a quick test with OpenJUMP which is using JTS and it really does select such a point with a apatial query Intersects. Geos lib used by MapServer should act the same as JTS I beleive. Joaquín, you can maybe attach your simple map/data/url to the bug and I will check it using MapServer trunk. -- Assefa Yewondwossen Software Analyst Email: yass...@dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 __ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. __ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. __ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] WFS Intersect with gml:box
Thanks Yewondwossen, I am going to try to build from source (I have never donde it before) and update the bug :) Best regards, Joaquín De: Yewondwossen Assefa [mailto:yass...@dmsolutions.ca] Enviado el: martes, 29 de marzo de 2011 22:33 Para: Joaquín Rodriguez-Guerra Urcelay CC: mapserver-users@lists.osgeo.org Asunto: Re: [mapserver-users] WFS Intersect with gml:box Hi, I did check that and It was not working for me either. It is now fixed in trunk and also in the 5.6.x branch. I have added a bug http://trac.osgeo.org/mapserver/ticket/3789 [1] on it, so if you have the chance to build from source, please give it a try and update the bug. best regards, [1]: http://trac.osgeo.org/mapserver/ticket/3789 On 29/03/2011 1:18 PM, Joaquín Rodriguez-Guerra Urcelay wrote: Hello list, I am using a desktop GIS applicatin (uDig) to connect mapserver and display some wfs layers and I am having some trouble when uDig tries to filter features by bounding box. uDig sends a intersects spatial filter to obtain features in a bounding box: http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter xmlns=http://www.opengis.net/ogc;http://www.opengis.net/ogc xmlns:gml=http://www.opengis.net/gml;http://www.opengis.net/gmlIntersectsPropertyNamepoint/PropertyName gml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates /gml:Box /Intersects /Filter But it is not working :( ServiceExceptionReport version=1.2.0 xsi:schemaLocation=http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd;http://www.opengis.net/ogchttp:/schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd ServiceException code=InvalidParameterValue locator=filter msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in GetFeature : Filter xmlns=http://www.opengis.net/ogc;http://www.opengis.net/ogc xmlns:gml=http://www.opengis.net/gml;http://www.opengis.net/gmlIntersectsPropertyNamepoint/PropertyNamegml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates/gml:Box/Intersects/Filter /ServiceException /ServiceExceptionReport I have checked that the BBOX filter works perfectly ( I just replaced Intersects with BBOX in the above url) http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter xmlns=http://www.opengis.net/ogc;http://www.opengis.net/ogc xmlns:gml=http://www.opengis.net/gml;http://www.opengis.net/gmlBBOXPropertyNamepoint/PropertyName gml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates /gml:Box /BBOX /Filter But I cant make the INTERSECTS operation work. I would really appreciate if someone could point me to any examples of the INTERSECT operation used together with gml:box or Box. I have seen some examples of intersects used with gml:polygon, but it should work too with box, right?? Thanks for reading! Joaquín __ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. __ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. __ ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Assefa Yewondwossen Software Analyst Email: yass...@dmsolutions.camailto:yass...@dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 __ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender
RE: [mapserver-users] WFS Intersect with gml:box
Hi Yewondwossen, Are you planning to include this fix in mapserver 6?? I am still fighting with the sources, stuck in the error: ld: cannot find -ltermcap Hopefully fgs will create a new self-installer for mapserver 6 in a couple of months, or I should not expect that? Thanks, Joaquín De: Joaquín Rodriguez-Guerra Urcelay Enviado el: miércoles, 30 de marzo de 2011 9:29 Para: Yewondwossen Assefa CC: mapserver-users@lists.osgeo.org Asunto: RE: [mapserver-users] WFS Intersect with gml:box Thanks Yewondwossen, I am going to try to build from source (I have never donde it before) and update the bug ☺ Best regards, Joaquín De: Yewondwossen Assefa [mailto:yass...@dmsolutions.ca] Enviado el: martes, 29 de marzo de 2011 22:33 Para: Joaquín Rodriguez-Guerra Urcelay CC: mapserver-users@lists.osgeo.org Asunto: Re: [mapserver-users] WFS Intersect with gml:box Hi, I did check that and It was not working for me either. It is now fixed in trunk and also in the 5.6.x branch. I have added a bug http://trac.osgeo.org/mapserver/ticket/3789 [1] on it, so if you have the chance to build from source, please give it a try and update the bug. best regards, [1]: http://trac.osgeo.org/mapserver/ticket/3789 On 29/03/2011 1:18 PM, Joaquín Rodriguez-Guerra Urcelay wrote: Hello list, I am using a desktop GIS applicatin (uDig) to connect mapserver and display some wfs layers and I am having some trouble when uDig tries to filter features by bounding box. uDig sends a intersects spatial filter to obtain features in a bounding box: http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter xmlns=http://www.opengis.net/ogc;http://www.opengis.net/ogc xmlns:gml=http://www.opengis.net/gml;http://www.opengis.net/gmlIntersectsPropertyNamepoint/PropertyName gml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates /gml:Box /Intersects /Filter But it is not working :( ServiceExceptionReport version=1.2.0 xsi:schemaLocation=http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd;http://www.opengis.net/ogchttp:/schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd ServiceException code=InvalidParameterValue locator=filter msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in GetFeature : Filter xmlns=http://www.opengis.net/ogc;http://www.opengis.net/ogc xmlns:gml=http://www.opengis.net/gml;http://www.opengis.net/gmlIntersectsPropertyNamepoint/PropertyNamegml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates/gml:Box/Intersects/Filter /ServiceException /ServiceExceptionReport I have checked that the BBOX filter works perfectly ( I just replaced Intersects with BBOX in the above url) http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter xmlns=http://www.opengis.net/ogc;http://www.opengis.net/ogc xmlns:gml=http://www.opengis.net/gml;http://www.opengis.net/gmlBBOXPropertyNamepoint/PropertyName gml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates /gml:Box /BBOX /Filter But I cant make the INTERSECTS operation work. I would really appreciate if someone could point me to any examples of the INTERSECT operation used together with gml:box or Box. I have seen some examples of intersects used with gml:polygon, but it should work too with box, right?? Thanks for reading! Joaquín __ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. __ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. __ ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Assefa Yewondwossen Software Analyst Email: yass...@dmsolutions.camailto:yass...@dmsolutions.ca http
RE: [mapserver-users] WFS Intersect with gml:box
Hi Yewondwossen, Are you planning to include this fix in mapserver 6?? I am still fighting with the sources, stuck in the error: ld: cannot find -ltermcap Hopefully fgs will create a new self-installer for mapserver 6 in a couple of months, or I should not expect that? Thanks, Joaquín De: Joaquín Rodriguez-Guerra Urcelay Enviado el: miércoles, 30 de marzo de 2011 9:29 Para: Yewondwossen Assefa CC: mapserver-users@lists.osgeo.org Asunto: RE: [mapserver-users] WFS Intersect with gml:box Thanks Yewondwossen, I am going to try to build from source (I have never donde it before) and update the bug ☺ Best regards, Joaquín De: Yewondwossen Assefa [mailto:yass...@dmsolutions.ca] Enviado el: martes, 29 de marzo de 2011 22:33 Para: Joaquín Rodriguez-Guerra Urcelay CC: mapserver-users@lists.osgeo.org Asunto: Re: [mapserver-users] WFS Intersect with gml:box Hi, I did check that and It was not working for me either. It is now fixed in trunk and also in the 5.6.x branch. I have added a bug http://trac.osgeo.org/mapserver/ticket/3789 [1] on it, so if you have the chance to build from source, please give it a try and update the bug. best regards, [1]: http://trac.osgeo.org/mapserver/ticket/3789 On 29/03/2011 1:18 PM, Joaquín Rodriguez-Guerra Urcelay wrote: Hello list, I am using a desktop GIS applicatin (uDig) to connect mapserver and display some wfs layers and I am having some trouble when uDig tries to filter features by bounding box. uDig sends a intersects spatial filter to obtain features in a bounding box: http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter xmlns=http://www.opengis.net/ogc;http://www.opengis.net/ogc xmlns:gml=http://www.opengis.net/gml;http://www.opengis.net/gmlIntersectsPropertyNamepoint/PropertyName gml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates /gml:Box /Intersects /Filter But it is not working :( ServiceExceptionReport version=1.2.0 xsi:schemaLocation=http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd;http://www.opengis.net/ogchttp:/schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd ServiceException code=InvalidParameterValue locator=filter msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in GetFeature : Filter xmlns=http://www.opengis.net/ogc;http://www.opengis.net/ogc xmlns:gml=http://www.opengis.net/gml;http://www.opengis.net/gmlIntersectsPropertyNamepoint/PropertyNamegml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates/gml:Box/Intersects/Filter /ServiceException /ServiceExceptionReport I have checked that the BBOX filter works perfectly ( I just replaced Intersects with BBOX in the above url) http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter xmlns=http://www.opengis.net/ogc;http://www.opengis.net/ogc xmlns:gml=http://www.opengis.net/gml;http://www.opengis.net/gmlBBOXPropertyNamepoint/PropertyName gml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates /gml:Box /BBOX /Filter But I cant make the INTERSECTS operation work. I would really appreciate if someone could point me to any examples of the INTERSECT operation used together with gml:box or Box. I have seen some examples of intersects used with gml:polygon, but it should work too with box, right?? Thanks for reading! Joaquín __ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. __ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. __ ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Assefa Yewondwossen Software Analyst Email: yass...@dmsolutions.camailto:yass...@dmsolutions.ca http
RE: [mapserver-users] WFS Intersect with gml:box
Hello, I was finally able to build the source code, and I am not getting the error anymore :D (with Latest Release Branch, with trunk wfs was not working for me) But I am not getting the result I was expecting. Maybe I am wrong, but I thought that bbox operation would return all geometries contained in the box, and intersect would return all geometries contained in the box and also those who are not contained completely, but a part of them. Is this right?? In the following example I have a point in (10,10), and bbox filter in (-11,-11, -9,-9) returns the point :) http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter xmlns=http://www.opengis.net/ogc; xmlns:gml=http://www.opengis.net/gml;BBOXPropertyNamepoint/PropertyName gml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -11,-11 -9,-9/gml:coordinates /gml:Box /BBOX /Filter ?xml version='1.0' encoding=ISO-8859-1 ? wfs:FeatureCollection xmlns:ms=http://mapserver.gis.umn.edu/mapserver; xmlns:wfs=http://www.opengis.net/wfs; xmlns:gml=http://www.opengis.net/gml; xmlns:ogc=http://www.opengis.net/ogc; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://localhost:8080/cgi-bin/mywfs?SERVICE=WFSamp;VERSION=1.0.0amp;REQUEST=DescribeFeatureTypeamp;TYPENAME=PositionRealamp;OUTPUTFORMAT=XMLSCHEMA; gml:boundedBy gml:Box srsName=EPSG:4326 gml:coordinates-10.00,-10.00 -10.00,-10.00/gml:coordinates /gml:Box /gml:boundedBy gml:featureMember ms:PositionReal fid=PositionReal.1 gml:boundedBy gml:Box srsName=EPSG:4326 gml:coordinates-10.00,-10.00 -10.00,-10.00/gml:coordinates /gml:Box /gml:boundedBy ms:msGeometry gml:Point srsName=EPSG:4326 gml:coordinates-10.00,-10.00/gml:coordinates /gml:Point /ms:msGeometry ms:id1/ms:id /ms:PositionReal /gml:featureMember /wfs:FeatureCollection If I try the same query using intersect operation, I would expect the same result, but I obtain none http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter xmlns=http://www.opengis.net/ogc; xmlns:gml=http://www.opengis.net/gml;IntersectsPropertyNamepoint/PropertyName gml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -11,-11 -9,-9/gml:coordinates /gml:Box /Intersects /Filter ?xml version='1.0' encoding=ISO-8859-1 ? wfs:FeatureCollection xmlns:ms=http://mapserver.gis.umn.edu/mapserver; xmlns:wfs=http://www.opengis.net/wfs; xmlns:gml=http://www.opengis.net/gml; xmlns:ogc=http://www.opengis.net/ogc; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://localhost:8080/cgi-bin/mywfs?SERVICE=WFSamp;VERSION=1.0.0amp;REQUEST=DescribeFeatureTypeamp;TYPENAME=PositionRealamp;OUTPUTFORMAT=XMLSCHEMA; gml:boundedBy gml:Box srsName=EPSG:4326 gml:coordinates-1.00,-1.00 -1.00,-1.00/gml:coordinates /gml:Box /gml:boundedBy /wfs:FeatureCollection Forgive me if the results are right, and I just did not understand the operators, I am kind of new Thank you for your help!! PD: It is a shame FGS self-extract installer may not be available anymore, it was fantastic! Joaquín De: mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.org] En nombre de Daniel Morissette [dmorisse...@mapgears.com] Enviado el: miércoles, 30 de marzo de 2011 19:57 Para: mapserver-users@lists.osgeo.org Asunto: Re: [mapserver-users] WFS Intersect with gml:box On 11-03-30 01:44 PM, Yewondwossen Assefa wrote: I can not say one way or the other about fgs installer. You can ask on the fgs mailing list or someone cam comment here. Unfortunately FGS has fallen down the list of priorities in the last year or so. One of the reasons is that we put more efforts in native packages (e.g. UbuntuGIS, DebianGIS, etc.) and also the fact that we no longer have clients using it and supporting its maintenance. I think there is still a need for FGS in some cases, and we still use it internally for development, but we'd need a new champion to take care of official releases. -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users __ This
[mapserver-users] WFS Intersect with gml:box
Hello list, I am using a desktop GIS applicatin (uDig) to connect mapserver and display some wfs layers and I am having some trouble when uDig tries to filter features by bounding box. uDig sends a intersects spatial filter to obtain features in a bounding box: http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter xmlns=http://www.opengis.net/ogc; xmlns:gml=http://www.opengis.net/gml;IntersectsPropertyNamepoint/PropertyName gml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates /gml:Box /Intersects /Filter But it is not working :( ServiceExceptionReport version=1.2.0 xsi:schemaLocation=http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd; ServiceException code=InvalidParameterValue locator=filter msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in GetFeature : Filter xmlns=http://www.opengis.net/ogc; xmlns:gml=http://www.opengis.net/gml;IntersectsPropertyNamepoint/PropertyNamegml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates/gml:Box/Intersects/Filter /ServiceException /ServiceExceptionReport I have checked that the BBOX filter works perfectly ( I just replaced Intersects with BBOX in the above url) http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter xmlns=http://www.opengis.net/ogc; xmlns:gml=http://www.opengis.net/gml;BBOXPropertyNamepoint/PropertyName gml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates /gml:Box /BBOX /Filter But I cant make the INTERSECTS operation work. I would really appreciate if someone could point me to any examples of the INTERSECT operation used together with gml:box or Box. I have seen some examples of intersects used with gml:polygon, but it should work too with box, right?? Thanks for reading! Joaquín __ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. __ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. __ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] WFS Intersect with gml:box
Hi Jukka, My mapserver's GetCapabilities also sends ogc:Intersect, but somehow it is also accepting Intersects ( I dont know which one is the standar, but it seems like geotools uses intersects) http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0REQUEST=GetCapabilities ogc:Spatial_Capabilities ogc:Spatial_Operators ogc:Equals/ ogc:Disjoint/ ogc:Touches/ ogc:Within/ ogc:Overlaps/ ogc:Crosses/ ogc:Intersect/ ogc:Contains/ ogc:DWithin/ ogc:BBOX/ /ogc:Spatial_Operators /ogc:Spatial_Capabilities ... I copied the filter directly from debugging: 29-mar-2011 19:59:21 org.geotools.xml.XMLSAXHandler processException GRAVE: msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in GetFeature : Filter Intersects PropertyNamepoint/PropertyName Box srsName=WGS84(DD) coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/coordinates /Box /Intersects /Filter org.geotools.xml.filter.FilterComplexTypes$ServiceExceptionType.getValue(FilterComplexTypes.java:1667) org.geotools.xml.handlers.ComplexElementHandler.endElement(ComplexElementHandler.java:157) org.geotools.xml.XMLSAXHandler.endElement(XMLSAXHandler.java:262) org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) org.apache.xerces.parsers.XMLParser.parse(Unknown Source) org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) javax.xml.parsers.SAXParser.parse(Unknown Source) javax.xml.parsers.SAXParser.parse(Unknown Source) org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:132) org.geotools.data.wfs.v1_0_0.WFSFeatureReader.run(WFSFeatureReader.java:122) I installed mapserver with fgs-mapserver_basic_5.6.3-fgs_9.5-linux-i386.bin It is weird that the BBOX filter works, and the Intersects doesnt, with the same data. I can give you the ip address of the server is you want to try anything Thank you for your help! Joaquín De: Rahkonen Jukka [jukka.rahko...@mmmtike.fi] Enviado el: martes, 29 de marzo de 2011 19:35 Para: Joaquín Rodriguez-Guerra Urcelay; mapserver-users@lists.osgeo.org Asunto: Re: [mapserver-users] WFS Intersect with gml:box Hi, Have you copied the uDig request right? I suppose the filter is ogc:Intersect/. At leas my Geoserver sends that in the GetCapabilities. For information, wile using box is OK with WFS 1.0.0, some old deegree based WFS clients (OpenJUMP WFS plugin at least) are offering the box also with WFS 1.1.0 requests, but GML3 does not support box and those requests are invalid. Should use anvelope of something else instead. -Jukka Rahkonen- Joaquín Rodriguez-Guerra Urcelay wrote: Hello list, I am using a desktop GIS applicatin (uDig) to connect mapserver and display some wfs layers and I am having some trouble when uDig tries to filter features by bounding box. uDig sends a intersects spatial filter to obtain features in a bounding box: http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter xmlns=http://www.opengis.net/ogc; xmlns:gml=http://www.opengis.net/gml;IntersectsPropertyNamepoint/PropertyName gml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates /gml:Box /Intersects /Filter But it is not working :( ServiceExceptionReport version=1.2.0 xsi:schemaLocation=http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd; ServiceException code=InvalidParameterValue locator=filter msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in GetFeature : Filter xmlns=http://www.opengis.net/ogc; xmlns:gml=http://www.opengis.net/gml;IntersectsPropertyNamepoint/PropertyNamegml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates/gml:Box/Intersects/Filter /ServiceException /ServiceExceptionReport I have checked that the BBOX filter works perfectly ( I just replaced Intersects with BBOX in the above url) http://localhost:8080/cgi-bin/mywfs?WIDTH=512SERVICE=WFSVERSION=1.0.0request=getfeaturetypename=PositionRealFilter= Filter xmlns=http://www.opengis.net/ogc; xmlns:gml=http://www.opengis.net/gml;BBOXPropertyNamepoint/PropertyName gml:Box srsName=WGS84(DD)gml:coordinates decimal=. cs=, ts= -100.0,-45.0 100.0,45.0/gml:coordinates /gml:Box /BBOX /Filter But I cant make the INTERSECTS operation work. I would really appreciate if someone could point
[mapserver-users] Dinamic SLD style
Hello, I am trying to create a dinamic sld style for a shapefile in mapserver. I come from geoserver, and I was wondering if there was any way to use properties of the shapefile in the sld style, as in the example below where points in the shapefile with tipo=3 are represented with a ship3.png rotated COG deegrees. Is this possible in mapserver? Thanks for your help! Rule Titleship3/Title ogc:Filter ogc:PropertyIsEqualTo ogc:PropertyNameTipo/ogc:PropertyName ogc:Literal3/ogc:Literal /ogc:PropertyIsEqualTo /ogc:Filter PointSymbolizer Graphic ExternalGraphic OnlineResource xlink:type=simple xlink:href=ships/ship3.png / Formatimage/png/Format /ExternalGraphic Size16/Size Rotationogc:PropertyNameCOG/ogc:PropertyName/Rotation /Graphic /PointSymbolizer /Rule Joaquín Rodríguez-Guerra Urcelay __ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. __ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. __ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users