Re: [mapserver-users] WFS filter creates a query using a number instead of text

2015-02-26 Thread Rahkonen Jukka (MML)
Hi,


I would recommend to make a test with Mapserver 7.0-beta and GDAL 1.11.2 or at 
least with 6.4 and 1.10. Your case does feel like an obvious bug but  Mapserver 
6.0.3 or GDAL 1.8.0 are out of maintenance.


I have some ideas for workarounds:

You can try if it makes difference to use either the native PostGIS driver or 
GDAL OGR driver (CONNECTIONTYPW OGR). You can also try to add

gml_[item name]_type into the layer metadata 
http://mapserver.org/ogc/wfs_server.html but I do not know if Mapserver 6.0 
supports it and probably it does not change anything because your schema is 
good already. And perhaps using PropertyIsLike instead of PropertyIsEqualTo 
could work.


-Jukka Rahkonen-



bteluk wrote:

I can't shine any light on the problem but I have encountered the same problem. 
Using MapServer v6.0.3, with Postgres 9.1.3, PostGIS v 1.5.3, GDAL v1.8.0. WFS 
Posted Query looks like this:

  wfs:GetFeature service=WFS
 version=1.0.0
 wfs=http://www.opengis.net/wfs;
 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-transaction.xsd;
wfs:Query typeName=PostCodeArea
  ogc:Filter
ogc:PropertyIsEqualTo
  ogc:PropertyNamepcode/ogc:PropertyName
  ogc:Literal3168/ogc:Literal
/ogc:PropertyIsEqualTo
  /ogc:Filter
/wfs:Query
  /wfs:GetFeature


The DescribeFeatureType for that layer shows the following for the attribute:

element name=pcode type=string/


PostgreSQL has the attribute field specified as a string:

pcode | character varying(10) |


Server responds:

?xml version='1.0' encoding=ISO-8859-1 ?
  ServiceExceptionReport version=1.2.0
  xmlns=http://www.opengis.net/ogc;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://www.opengis.net/ogc 
http://schemas.opengis.net//wfs/1.0.0/OGC-exception.xsd;
ServiceException code=NoApplicableCode locator=mapserv
msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed
msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  
operator does not exist: character varying = integer
LINE 1: ...90 -5,165 -5,165 -50,90 -50))#39;,4283) and ( (quot;pcodequot;= 
3168) )
  ^
HINT:  No operator matches the given name and argument type(s). You might need 
to add explicit type casts.

  /ServiceException
/ServiceExceptionReport


Postgres Log shows:

2015-02-27 16:11:42.394 EST gecli 127.0.0.1(41368)ERROR:  operator does not 
exist: character varying = integer at character 250
2015-02-27 16:11:42.394 EST gecli 127.0.0.1(41368)HINT:  No operator matches 
the given name and argument type(s). You might need to add explicit type casts.
2015-02-27 16:11:42.394 EST gecli 127.0.0.1(41368)STATEMENT:  select 
gid,source,ufi,area,pcode,perimeter,encode(ST_AsBinary(ST_Force_2D(the_geom),'NDR'),'hex')
 as geom,gid from sensis.postcode where the_geom  
ST_GeomFromText('POLYGON((90 -50,90 -5,165 -5,165 -50,90 -50))',4283) and ( 
(pcode= 3168) )
$


Certainly appears that the query put to PostGIS is incorrect - it's not quoting 
the literal value. I have a similar MapServer layer that's based on ESRI 
Shapefile - same effective attribute set up, and it works fine - of course it's 
not going via PostgreSQL/PostGIS - so it seems that the problem is specific to 
the PostgreSQL/PostGIS interface? I tried mucking around with including 
PostgreSQL casts on the literal eg. 3168::text, using CAST(pcode as int) on 
the PropertyName etc with no luck. Using PropertyIsLike did work, but is not 
an ideal solution.

View this message in context: Re: WFS filter creates a query using a number 
instead of 
texthttp://osgeo-org.1560.x6.nabble.com/WFS-filter-creates-a-query-using-a-number-instead-of-text-tp5130361p5190393.html
Sent from the Mapserver - User mailing list 
archivehttp://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html at 
Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] WFS filter creates a query using a number instead of text

2015-02-26 Thread bte...@gmail.com
I can't shine any light on the problem but I have encountered the same
problem.  Using MapServer v6.0.3, with Postgres 9.1.3, PostGIS v 1.5.3, GDAL
v1.8.0.WFS Posted Query looks like this:The DescribeFeatureType for that
layer shows the following for the attribute:PostgreSQL has the attribute
field specified as a string:Server responds:Postgres Log shows:Certainly
appears that the query put to PostGIS is incorrect - it's not quoting the
literal value.I have a similar MapServer layer that's based on ESRI
Shapefile - same effective attribute set up, and it works fine - of course
it's not going via PostgreSQL/PostGIS - so it seems that the problem is
specific to the PostgreSQL/PostGIS interface?I tried mucking around with
including PostgreSQL casts on the literal eg. 3168::text, using
CAST(pcode as int) on the PropertyName etc with no luck.  Using
PropertyIsLike did work, but is not an ideal solution.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/WFS-filter-creates-a-query-using-a-number-instead-of-text-tp5130361p5190393.html
Sent from the Mapserver - User mailing list archive at Nabble.com.___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] mapserver-users Digest, Vol 85, Issue 27

2015-02-26 Thread Anzel, Phil - NRCS, Fort Collins, CO
Hi Anurduddha,

Did you set wfs_extext for each layer? I had a similar problem (Mapserver 
6.4.1 accessing large data sets in SQL Server 2012) until I defined every 
layer's wfs_extent.

- Phil Anzel 
  USDA/NRCS contractor - Team Vistronix

This electronic message contains information generated by the USDA solely for 
the intended recipients.  Any unauthorized interception of this message or the 
use or disclosure of the information it contains may violate the law and 
subject the violator to civil or criminal penalties.  If you believe you have 
received this message in error, please notify the sender and delete the email 
immediately.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of 
mapserver-users-requ...@lists.osgeo.org
Sent: Wednesday, February 25, 2015 1:01 PM
To: mapserver-users@lists.osgeo.org
Subject: mapserver-users Digest, Vol 85, Issue 27

Send mapserver-users mailing list submissions to
mapserver-users@lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.osgeo.org/mailman/listinfo/mapserver-users
or, via email, send a message with subject or body 'help' to
mapserver-users-requ...@lists.osgeo.org

You can reach the person managing the list at
mapserver-users-ow...@lists.osgeo.org

When replying, please edit your Subject line so it is more specific than Re: 
Contents of mapserver-users digest...


Today's Topics:

   1. Re: Getcapabilities extremely slow in version 6.4.1 (aabhayas)
   2. Mapserver + KML (alok mathur)


--

Message: 1
Date: Tue, 24 Feb 2015 16:21:51 -0800 (PST)
From: aabhayas a.abhayasin...@bom.gov.au
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Getcapabilities extremely slow in
version 6.4.1
Message-ID: 1424823711617-5189823.p...@n6.nabble.com
Content-Type: text/plain; charset=us-ascii

Hi 

Thanks for the quick reply. I did set the extents but still the same result.

I even compiled MapServer 6.2.2 and did the same test. Even MapServer 6.2.2 is 
extremely slow compared to 6.0.4.

Thanks
Anurduddha




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Getcapabilities-extremely-slow-in-version-6-4-1-tp5189325p5189823.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


--

Message: 2
Date: Wed, 25 Feb 2015 10:03:21 +0530
From: alok mathur mathuralok...@gmail.com
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Mapserver + KML
Message-ID:
CAFo4ZzA9OByeFP2dRph+m_-fQt_qq5MS8EffiW50sftZHY=a...@mail.gmail.com
Content-Type: text/plain; charset=utf-8

Hi,

I am new to Mapserver and KML. According to my knowledge i found that mapserver 
reads KML file but only some elements in that.
Is there anyway to read KML style tag using mapserver and plot a map with same 
style. as in mapserver we have to give our own style.


Thanks!

*Alok Mathur*
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150225/0179615b/attachment-0001.html

--

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

End of mapserver-users Digest, Vol 85, Issue 27
***
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Converting Mapfile to OUTPUTFORMAT . . .

2015-02-26 Thread Basques, Bob (CI-StPaul)
All,

I'm trying to convert an older mapfile to use the new OUTPUTFORMAT parameters, 
and not having much success in setting up a particular color to be displayed as 
transparent in the resulting PNG.

Anyone have a Mapfile fragment as an example of using a particular color as the 
transparent areas?  NOTE: I'm displaying the background color, so setting that 
to transparent is not going to work in this instance.  I need to use a specific 
RGB value.

Thanks

Bobb

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Converting Mapfile to OUTPUTFORMAT . . .

2015-02-26 Thread Stephen Woodbridge

On 2/26/2015 5:56 PM, Basques, Bob (CI-StPaul) wrote:

All,

I’m trying to convert an older mapfile to use the new OUTPUTFORMAT
parameters, and not having much success in setting up a particular color
to be displayed as transparent in the resulting PNG.

Anyone have a Mapfile fragment as an example of using a particular color
as the transparent areas?  NOTE: I’m displaying the background color, so
setting that to transparent is not going to work in this instance.  I
need to use a specific RGB value.


Bob,

Set the background color to the color you want to be transparent.

If you need to have a background also, then create the first layer 
similar to this and adjust it for your projections:


  LAYER
NAME background
GROUP cb
STATUS ON
TYPE POLYGON
METADATA
  ows_title background
  ows_extent -20037508.34 -20037508.34 20037508.34 20037508.34
END
PROJECTION init=epsg:900913 END
FEATURE
POINTS -20037508.34 -20037508.34 20037508.34 -20037508.34 
20037508.34 20037508.34 -20037508.34 20037508.34 -20037508.34 
-20037508.34 END

END
CLASS
  STYLE
COLOR #80B1D3
  END
END
  END


-Steve W
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users