[mapserver-users] WFS GetFeature 1.0.0 vs 1.1.0

Dejan Gambin dejan.gambin at coin.hr
Thu Feb 20 06:06:54 PST 2014


Here are some parts:

WEB
  TEMPLATE "map.html"
  IMAGEPATH "/var/www/tmp/"
  IMAGEURL "/tmp/"
    METADATA
    "wms_encoding" "UTF-8"
    "wms_title" "WMS Demo Server"
    "wms_online_resource" "http://my.site.com/cgi-bin/mywms6?"
    "wms_srs" "EPSG:900913 EPSG:31275 EPSG:4326 EPSG:4269 EPSG:3857"
    "wms_feature_info_mime_type" "text/html"    
    "wfs_encoding" "UTF-8"
    "wfs_title" "WFS Demo Server"
    "wfs_namespace_prefix" "coin"
    "wfs_abstract" "WFS Demo Server Description"  
    "wfs_namespace_uri" "http://my.site.com"
    "wfs_online_resource" "http://my.site.com/cgi-bin/mywfs6?"
    "wfs_srs" "EPSG:900913 EPSG:31275 EPSG:4326 EPSG:4269 EPSG:3857"
    "ows_enable_request"   "*"  
   END
END  # Web



LAYER
  NAME "layer_name"
  STATUS ON
  CONNECTIONTYPE POSTGIS
  CONNECTION "host=localhost user=username password=password dbname=db_name port=5432"
  DATA "the_geom from (select gid, the_geom, kc_broj, povrsina, vlasnistv2, vlasnici from table_view) as subquery using unique gid using srid=31275"
  TYPE POLYGON  
  GROUP "layer_group"
  PROJECTION
    "init=epsg:31275"
  END  
  METADATA 
    "DESCRIPTION" "Ownership map"
    "wms_title" "VLASNICKA KARTA"
    "wms_srs" "EPSG:31275"    
    "wfs_title" "VLASNICKA KARTA"        
    "wfs_srs" "EPSG:31275"        
    "gml_include_items" "kc_broj,povrsina,vlasnistv2,vlasnici"
    "gml_kc_broj_alias" "NUMBER"
    "gml_povrsina_alias" "AREA" 
    "gml_vlasnistv2_alias" "OWNERSHIP"
    "gml_vlasnici_alias" "OWNERS"   
    "wms_include_items" "all" 
  END
  CLASSITEM 'vlasnistv2'
  LABELITEM "kc_broj"
  PROCESSING "LABEL_NO_CLIP=ON"  
  LABELMAXSCALEDENOM 10000
  CLASS
  etc.
  etc.
  TRANSPARENCY 70
  DUMP TRUE
END 

Thx very much, I'll try with another layer also 

dejan

On 20. vel. 2014., at 14:50, Martin Kofahl wrote:

> Hi Dejan,
> I cannot reproduce this error, so far. I tried 6.4.1 and the current master and did filter on numeric and text columns. Can you provide a shortened mapfile to reproduce this case?
> 
> Martin
> 
> 2014-02-19 10:38 GMT+01:00 Dejan Gambin <dejan.gambin at coin.hr>:
> Sure, here you are:
> 
> 1.0.0 (working) request:
> 
> WFS post request: <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0" maxFeatures="100" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:Query typeName="ms:katastar_vodnjan_poligon" xmlns:ms="http://gis.kermas-istra.com"><ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsLike wildCard="*" singleChar="." escape="!"><ogc:PropertyName>NUMBER</ogc:PropertyName><ogc:Literal>19/1</ogc:Literal></ogc:PropertyIsLike></ogc:Filter></wfs:Query></wfs:GetFeature>
> 
> 1.1.0 (non-working) request:
> 
> WFS post request: <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" maxFeatures="100" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:Query typeName="ms:katastar_vodnjan_poligon" srsName="EPSG:900913" xmlns:ms="http://gis.kermas-istra.com"><ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsLike wildCard="*" singleChar="." escapeChar="!"><ogc:PropertyName>NUMBER</ogc:PropertyName><ogc:Literal>19/1</ogc:Literal></ogc:PropertyIsLike></ogc:Filter></wfs:Query></wfs:GetFeature>
> 
> thanks, dejan
> 
> On 19. vel. 2014., at 08:57, Martin Kofahl wrote:
> 
>> Hi Dejan,
>> can you please post the get or post request made by openlayers for both, version 1.1.0 and 1.0.0?
>> 
>> Martin
>> 
>> 
>> 2014-02-18 11:37 GMT+01:00 Dejan Gambin <dejan.gambin at coin.hr>:
>> Hi,
>> 
>> I have been using MapServer 6.0.3 for a while. My client application worked well with WFS 1.1.0 protocol. Here is the part of the code:
>> 
>> var protocol = new OpenLayers.Protocol.WFS({
>>                     version: "1.0.0",
>>                     url:  self.options.config.wfs_url + "SERVICE=WFS&srsName=EPSG:900913",
>>                     srsName:"EPSG:900913",
>>                     featureNS: self.options.config.wfs_ns,
>>                     geometryName: "msGeometry",
>>                     featurePrefix: "ms",
>>                     featureType: some_layer,
>>                     defaultFilter: new OpenLayers.Filter.Comparison({
>>                         type: OpenLayers.Filter.Comparison.LIKE,
>>                         property: some_property
>>                         value: some_value
>>                     })
>>                 })
>> 
>> Recently I went to MapServer 6.4.1 and I started to get "no results" when using this code to search by attributes. I changed version 1.1.0 to 1.0.0 and everything works fine now.
>> 
>> Does anyone know what is the reason for this and should I stay on 1.0.0?
>> 
>> Notes - when doing spatial query it works ok even with 1.1.0.
>> 
>> Thanks!
>> 
>> dejan
>> 
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> 
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140220/e2373d5d/attachment-0001.html>


More information about the mapserver-users mailing list