Re: [mapserver-users] SLD with filter

2011-06-01 Thread Daniel Degasperi
Ok, ticket (with test data) created at 
http://trac.osgeo.org/mapserver/ticket/3902


Am 31/05/2011 19:35, schrieb Yewondwossen Assefa:

Daniel,

 I just did a quick test with 5.6.x (svn) and a postgis layer using 
the metadata but could not reproduce a crash. If it is something I can 
reproduce using some test map/data/filter, I will investigate. You can 
either send them to me or attache it to a trac bug.


best regards

On 31/05/2011 10:25 AM, Daniel Degasperi wrote:
Ok, with the metadata tag described below mapserver does not 
reprocude this error, but it throws a segfault.

I've put the coredump online: http://www.r3-gis.com/core.333.gz

Best regards,
Daniel

Am 31/05/2011 14:37, schrieb Yewondwossen Assefa:

Hi Daniel,

 You could possibly try to set on the layer a metadata for the type 
of your field to force it to string: something like

  metadata
 ows_localita_type Character
 ...
end

regards,

On 31/05/2011 8:26 AM, Daniel Degasperi wrote:

Hi,
I've a problem with following filter:

ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
ogc:PropertyIsEqualTo matchCase=true
ogc:PropertyNamelocalita/ogc:PropertyName
ogc:Literal1.102/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:Filter

Output:
?xml version=1.0 encoding=ISO-8859-1?
ows:ExceptionReport 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:ows=http://www.opengis.net/ows; version=1.1.0 
language=en-US xsi:schemaLocation=http://www.opengis.net/ows 
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd;

ows:Exception exceptionCode=mapserv locator=NoApplicableCode
ows:ExceptionTextmsWFSGetFeature(): WFS server error. 
FLTApplyFilterToLayer() failed
msPostGISLayerWhichShapes(): Query error. Error (ERROR:  operator 
does not exist: text = numeric
LINE 1: ...6966392 4130435.36164853))',32632) and ( (localita= 
1.102) )

 ^
HINT:  No operator matches the given name and argument type(s). You 
might need to add explicit type casts.
) executing query: select 
gc_objid,di_id,localita,di_name_1,encode(AsBinary(force_collection(force_2d(the_geom)),'NDR'),'hex') 
as geom,gc_objid from (SELECT  __data__.di_id as 
gc_objid,__data__.the_geom, 
__data__.di_id,__data__.localita,__data__.di_name_1 FROM 
geo.district_area AS __data__) AS foo where the_geom amp;amp; 
GeomFromText('POLYGON((-393764.596966392 
4130435.36164853,-393764.596966392 5936656.6234314,1412456.59042116 
5936656.6234314,1412456.59042116 4130435.36164853,-393764.596966392 
4130435.36164853))',32632) and ( (localita= 1.102) 
)/ows:ExceptionText

/ows:Exception
/ows:ExceptionReport

It seems that the value 1.102 is not quoted. Should I add the 
attribute xs:type=string to the literal node or use the 
PropertyIsLike condition?


I'm using MapServer 5.6.6

Best regards,
Daniel














--
Daniel Degasperi R3 GIS Srl - GmbH www.r3-gis.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] SLD with filter

2011-05-31 Thread Daniel Degasperi

Hi,
I've a problem with following filter:

ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
ogc:PropertyIsEqualTo matchCase=true
ogc:PropertyNamelocalita/ogc:PropertyName
ogc:Literal1.102/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:Filter

Output:
?xml version=1.0 encoding=ISO-8859-1?
ows:ExceptionReport 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:ows=http://www.opengis.net/ows; version=1.1.0 language=en-US 
xsi:schemaLocation=http://www.opengis.net/ows 
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd;

ows:Exception exceptionCode=mapserv locator=NoApplicableCode
ows:ExceptionTextmsWFSGetFeature(): WFS server error. 
FLTApplyFilterToLayer() failed
msPostGISLayerWhichShapes(): Query error. Error (ERROR:  operator does 
not exist: text = numeric

LINE 1: ...6966392 4130435.36164853))',32632) and ( (localita= 1.102) )
 ^
HINT:  No operator matches the given name and argument type(s). You 
might need to add explicit type casts.
) executing query: select 
gc_objid,di_id,localita,di_name_1,encode(AsBinary(force_collection(force_2d(the_geom)),'NDR'),'hex') 
as geom,gc_objid from (SELECT  __data__.di_id as 
gc_objid,__data__.the_geom, 
__data__.di_id,__data__.localita,__data__.di_name_1 FROM 
geo.district_area AS __data__) AS foo where the_geom amp;amp; 
GeomFromText('POLYGON((-393764.596966392 
4130435.36164853,-393764.596966392 5936656.6234314,1412456.59042116 
5936656.6234314,1412456.59042116 4130435.36164853,-393764.596966392 
4130435.36164853))',32632) and ( (localita= 1.102) )/ows:ExceptionText

/ows:Exception
/ows:ExceptionReport

It seems that the value 1.102 is not quoted. Should I add the attribute 
xs:type=string to the literal node or use the PropertyIsLike condition?


I'm using MapServer 5.6.6

Best regards,
Daniel


--
Daniel Degasperi R3 GIS Srl - GmbH www.r3-gis.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] SLD with filter

2011-05-31 Thread Yewondwossen Assefa

Hi Daniel,

 You could possibly try to set on the layer a metadata for the type of 
your field to force it to string: something like

  metadata
 ows_localita_type Character
 ...
end

regards,

On 31/05/2011 8:26 AM, Daniel Degasperi wrote:

Hi,
I've a problem with following filter:

ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
ogc:PropertyIsEqualTo matchCase=true
ogc:PropertyNamelocalita/ogc:PropertyName
ogc:Literal1.102/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:Filter

Output:
?xml version=1.0 encoding=ISO-8859-1?
ows:ExceptionReport 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:ows=http://www.opengis.net/ows; version=1.1.0 
language=en-US xsi:schemaLocation=http://www.opengis.net/ows 
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd;

ows:Exception exceptionCode=mapserv locator=NoApplicableCode
ows:ExceptionTextmsWFSGetFeature(): WFS server error. 
FLTApplyFilterToLayer() failed
msPostGISLayerWhichShapes(): Query error. Error (ERROR:  operator does 
not exist: text = numeric

LINE 1: ...6966392 4130435.36164853))',32632) and ( (localita= 1.102) )
 ^
HINT:  No operator matches the given name and argument type(s). You 
might need to add explicit type casts.
) executing query: select 
gc_objid,di_id,localita,di_name_1,encode(AsBinary(force_collection(force_2d(the_geom)),'NDR'),'hex') 
as geom,gc_objid from (SELECT  __data__.di_id as 
gc_objid,__data__.the_geom, 
__data__.di_id,__data__.localita,__data__.di_name_1 FROM 
geo.district_area AS __data__) AS foo where the_geom amp;amp; 
GeomFromText('POLYGON((-393764.596966392 
4130435.36164853,-393764.596966392 5936656.6234314,1412456.59042116 
5936656.6234314,1412456.59042116 4130435.36164853,-393764.596966392 
4130435.36164853))',32632) and ( (localita= 1.102) )/ows:ExceptionText

/ows:Exception
/ows:ExceptionReport

It seems that the value 1.102 is not quoted. Should I add the 
attribute xs:type=string to the literal node or use the 
PropertyIsLike condition?


I'm using MapServer 5.6.6

Best regards,
Daniel





--

Assefa Yewondwossen
Software Analyst

Email: yass...@dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925



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


Re: [mapserver-users] SLD with filter

2011-05-31 Thread Daniel Degasperi
Ok, with the metadata tag described below mapserver does not reprocude 
this error, but it throws a segfault.

I've put the coredump online: http://www.r3-gis.com/core.333.gz

Best regards,
Daniel

Am 31/05/2011 14:37, schrieb Yewondwossen Assefa:

Hi Daniel,

 You could possibly try to set on the layer a metadata for the type of 
your field to force it to string: something like

  metadata
 ows_localita_type Character
 ...
end

regards,

On 31/05/2011 8:26 AM, Daniel Degasperi wrote:

Hi,
I've a problem with following filter:

ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
ogc:PropertyIsEqualTo matchCase=true
ogc:PropertyNamelocalita/ogc:PropertyName
ogc:Literal1.102/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:Filter

Output:
?xml version=1.0 encoding=ISO-8859-1?
ows:ExceptionReport 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:ows=http://www.opengis.net/ows; version=1.1.0 
language=en-US xsi:schemaLocation=http://www.opengis.net/ows 
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd;

ows:Exception exceptionCode=mapserv locator=NoApplicableCode
ows:ExceptionTextmsWFSGetFeature(): WFS server error. 
FLTApplyFilterToLayer() failed
msPostGISLayerWhichShapes(): Query error. Error (ERROR:  operator 
does not exist: text = numeric

LINE 1: ...6966392 4130435.36164853))',32632) and ( (localita= 1.102) )
 ^
HINT:  No operator matches the given name and argument type(s). You 
might need to add explicit type casts.
) executing query: select 
gc_objid,di_id,localita,di_name_1,encode(AsBinary(force_collection(force_2d(the_geom)),'NDR'),'hex') 
as geom,gc_objid from (SELECT  __data__.di_id as 
gc_objid,__data__.the_geom, 
__data__.di_id,__data__.localita,__data__.di_name_1 FROM 
geo.district_area AS __data__) AS foo where the_geom amp;amp; 
GeomFromText('POLYGON((-393764.596966392 
4130435.36164853,-393764.596966392 5936656.6234314,1412456.59042116 
5936656.6234314,1412456.59042116 4130435.36164853,-393764.596966392 
4130435.36164853))',32632) and ( (localita= 1.102) )/ows:ExceptionText

/ows:Exception
/ows:ExceptionReport

It seems that the value 1.102 is not quoted. Should I add the 
attribute xs:type=string to the literal node or use the 
PropertyIsLike condition?


I'm using MapServer 5.6.6

Best regards,
Daniel








--
Daniel Degasperi R3 GIS Srl - GmbH www.r3-gis.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] SLD with filter

2011-05-31 Thread Virginia Maffei
Hi, i'm new at this and i'm trying to connect to postgis raster in the
mapfile.
I loaded a tif file into postgis raster database. It created a table with 2
fields.
In the mapfile i added the connection like it specifies in the postgis
raster FAQ but it doesnt displays a thing:


LAYER
NAME coolwktraster
TYPE raster
STATUS ON
DATA PG:host=localhost port=5432 dbname='somedb' user='someuser'
password='whatever'
schema='someschema' table='cooltable' mode='2' 
PROCESSING NODATA=0
PROCESSING SCALE=AUTO
#... other standard raster processing functions here
#... classes are optional but useful for 1 band data
CLASS
NAME boring
EXPRESSION ([pixel]  20)
COLOR 250 250 250
END
CLASS
NAME mildly interesting
EXPRESSION ([pixel]  20 AND [pixel]  1000)
COLOR 255 0 0
END
CLASS
NAME very interesting
EXPRESSION ([pixel] = 1000)
COLOR 0 255 0
END
END


the mode=2 i deleted it because its for other postgis version, i have
postgis 1.5.2.

Could you help me with this? Could someone connect with success?

Thank you!

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


Re: [mapserver-users] SLD with filter

2011-05-31 Thread Daniel Degasperi
Could you please use a different subject. This is totally offtopic with 
the current problem.


Am 31/05/2011 16:54, schrieb Virginia Maffei:
Hi, i'm new at this and i'm trying to connect to postgis raster in the 
mapfile.
I loaded a tif file into postgis raster database. It created a table 
with 2 fields.
In the mapfile i added the connection like it specifies in the postgis 
raster FAQ but it doesnt displays a thing:


LAYER
NAME coolwktraster
TYPE raster
STATUS ON
DATA PG:host=localhost port=5432 dbname='somedb' user='someuser' 
password='whatever'
schema='someschema' table='cooltable' mode='2'
PROCESSING NODATA=0
PROCESSING SCALE=AUTO
#... other standard raster processing functions here
#... classes are optional but useful for 1 band data
CLASS
NAME boring
EXPRESSION ([pixel]  20)
COLOR 250 250 250
END
CLASS
NAME mildly interesting
EXPRESSION ([pixel]  20 AND [pixel]  1000)
COLOR 255 0 0
END
CLASS
NAME very interesting
EXPRESSION ([pixel]= 1000)
COLOR 0 255 0
END
END

the mode=2 i deleted it because its for other postgis version, i have 
postgis 1.5.2.


Could you help me with this? Could someone connect with success?

Thank you!

Viriginia


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


--
Daniel Degasperi R3 GIS Srl - GmbH www.r3-gis.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] SLD with filter

2011-05-31 Thread Yewondwossen Assefa

Daniel,

 I just did a quick test with 5.6.x (svn) and a postgis layer using the 
metadata but could not reproduce a crash. If it is something I can 
reproduce using some test map/data/filter, I will investigate. You can 
either send them to me or attache it to a trac bug.


best regards

On 31/05/2011 10:25 AM, Daniel Degasperi wrote:
Ok, with the metadata tag described below mapserver does not reprocude 
this error, but it throws a segfault.

I've put the coredump online: http://www.r3-gis.com/core.333.gz

Best regards,
Daniel

Am 31/05/2011 14:37, schrieb Yewondwossen Assefa:

Hi Daniel,

 You could possibly try to set on the layer a metadata for the type 
of your field to force it to string: something like

  metadata
 ows_localita_type Character
 ...
end

regards,

On 31/05/2011 8:26 AM, Daniel Degasperi wrote:

Hi,
I've a problem with following filter:

ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
ogc:PropertyIsEqualTo matchCase=true
ogc:PropertyNamelocalita/ogc:PropertyName
ogc:Literal1.102/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:Filter

Output:
?xml version=1.0 encoding=ISO-8859-1?
ows:ExceptionReport 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:ows=http://www.opengis.net/ows; version=1.1.0 
language=en-US xsi:schemaLocation=http://www.opengis.net/ows 
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd;

ows:Exception exceptionCode=mapserv locator=NoApplicableCode
ows:ExceptionTextmsWFSGetFeature(): WFS server error. 
FLTApplyFilterToLayer() failed
msPostGISLayerWhichShapes(): Query error. Error (ERROR:  operator 
does not exist: text = numeric

LINE 1: ...6966392 4130435.36164853))',32632) and ( (localita= 1.102) )
 ^
HINT:  No operator matches the given name and argument type(s). You 
might need to add explicit type casts.
) executing query: select 
gc_objid,di_id,localita,di_name_1,encode(AsBinary(force_collection(force_2d(the_geom)),'NDR'),'hex') 
as geom,gc_objid from (SELECT  __data__.di_id as 
gc_objid,__data__.the_geom, 
__data__.di_id,__data__.localita,__data__.di_name_1 FROM 
geo.district_area AS __data__) AS foo where the_geom amp;amp; 
GeomFromText('POLYGON((-393764.596966392 
4130435.36164853,-393764.596966392 5936656.6234314,1412456.59042116 
5936656.6234314,1412456.59042116 4130435.36164853,-393764.596966392 
4130435.36164853))',32632) and ( (localita= 1.102) 
)/ows:ExceptionText

/ows:Exception
/ows:ExceptionReport

It seems that the value 1.102 is not quoted. Should I add the 
attribute xs:type=string to the literal node or use the 
PropertyIsLike condition?


I'm using MapServer 5.6.6

Best regards,
Daniel











--

Assefa Yewondwossen
Software Analyst

Email: yass...@dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925



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